API Reference - Client Locations

Client Locations are physical or logical "branches" of a client.  If you are looking for general information about the parent (root) client, the Client API Reference will provide this data. It is important to note that all clients have at least one location. 

Listing Client Locations

Returns a collection of client location records, optionally filtered by the available request parameters.

GET /api/v1/client/locations

 

Available Request Parameters:

Name Type Required Description
id integer no ID of the case.
name string no Name of the client.
parent integer no ID of the parent (root) client.
salesperson integer no ID of the default salesperson assigned to this client.
created_from timestamp no Created on or after the date.
created_to timestamp no Created on or before the date.
updated_from timestamp no Updated on or after the date.
updated_to timestamp no Updated on or before the date.

Note: All timestamp parameters are queried and returned in UTC.

Getting a Client Location

Returns a single client location record, based on the numeric ID.

GET /api/v1/client/locations/{client_location_id}

Creating a Client Location

Creates a new client location (i.e. a sub-client) based on the given criteria. Upon success, returns a client location object. See the example request at the bottom of this section for a better idea of how a fully formed request should look.

POST /api/v1/client/locations

Available Parameters

Name Type Required Description
root_id integer yes The ID of the parent client this location belongs to (See API Reference - Clients)
is_primary boolean no Indicates if this location should be the primary location for the specified client. Each client has only one primary location.
name string yes The name of this location or branch office. 
email_invoice email no An optional email address for delivering invoices and related communications.
address_1 string no Line one of the street address.
address_2 string no Line two of the street address.
address_3 string no Line three of the street address.
city string no City of the street address.
state string yes 2-character state or province code of the street address and location.
country string yes 2-character ISO country code of the street address and location.
phone_primary string no The primary phone number of the location.
phone_secondary string no The secondary phone number of the location.
phone_fax string no The fax number of the location.
policies_case string no Location specific policies for case handling.
policies_invoice string no Location specific policies for invoice handling.
policies_update string no Location specific policies for case update handling.
notes string no General notes regarding this location.

 

Example New Client Location Request

A new client location (sub-organization) is created by POSTing a JSON object to the specified end point using the above criteria.  The JSON object must contain the required fields (as shown above) and must be nested under a client_location object.  See the following example request:

{
"client_location": {
"root_id": 123,
"is_primary": true,
"name": "Main Office",
"policies_case": "These policies show up on a case.",
"policies_invoice": "These policies show up when creating an invoice.",
"policies_update": "These policies show up when sending an update.",
"country": "US",
"state": "CO",
"notes": "Created via the API"
}
}

Note: The above request is for demonstration purposes only, your implementation will require unique data provided by your account.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request