get_company_profile_m Sample Call and Response
This example shows an administrative client retrieving the company profile on file for client number 400218, a United Kingdom-based company, based on the get_company_profile_m method defined in methods_m_r73.yml.
This example includes a realistic subset of the company, contact, and billing contact fields the method can return, including the VAT registration number used for electronic invoicing. It does not include every optional field defined in the yml, such as the fields intended for countries that use a state or province (this company's country uses locality instead), which are left null or absent in this example.
Sample call
{
"rest_call": "get_company_profile_m",
"output_format": "json",
"client_no": 400218,
"auth_key": "7f3a9c1d2e4b5f6a8c9d0e1f2a3b4c5d"
}
The call takes only client_no and auth_key. This method accepts no filtering arguments; it always returns the single company profile on file for the requesting client.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"client": {
"client_name": "Cloudline Media Ltd",
"domain": "cloudlinemedia.co.uk",
"address1": "14 Riverside Way",
"address2": "Floor 3",
"city": "London",
"locality": "Greater London",
"country": "GB",
"postal_code": "EC1A 1BB",
"phone": "+44 20 7946 0958",
"contact": "Priya Nandakumar",
"contact_phone": "+44 20 7946 0912",
"contact_email": "priya.nandakumar@cloudlinemedia.co.uk",
"billing_contact": "Accounts Payable",
"billing_address1": "14 Riverside Way",
"billing_city": "London",
"billing_locality": "Greater London",
"billing_country": "GB",
"billing_zip": "EC1A 1BB",
"billing_email": "ap@cloudlinemedia.co.uk",
"batch_job_alert_contact": "Marcus Whitfield",
"batch_job_alert_email": "it-alerts@cloudlinemedia.co.uk",
"client_locale_name": "en_GB",
"vat_registration_no": "GB123456789"
}
}
An error_code of zero with an error_msg of “OK” indicates the request succeeded. The yml marks the client field with struct: single, so the response returns one company profile object rather than an array. Only client_name is formally required (nullable: false); every other field shown is optional and populated here to tell a coherent story about a single United Kingdom-based client. Fields left out of this example include state_prov and the parallel contact_state and billing_state fields (not applicable outside countries that use states or provinces), address2 fields for the billing and contact blocks, and contact_address1 and contact_address2, all of which are optional and simply not populated for this client.