set_company_profile_m Sample Call and Response
This example shows a client updating its company profile in Aria, including the primary address, a general contact, a separate billing contact, and the value-added tax, hereafter VAT, registration number used for electronic invoicing. It is based on the set_company_profile_m method as defined in methods_m_r73.yml, Admin Tools API.
This example updates the fields a client typically maintains for correspondence and e-invoicing purposes. It does not cover every field the method accepts, such as batch job alert contacts, and it does not cover locale-specific translation of these values.
Sample call
{
"rest_call": "set_company_profile_m",
"output_format": "json",
"client_no": 10023,
"auth_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6",
"domain": "acmewidgets.com",
"address1": "500 Market Street",
"city": "San Francisco",
"state_prov": "CA",
"country": "US",
"postal_code": "94105",
"phone": "4155550100",
"contact": "Dana Whitfield",
"contact_email": "dana.whitfield@acmewidgets.com",
"billing_contact": "Marcus Yee",
"billing_address1": "500 Market Street, Suite 900",
"billing_city": "San Francisco",
"billing_state": "CA",
"billing_zip": "94105",
"billing_country": "US",
"billing_email": "billing@acmewidgets.com",
"vat_registration_no": "GB123456789"
}
The rest_call and output_format fields are not part of the method’s own documented arguments. The REST layer adds them to every call: rest_call names the method being invoked, and output_format requests a JSON response rather than the default WDDX format. Within the method’s own arguments, client_no and auth_key identify and authenticate the client making the call. Every remaining field in this method is optional, so this example supplies a coherent subset: the company’s primary address and domain, a general contact with an email address, a separate billing contact with its own address, and vat_registration_no, the VAT registration number Aria uses for e-invoicing. Fields such as address2, locality, contact_address1, contact_address2, contact_locality, billing_address2, billing_locality, batch_job_alert_contact, batch_job_alert_email, locale_no, and locale_name are left out of this example because they are not needed to tell this particular story, though the method accepts them.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"client": {
"client_name": "Acme Widgets, Inc.",
"domain": "acmewidgets.com",
"address1": "500 Market Street",
"city": "San Francisco",
"state_prov": "CA",
"country": "US",
"postal_code": "94105",
"phone": "4155550100",
"contact": "Dana Whitfield",
"contact_email": "dana.whitfield@acmewidgets.com",
"billing_contact": "Marcus Yee",
"billing_address1": "500 Market Street, Suite 900",
"billing_city": "San Francisco",
"billing_state": "CA",
"billing_zip": "94105",
"billing_country": "US",
"billing_email": "billing@acmewidgets.com",
"vat_registration_no": "GB123456789"
}
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria updated the company profile successfully. The client object echoes back the values now on file, including client_name, which Aria maintains separately from this call and returns for confirmation even though set_company_profile_m does not accept it as an input. The client object is a single object, not a repeatable array, because a client account has exactly one company profile. This example leaves out address2, locality, contact_address1, contact_address2, contact_locality, billing_address2, billing_locality, batch_job_alert_contact, batch_job_alert_email, locale_no, and locale_name from the response, matching the fields left out of the call.