Skip to main content
Aria Knowledge Central

get_gl_code_info_m Sample Call and Response

This example retrieves the General Ledger (GL) code values configured for two specific financial transaction types, based on the get_gl_code_info_m definition in methods_m_r73.yml.

This example covers filtering the request to a small set of financial transaction types and the resulting debit and credit GL code values for each type. It does not cover the case of omitting the filter array entirely, which returns the GL code values for every financial transaction type configured in the system.

Sample call

{
  "rest_call": "get_gl_code_info_m",
  "output_format": "json",
  "client_no": 12345,
  "auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
  "financial_transaction_type_array": [
    {
      "financial_transaction_type": 1
    },
    {
      "financial_transaction_type": 20
    }
  ]
}

The rest_call and output_format fields are envelope fields added by the REST layer rather than arguments defined in the yml file. Client_no and auth_key are required on every Admin Tools API call. Financial_transaction_type_array is an optional array of objects, each containing one financial_transaction_type number; this example requests GL code information for two Aria-assigned transaction types, 1 and 20. Leaving this array blank, as the yml file description notes, causes the method to return GL code values for all financial transaction types.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "gl_code": [
    {
      "financial_transaction_type": 1,
      "financial_transaction_type_description": "Invoice Charge",
      "debit_value": "4000-REV",
      "credit_value": "4000-REV-CR"
    },
    {
      "financial_transaction_type": 20,
      "financial_transaction_type_description": "Credit Memo Issued",
      "debit_value": "4100-CM",
      "credit_value": "4100-CM-CR"
    }
  ]
}

An error_code of 0 with error_msg of "OK" indicates the lookup succeeded. Each entry in the gl_code array corresponds to one of the requested financial transaction types and reports its description along with the debit_value and credit_value GL code segments that Aria appends to every transaction of that type when posting to the general ledger. This example shows two representative entries because the request filtered to two transaction types; a request with no filter array would return one entry for every financial transaction type configured in the system.

TOP
  • Was this article helpful?