Skip to main content
Aria Knowledge Central

get_account_details_m Sample Call and Response

This example queries for detailed account-level information for business accounts located in the United States, based on the get_account_details_m method defined in app_m_r73.yml for the Object Query API.

This example includes every required argument, along with a representative set of optional filters and returned fields that together tell one coherent story: a search for active, non-consumer accounts in the United States. It does not attempt to show every field this method can return, particularly the account contact-matching fields and legal entity fields, which are called out explicitly below.

Sample call

{
  "rest_call": "get_account_details_m",
  "output_format": "json",
  "client_no": 60214,
  "auth_key": "3f9c2b7a-91de-4a2c-88fb-4e6d0a5c7f21",
  "query_string": "country_cd = \"USA\" AND consumer_acct_ind = \"0\"",
  "limit": 10,
  "offset": 0
}

The envelope fields rest_call and output_format are added by the REST gateway rather than being part of the method's own documented arguments; output_format also happens to be a real, documented field in this method family's shared param_defaults block, an optional string that defaults to wddx, and json is one of its documented enum values. 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 is built only from fields that this method's own returns section marks queryable true at some nesting depth: country_cd and consumer_acct_ind both carry queryable true directly under account_details_m. limit and offset are optional paging controls; leaving offset at zero means the query starts from the first matching record.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "starting_record": 0,
  "total_records": 3,
  "account_details_m": [
    {
      "acct_no": 30182034,
      "client_acct_id": "ACCT-10493",
      "user_id": "jrivera_novara",
      "first_name": "Jonah",
      "last_name": "Rivera",
      "company_name": "Novara Outfitters LLC",
      "address1": "482 Foundry Street",
      "city": "Austin",
      "state_prov_cd": "TX",
      "country_cd": "USA",
      "postal_cd": "78701",
      "phone": "5125550148",
      "email": "jonah.rivera@novaraoutfitters.com",
      "status_cd": "A",
      "consumer_acct_ind": "0",
      "acct_currency": "USD",
      "acct_balance": "428.55",
      "po_num": "PO-88213",
      "surcharge_no": [1044, 1091],
      "billing_groups": [
        {
          "billing_group_no": "8801",
          "billing_group_name": "Primary Billing",
          "client_billing_group_id": "BG-NOVARA-01",
          "bg_list_start_master_file": 0,
          "primary_pay_method": 552910,
          "primary_pay_method_name": "Visa ending in 4477"
        }
      ],
      "master_plan_instances": [
        {
          "master_plan_instance_id": "9004471",
          "client_master_plan_instance_id": "MPI-NOVARA-01",
          "client_master_plan_id": "GOLD-PLAN",
          "master_plan_no": "140",
          "master_plan_instance_description": "Gold Support Plan",
          "dunning_group_no": 220,
          "dunning_group_name": "Standard Dunning",
          "po_num": "PO-88213",
          "coupon_cd": ["SAVE10FALL"],
          "supp_plans": [
            {
              "supp_plan_instance_no": "9004472",
              "client_supp_plan_id": "ADDON-STORAGE",
              "supp_plan_no": "141",
              "supp_plan_instance_description": "Additional Storage Add-on",
              "supp_plan_instance_status": "A"
            }
          ]
        }
      ]
    },
    {
      "acct_no": 30182099,
      "client_acct_id": "ACCT-10556",
      "user_id": "bharbor_media",
      "company_name": "Bright Harbor Media",
      "address1": "17 Lakeview Drive",
      "city": "Austin",
      "state_prov_cd": "TX",
      "country_cd": "USA",
      "postal_cd": "78704",
      "email": "billing@brightharbormedia.com",
      "status_cd": "A",
      "consumer_acct_ind": "0",
      "acct_currency": "USD",
      "acct_balance": "0.00",
      "billing_groups": [
        {
          "billing_group_no": "8850",
          "billing_group_name": "Primary Billing",
          "client_billing_group_id": "BG-BHM-01",
          "bg_list_start_master_file": 1,
          "primary_pay_method": 553102,
          "primary_pay_method_name": "ACH ending in 6620"
        }
      ]
    }
  ]
}

An error_code of zero with an error_msg of "OK" indicates the query succeeded. total_records is set to three to show that the query matched more accounts than this example displays; only the first two entries are shown in account_details_m, and the real array would continue with a third matching account. Within the first account, surcharge_no is represented as a flat array of numbers rather than an array of one-key objects, because the yml nests a scalar field of the same name directly under the surcharge_no field, which is this family's convention for "array of this scalar type"; the same pattern applies to coupon_cd under master_plan_instances, which is why it is shown as a flat array of strings. This example leaves out several optional returned fields and structures to keep the story focused: functional_acct_groups, collection_acct_groups, acct_supp_fields, collection_acct_groups, matching_contacts (the set of contact-matching identifier fields), legal_entity_no, legal_entity_name, client_legal_entity_id (all three of which are explicitly marked queryable false in the yml), and the address-verification and message-size fields. 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?