Skip to main content
Aria Knowledge Central

get_all_reason_codes_m Sample Call and Response

This example retrieves all reason codes of a single type, Write Off, that are configured for a client. It is based on the get_all_reason_codes_m definition in methods_m_r73.yml, the Admin Tools API method file for the Aria release 73 build.

This example shows two representative reason code entries: one where the general ledger accounts are derived from the reason code itself, and one where accounting treatment begins at issuance through the record_liability setting. It does not attempt to show every reason code type or every combination of general ledger code fields.

Sample call

{
  "rest_call": "get_all_reason_codes_m",
  "output_format": "json",
  "client_no": 100589,
  "auth_key": "8f3e2c9a1b7d4f6e9c2a5b8d1e4f7a2c",
  "type": "Write Off"
}

The rest_call and output_format fields are REST-layer envelope fields and are not part of the method arguments defined in the yml file itself. client_no and auth_key are the standard Aria-assigned client identifier and authentication key that every call requires.

The type field is optional and filters the results to a single reason code type. This example uses Write Off; the yml file also defines Service Credit, Cash Credit, Credit Memo, Rebill, and Refund as valid values. Omitting type would return reason codes of every type.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "all_reason_codes": [
    {
      "created_by": "jconrad",
      "created_date": "2025-11-03 09:15:00",
      "updated_by": "jconrad",
      "updated_date": "2026-02-18 14:42:00",
      "reason_code": "WO-100",
      "type": "Write Off",
      "reason_code_name": "Uncollectible Balance",
      "is_active": 1,
      "on_acct_credit_flag": 1,
      "debit_gl_code": "6100-BADDEBT",
      "credit_gl_code": "1200-UNAPPLIED",
      "allow_time_restrictions": "true",
      "allow_plan_restrictions": "false",
      "record_service_credit_transactions": "false",
      "record_liability": 0
    },
    {
      "created_by": "mramirez",
      "created_date": "2026-01-09 11:02:00",
      "updated_by": "mramirez",
      "updated_date": "2026-01-09 11:02:00",
      "reason_code": "WO-105",
      "type": "Write Off",
      "reason_code_name": "Bankruptcy Write-Off",
      "is_active": 1,
      "on_acct_credit_flag": 0,
      "allow_time_restrictions": "false",
      "allow_plan_restrictions": "false",
      "record_service_credit_transactions": "false",
      "record_liability": 1,
      "expense_gl_code": "6105-BANKRUPTCY",
      "unapplied_sc_gl_code": "1205-UNAPPLIED-SC",
      "canceled_sc_gl_code": "1206-CANCELED-SC",
      "expired_sc_gl_code": "1207-EXPIRED-SC"
    }
  ]
}

An error_code of zero with an error_msg of “OK” indicates that Aria successfully retrieved the reason codes. all_reason_codes is an array, and a client with more Write Off reason codes configured would see additional entries in this same format.

The first entry has on_acct_credit_flag set to 1, meaning its general ledger accounts come from the reason code itself, so debit_gl_code and credit_gl_code are populated. The second entry has record_liability set to 1, meaning accounting treatment begins at issuance, so expense_gl_code, unapplied_sc_gl_code, canceled_sc_gl_code, and expired_sc_gl_code are populated instead. Fields such as debit_gl_code and credit_gl_code are left out of the second entry, and expense_gl_code and related liability fields are left out of the first entry, because the yml file describes each set as populated only under its corresponding condition.

TOP
  • Was this article helpful?