get_invoice_cm_details_m Sample Call and Response
This example retrieves the allowable credit memo line values for an invoice, based on the plsql_m_r73.yml definition file for Aria release 73.
This example includes every required field and shows a coherent set of invoice lines eligible for a credit memo, not every field the method accepts. Because the invoice in this example can be credited without restriction, the sample response omits restriction_reason and explains what its presence would mean.
Sample call
{
"rest_call": "get_invoice_cm_details_m",
"output_format": "json",
"client_no": 100234,
"auth_key": "8f3d9c2e1b7a4f6d9e0c1a2b3d4e5f60",
"acct_no": 300118842,
"invoice_no": 8820441
}
The rest_call and output_format fields are envelope fields added by the REST layer; they are not part of the method's own documented arguments. For the account identifier, this example uses acct_no rather than its alternative, client_acct_id. For the invoice identifier, this example uses invoice_no rather than its alternative, client_cm_seq_id.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"invoice_cm_line_details": [
{
"line_no": 1,
"service_no": 41200,
"service_name": "Business Voice Unlimited",
"client_sku": "SKU-VOICE-UNL",
"item_no": 77001,
"client_service_id": "SVC-VOICE-01",
"amount": 149.00,
"max_credit_amount": 149.00,
"max_on_charge_credit_amount": 140.57,
"orig_charge_tax_inclusive_indicator": 0,
"max_on_tax_credit_amount": 8.43
},
{
"line_no": 2,
"service_no": 41205,
"service_name": "Data Overage",
"client_sku": "SKU-DATA-500",
"item_no": 77014,
"client_service_id": "SVC-DATA-01",
"amount": 51.00,
"max_credit_amount": 51.00,
"max_on_charge_credit_amount": 48.11,
"orig_charge_tax_inclusive_indicator": 0,
"max_on_tax_credit_amount": 2.89
}
]
}
An error_code value of 0 and an error_msg value of “OK” indicate the call succeeded. This response omits restriction_reason because this invoice can be credited using a credit memo; if it could not, restriction_reason would report one of the allowable single-letter codes, such as “a” for a voided invoice, “b” for a pending invoice, “c” for an invoice in dispute hold, “d” for a written-off invoice, “e” for a fully paid invoice, “f” for a child invoice under parent pay responsibility, or “g” for an invoice with refund-related reversals applied. The invoice_cm_line_details array would contain one entry for every line on the invoice; this example shows two entries. An orig_charge_tax_inclusive_indicator value of 0 indicates the original charge line was not tax inclusive; a value of 1 would indicate it was. This example leaves out the deprecated client_item_id field from each line.