Skip to main content
Aria Knowledge Central

get_acct_writeoff_or_disputes_m Sample Call and Response

This example shows a client retrieving the write-offs and disputes recorded against one account, based on the get_acct_writeoff_or_disputes_m method defined in plsql_m_r73.yml.

The example requests both write-off and dispute records for the account and asks Aria to include the underlying written-off invoice line items. It does not cover a request scoped to a single master plan instance, and it does not cover requests that ask for write-off details only or dispute details only.

Sample call

{
  "rest_call": "get_acct_writeoff_or_disputes_m",
  "output_format": "json",
  "client_no": 4009,
  "auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "acct_no": 3300145,
  "dispute_or_writeoff_flag": 0,
  "details_flag": 1
}

The acct_no field and the client_acct_id field form an alternative-required pair; this example supplies acct_no and omits client_acct_id. This example also omits the master_plan_instance_no and client_master_plan_instance_id pair entirely, since the request targets the account as a whole rather than one master plan instance. The dispute_or_writeoff_flag value of zero means the response includes both write-off and dispute records; the other allowable values are one, for write-off details only, and two, for dispute details only. The details_flag value of one means the response also includes the written-off invoice line items; a value of zero would suppress those line items. The rest_call and output_format fields are added by the REST layer.

Sample response

{
  "error_code": 0,
  "error_msg": "",
  "writeoff_dispute_info": [
    {
      "rec_no": 55021,
      "created_by": "csr.jsmith",
      "created_date": "2026-03-10 09:15:00",
      "amount": 250.00,
      "invoice_no": 9004521,
      "invoice_date": "2026-02-01",
      "invoice_amt": 250.00,
      "writeoff_detail": [
        {
          "invoice_no": 9004521,
          "invoice_bill_date": "2026-02-01",
          "invoice_transaction_id": 771102,
          "original_transaction_amount": 250.00,
          "writeoff_transaction_amount": 250.00,
          "writeoff_transaction_start_date": "2026-02-01",
          "writeoff_transaction_end_date": "2026-02-28",
          "dispute_ind": 0
        }
      ],
      "reason_code": 12,
      "comments": "Customer relocated; account closed as a courtesy write-off.",
      "dispute_ind": 0,
      "paying_acct_no": 3300145,
      "is_voided": 0
    },
    {
      "rec_no": 55088,
      "created_by": "csr.mkeller",
      "created_date": "2026-04-02 14:30:00",
      "amount": 75.50,
      "invoice_no": 9004610,
      "invoice_date": "2026-03-01",
      "invoice_amt": 300.00,
      "dispute_creation_date": "2026-04-02",
      "dispute_exp_date": "2026-05-02",
      "reason_code": 20,
      "secondary_reason_code": 3,
      "comments": "Customer disputes one line item on invoice 9004610.",
      "dispute_ind": 1,
      "paying_acct_no": 3300145,
      "is_voided": 0
    }
  ]
}

An error_code value of zero together with an empty error_msg indicates that Aria found and returned the account's write-off and dispute records successfully. The writeoff_dispute_info field is an array because an account can accumulate more than one write-off or dispute over time; this example shows two entries, one write-off record and one dispute record, distinguished by the dispute_ind value of zero for a write-off and one for a dispute, but a real account could have none, one, or many more records. The nested writeoff_detail array appears only on the write-off record because details_flag requested the underlying invoice line items; it would be repeated with one entry per written-off line item on invoices with multiple line items. This example omits the nonpublic error_details and do_logging_ind fields, and it omits the deprecated can_unsettle field, all consistent with excluding nonpublic and deprecated fields from the sample.

TOP
  • Was this article helpful?