create_service_location_m Sample Call and Response
This example shows a client creating a new service location that Aria can use as the origin address for tax purposes. It is based on the create_service_location_m method as defined in methods_m_r73.yml, Admin Tools API.
This example includes every required field, plus a representative set of optional address fields for a location in the United States. It does not attempt to show every address field the method accepts, such as the secondary and tertiary address lines or the locality field used for countries outside the United States, Australia, and Canada.
Sample call
{
"rest_call": "create_service_location_m",
"output_format": "json",
"client_no": 700123,
"auth_key": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"client_svc_location_id": "LOC-AUSTIN-01",
"svc_location_name": "Austin Distribution Center",
"svc_location_company_name": "Aria Sample Manufacturing, Inc.",
"svc_location_address1": "500 Congress Avenue",
"svc_location_city": "Austin",
"svc_location_state_prov": "TX",
"svc_location_country": "US",
"svc_location_postal_cd": "78701"
}
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. The three required fields are svc_location_name, svc_location_state_prov, and svc_location_country. The method notes that svc_location_state_prov is required specifically because the location is in the United States, Australia, or Canada; svc_location_country takes the uppercase, two-character International Organization for Standardization country code, here "US" for the United States. This example also supplies client_svc_location_id, a client-defined identifier for the location, along with the company name, first address line, city, and postal code.
Sample response
{
"error_code": 0,
"error_msg": "OK",
"svc_location_no": 30045
}
An error_code of zero, paired with an error_msg of “OK,” indicates that Aria created the service location successfully. The svc_location_no field returns the Aria-assigned unique identifier for the new location, which a subsequent call could reference, for example when creating a service tied to this location with create_service_m. The method’s returns block consists only of these three fields, so there is no additional output to show.