Skip to main content
Aria Knowledge Central

get_account_plan_history_m Sample Call and Response

This example queries for the plan-change history of a specific plan instance, based on the get_account_plan_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 plan instance, and a representative pair of history entries. It does not attempt to show every combination of old and new plan attributes this method can return.

Sample call

{
  "rest_call": "get_account_plan_history_m",
  "output_format": "json",
  "client_no": 60214,
  "auth_key": "3f9c2b7a-91de-4a2c-88fb-4e6d0a5c7f21",
  "query_string": "plan_instance_no = 8823001",
  "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 plan_instance_no, which carries queryable true directly under account_plan_history_m; other legal filter fields include client_plan_instance_id, master_plan_instance_no, mp_client_plan_instance_id, old_plan_no, and new_plan_no. 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_plan_history_m": [
    {
      "plan_instance_no": 8823001,
      "client_plan_instance_id": 550214,
      "master_plan_instance_no": 8823000,
      "mp_client_plan_instance_id": 550213,
      "old_plan_name": "Standard Support Plan",
      "old_plan_no": 210,
      "old_client_plan_id": "STD-SUPPORT",
      "old_promo_cd": "WELCOME15",
      "old_status_cd": "A",
      "old_plan_units": 1,
      "old_rate_schedule_no": 4401,
      "new_plan_name": "Gold Support Plan",
      "new_plan_no": 140,
      "new_client_plan_id": "GOLD-PLAN",
      "new_promo_cd": "SAVE10FALL",
      "new_status_cd": "A",
      "new_plan_units": 1,
      "new_rate_schedule_no": 4415,
      "old_dunning_state": 0,
      "new_dunning_state": 0
    },
    {
      "plan_instance_no": 8823001,
      "client_plan_instance_id": 550214,
      "master_plan_instance_no": 8823000,
      "mp_client_plan_instance_id": 550213,
      "old_plan_name": "Gold Support Plan",
      "old_plan_no": 140,
      "old_client_plan_id": "GOLD-PLAN",
      "old_status_cd": "A",
      "old_plan_units": 1,
      "old_rate_schedule_no": 4415,
      "new_plan_name": "Gold Support Plan",
      "new_plan_no": 140,
      "new_client_plan_id": "GOLD-PLAN",
      "new_status_cd": "A",
      "new_plan_units": 2,
      "new_rate_schedule_no": 4415,
      "old_dunning_state": 0,
      "new_dunning_state": 0
    }
  ]
}

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 plan instance has more change history than this example displays; only the first two entries are shown in account_plan_history_m, and the real array would continue with a third history entry. The first entry shown is an upgrade from the Standard Support Plan to the Gold Support Plan, and the second is a later change in plan units on the same Gold Support Plan, from one unit to two. Fields such as old_client_plan_instance_id and new_client_plan_instance_id, which would only be populated if the client-defined plan instance identifier itself changed, are left out of this example since neither change involved a new plan instance identifier. 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?