Skip to main content
Aria Knowledge Central

get_cm_details_m Sample Call and Response

This example shows a call to get_cm_details_m that retrieves the details of one credit memo issued against an account, based on the plsql_m_r73.yml definition file for release 73.

This example includes every required field plus the line, tax, applied-charge, and qualifier arrays that make the response tell a complete story. It does not attempt to cover every field a voided or price-change credit memo could carry.

Sample call

{
  "rest_call": "get_cm_details_m",
  "output_format": "json",
  "client_no": "10021",
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "acct_no": 900412,
  "cm_no": 55031
}

The account is identified by one of two alternative fields, acct_no or client_acct_id; this example uses acct_no, the Aria-assigned numeric identifier. The credit memo is identified the same way, using cm_no in place of client_cm_seq_id_in, the client-defined alternative.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "cm_no_out": 55031,
  "client_cm_seq_id": "cm-2026-0417",
  "client_appended_cm_seq_id": "ACME-cm-2026-0417",
  "credit_ref_type": "0",
  "created_by": "csr.jmartin",
  "created_date": "2026-07-10 14:32:05",
  "credit_reason_code": 4,
  "credit_comments": "Partial credit issued for a defective headphone unit returned by the account holder.",
  "orig_invoice_no_2": 780215,
  "cm_total": 89.99,
  "cm_period_start_date": "2026-07-01",
  "cm_period_end_date": "2026-07-31",
  "customer_note": "We are sorry for the inconvenience and have applied a credit to your account.",
  "cm_line_details": [
    {
      "cm_transaction_id": 9040217,
      "cm_void_transaction_id": null,
      "cm_line_amount": 89.99,
      "master_plan_instance_no": 61200,
      "client_master_plan_instance_id": "mpi-acme-61200",
      "service_no": 5510,
      "client_service_id": "svc-hardware-electronics",
      "item_no": 88420,
      "client_sku": "WNC-HDPH-BLK",
      "reason_code_2": 4,
      "credit_memo_line_no": 1,
      "credit_memo_invoice_line_no": 12,
      "service_name": "Consumer Electronics Hardware"
    }
  ],
  "cm_tax_details": [
    {
      "tax_detail_line": 1,
      "taxed_cm_line_no": 1,
      "tax_credit_amount": 7.42,
      "tax_authority_level": 1,
      "orig_was_tax_inclusive": 0,
      "tax_srv_tax_type_id": "STATE_SALES_TAX",
      "tax_srv_tax_type_desc": "State Sales Tax",
      "tax_serv_cat_text": "Sales and Use Tax",
      "unrounded_tax_amt": 7.4234,
      "tax_rate": 0.0825
    }
  ],
  "cm_applied_details": [
    {
      "cm_line_no_applied": 1,
      "cm_applied_date": "2026-07-10",
      "cm_applied_charge_id": 9040100,
      "cm_applied_invoice_no": 780215,
      "cm_applied_charge_seq_num": 12,
      "cm_applied_service_no": 5510,
      "cm_applied_service_cdid": "svc-hardware-electronics",
      "cm_applied_service_name": "Consumer Electronics Hardware",
      "cm_applied_amount": 89.99,
      "cm_applied_plan_instance_no": 61200
    }
  ],
  "cm_qualifiers": [
    {
      "cm_qualifier_name": "return_authorization",
      "cm_qualifier_value": "RA-2026-8842"
    }
  ],
  "error_details": null
}

An error_code of 0 with an error_msg of OK indicates that Aria found the credit memo and returned its details successfully. The credit_ref_type value of 0 means this is an invoice-based credit memo; other values indicate a general credit, a price-change credit, or a cancellation credit. The cm_line_details, cm_tax_details, cm_applied_details, and cm_qualifiers arrays each hold one entry per credit memo line, tax record, applied charge, and qualifier respectively; this example shows one representative entry in each, but a credit memo with several line items would return correspondingly more entries in each array, and none of the arrays shown here is exhaustive. This example uses orig_invoice_no_2, reason_code_2, and credit_memo_line_no rather than orig_invoice_no, reason_code, and cm_line_no, since the yml file marks the latter three deprecated with an explicit deprecate_version.

TOP
  • Was this article helpful?