Skip to main content
Aria Knowledge Central

get_acct_contacts_m Sample Call and Response

This example retrieves all of the contacts saved on an account, including contacts that are not currently used as the account, billing, backup, or statement contact. It is based on the get_acct_contacts_m method definition in plsql_m_r73.yml.

This example includes every required field along with the include_unused_contacts field. It leaves out the optional billing_group_no filter, which is described in the prose notes below.

Sample call

{
  "rest_call": "get_acct_contacts_m",
  "output_format": "json",
  "client_no": 6423,
  "auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
  "acct_no": 3300481,
  "include_unused_contacts": 1
}

The rest_call and output_format fields are added by the REST gateway that fronts every Aria Billing Cloud Core API method, not by the method itself. The acct_no field identifies the account whose contacts you retrieve; this example uses the Aria-assigned numeric identifier rather than its alternative, client_acct_id. This example omits billing_group_no (and its alternative, client_billing_group_id), so Aria returns contacts across every billing group on the account rather than one specific billing group. Setting include_unused_contacts to one, rather than the default of zero, tells Aria to also return contacts saved on the account that are not currently serving as the account contact, a billing contact, a backup contact, or a statement contact.

Sample response

{
  "error_code": 0,
  "error_msg": "OK",
  "account_contact": {
    "contact_no": 550021,
    "first_name": "Elena",
    "last_name": "Martins",
    "company_name": "Martins Consulting LLC",
    "address1": "482 Birchwood Lane",
    "city": "Austin",
    "state_prov": "TX",
    "country_cd": "US",
    "postal_cd": "78701",
    "phone": "512-555-0134",
    "email": "elena.martins@martinsconsulting.com"
  },
  "billing_contacts": [
    {
      "bill_contact_no": 550022,
      "bill_first_name": "Elena",
      "bill_last_name": "Martins",
      "bill_company_name": "Martins Consulting LLC",
      "bill_address1": "482 Birchwood Lane",
      "bill_city": "Austin",
      "bill_state_prov": "TX",
      "bill_country": "US",
      "bill_postal_cd": "78701",
      "bill_phone": "512-555-0134",
      "bill_email": "billing@martinsconsulting.com",
      "bill_billing_group_no": 771002,
      "bill_client_billing_group_id": "BG-HQ-001"
    },
    {
      "bill_contact_no": 550050,
      "bill_first_name": "Raj",
      "bill_last_name": "Chandran",
      "bill_company_name": "Martins Consulting LLC - West Region",
      "bill_address1": "17 Harbor View Drive",
      "bill_city": "San Diego",
      "bill_state_prov": "CA",
      "bill_country": "US",
      "bill_postal_cd": "92101",
      "bill_phone": "619-555-0177",
      "bill_email": "rchandran@martinsconsulting.com",
      "bill_billing_group_no": 771015,
      "bill_client_billing_group_id": "BG-WEST-002"
    }
  ],
  "backup_contacts": [
    {
      "bkup_contact_no": 550033,
      "bkup_first_name": "Priya",
      "bkup_last_name": "Nair",
      "bkup_company_name": "Martins Consulting LLC",
      "bkup_address1": "482 Birchwood Lane",
      "bkup_city": "Austin",
      "bkup_state_prov": "TX",
      "bkup_country": "US",
      "bkup_postal_cd": "78701",
      "bkup_phone": "512-555-0199",
      "bkup_email": "priya.nair@martinsconsulting.com",
      "bkup_billing_group_no": 771002,
      "bkup_client_billing_group_id": "BG-HQ-001"
    }
  ],
  "statement_contacts": [
    {
      "stat_contact_no": 550041,
      "stat_first_name": "Elena",
      "stat_last_name": "Martins",
      "stat_company_name": "Martins Consulting LLC",
      "stat_address1": "482 Birchwood Lane",
      "stat_city": "Austin",
      "stat_state_prov": "TX",
      "stat_country": "US",
      "stat_postal_cd": "78701",
      "stat_email": "billing@martinsconsulting.com",
      "stat_billing_group_no": 771002,
      "stat_client_billing_group_id": "BG-HQ-001"
    }
  ],
  "other_contacts": [
    {
      "other_contact_no": 550009,
      "other_first_name": "Thomas",
      "other_last_name": "Whitfield",
      "other_company_name": "Martins Consulting LLC",
      "other_city": "Austin",
      "other_country_cd": "US",
      "other_email": "twhitfield@martinsconsulting.com"
    }
  ]
}

An error_code value of zero and an error_msg value of "OK" together indicate that Aria retrieved the contacts successfully. The account_contact field is a single object, since an account has exactly one account contact at a time. The billing_contacts array shows two entries, one for each of two billing groups on the account; a real account could have more or fewer billing contacts depending on how many billing groups it has. The backup_contacts and statement_contacts arrays each show one entry here, and other_contacts, which only appears because include_unused_contacts was set to one, shows a single contact that is saved on the account but not currently linked to any billing group or role; any of these arrays could hold additional entries on a larger account. This example leaves out the deprecated address_verification_code field family on each contact type, and leaves out the error_details field entirely, since that field is for internal use only.

TOP
  • Was this article helpful?