get_reason_code_m Sample Call and Response
This example shows a client looking up the configuration of a single reason code, identified by its type and reason code number, based on the get_reason_code_m method defined in methods_m_r73.yml.
This example includes every required field for the call and a representative set of returned configuration fields for a service credit reason code. It does not cover the general ledger fields that apply only when a reason code records liability at issuance.
Sample call
{
"rest_call": "get_reason_code_m",
"output_format": "json",
"client_no": 60123,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"type": "Service Credit",
"reason_code": 15
}
The rest_call and output_format fields are envelope fields that the REST layer adds to every call; neither appears in the method’s own documented arguments. The call requires client_no and auth_key, along with type and reason_code together identifying the specific reason code being looked up, since reason codes are unique only within a given type. The yml documents six values for type: Service Credit, Cash Credit, Credit Memo, Rebill, Write Off, and Refund. This example uses Service Credit, meaning the reason code shown applies to service credit transactions; the other five values apply the same lookup to their respective transaction categories.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"created_by": "jsmith",
"created_date": {
"date": "2024-03-11 09:20:00.000000",
"timezone_type": 3,
"timezone": "America/Los_Angeles"
},
"updated_by": "jsmith",
"updated_date": {
"date": "2025-11-02 14:05:30.000000",
"timezone_type": 3,
"timezone": "America/Los_Angeles"
},
"reason_code_name": "Service Outage Credit",
"is_active": 1,
"on_acct_credit_flag": 1,
"debit_gl_code": "4100-SVC",
"credit_gl_code": "2200-UNAPP",
"allow_time_restrictions": "true",
"allow_plan_restrictions": "true",
"record_service_credit_transactions": "net",
"record_liability": 0
}
An error_code of zero and an error_msg of “OK” indicate that the reason code’s configuration was retrieved successfully. The created_date and updated_date fields are each a single object holding a date, a timezone_type, and a timezone, rather than an array, since a reason code has exactly one creation record and one most recent update record. An is_active value of one means the reason code is currently displayed to customer service representatives. An on_acct_credit_flag value of one means the debit_gl_code and credit_gl_code shown are the general ledger accounts used for this reason code, rather than accounts derived from the originating transaction. A record_liability value of zero means this reason code does not begin accounting treatment at issuance, so this example leaves out expense_gl_code, unapplied_sc_gl_code, canceled_sc_gl_code, and expired_sc_gl_code, which the yml documents as mandatory only when record_liability equals one.