Clients are objects that store general information about top level "parent" clients. If you are looking for specific information, such as addresses and phone numbers, Client Locations will provide this data.
Listing Clients
Returns a collection of client records, optionally filtered by the available request parameters.
GET /api/v1/clients
Available Request Parameters:
Name | Type | Required | Description |
id | integer | no | ID of the case. |
name | string | no | Name of the 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
Returns a single client record, based on the numeric ID.
GET /api/v1/clients/{client_id}
Creating a Client
Creates a new client (i.e. an organization) based on the given criteria. Upon success, returns a client 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/clients
Available Parameters
Name | Type | Required | Description |
name | string | yes | The name of the client |
account_code | string | no | An internal client ID or other reference number. |
website | string | no | The fully qualified url to the client's website. |
email_invoice | string | no | The email address for all client-related billing communication. |
policies_case | string | no | Client specific case handling policies. |
policies_invoice | string | no | Client specific invoice handling policies. |
policies_update | string | no | Client specific case update handling policies. |
notes | string | no | General notes regarding the client. |
has_invoice_reminders | boolean | no | Indicates whether or not the client will receive overdue invoice reminders. |
show_location_on_invoice | boolean | no | Indicates whether or not to display the client location name (e.g. "Main Location") on invoices generated for this client. |
primary_location | object | yes | The primary location for this client (see available primary_location parameters below). |
Available "primary_location" Parameters
Name | Type | Required | Description |
name | string | yes | The name of this location or branch office. |
email_invoice | 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 Request
A new client (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 object. See the following example request:
{
"client": {
"name": "ACME Client",
"website": "https://example.com",
"policies_case": "No subject contact on cases for this client.",
"policies_invoice": "Cannot bill more than 20 miles per day.",
"policies_update": "Do not include PII in case updates.",
"has_invoice_reminders": true,
"show_location_on_invoice": true,
"notes": "VIP client",
"primary_location": {
"name": "Main Location",
"email_invoice": "billing@example.com",
"phone_primary": "555-555-5555",
"phone_secondary": "555-555-5555",
"phone_fax": "555-555-5555",
"address_1": "123 Main Street",
"address_2": "STE 123",
"city": "Denver",
"state": "CO",
"zip": 80202,
"country": "US"
}
}
}
Note: The above request is for demonstration purposes only, your implementation will require unique data provided by your account.