Skip to main content
Aria Knowledge Central

get_account_status_history_m Sample Call and Response

This example queries for the status-change history of a specific account since the start of the current year, based on the get_account_status_history_m method defined in app_m_r73.yml for the Object Query API.

This example includes every required argument, along with a query_string built from queryable fields that narrows the search to one account and a recent date range, and a representative pair of status-change entries. It does not attempt to show every field this method can return.

Sample call

{
  "rest_call": "get_account_status_history_m",
  "output_format": "json",
  "client_no": 60214,
  "auth_key": "3f9c2b7a-91de-4a2c-88fb-4e6d0a5c7f21",
  "query_string": "acct_no = 30182034 AND change_date >= \"2026-01-01\"",
  "limit": 10,
  "offset": 0
}

client_no and auth_key are required identifiers, and query_string is also required for this method, since the shared param_defaults definition marks it nullable false. The query_string in this example uses acct_no and change_date, both of which carry queryable true directly under account_status_history; other legal filter fields include user_id, company_name, account_creation_date, new_status, and old_status. output_format and rest_call are envelope fields added by the REST gateway rather than being part of the method's own documented arguments. limit and offset are optional paging controls.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "starting_record": 0,
  "total_records": 3,
  "account_status_history": [
    {
      "acct_no": "30182034",
      "user_id": "jrivera_novara",
      "company_name": "Novara Outfitters LLC",
      "account_creation_date": "2023-04-11",
      "plan_no": "140",
      "old_status": "Active",
      "old_status_cd": 1,
      "new_status": "Suspended - Non-Payment",
      "new_status_cd": 4,
      "change_date": "2026-02-18",
      "comments": "Automatic suspension after failed dunning attempt."
    },
    {
      "acct_no": "30182034",
      "user_id": "jrivera_novara",
      "company_name": "Novara Outfitters LLC",
      "account_creation_date": "2023-04-11",
      "plan_no": "140",
      "old_status": "Suspended - Non-Payment",
      "old_status_cd": 4,
      "new_status": "Active",
      "new_status_cd": 1,
      "change_date": "2026-03-02",
      "comments": "Reinstated after outstanding balance was collected."
    }
  ]
}

An error_code of zero with an error_msg of "OK" indicates the query succeeded. total_records is set to three to show that this account has more status-change history within the queried date range than this example displays; only the first two entries are shown in account_status_history, and the real array would continue with a third change. The first entry shows the account being suspended for non-payment, and the second shows it being reinstated to active status two weeks later. This example leaves out promo_cd and client_1, since neither status change in this story involved a promotion code or a client-defined field value. The deprecated username and password arguments, which carry a deprecate_version of 5.6 in the shared param_defaults block, are also omitted, since a current integration should not rely on them.

TOP
  • Was this article helpful?