API | Accounts Endpoint
An account represents a business or organization. Accounts can have multiple contacts under them and one primary contact. It is worth noting that every Account does not have to have a Contact assigned to it; however, every Contact does need to be assigned to an Account.
Account Fields Overview
Below you will find a comprehensive list of the fields within the Accounts Endpoint. The order displayed below is representative of the order in which they are displayed within a response body of a standard GET request.
Field Name | Description | Response Example - Key | Value |
“id” | The ID Number for the Account. | “Id”: (Numerics), |
“name” | The Full Name of the Account. | “name”: “(Alphanumerics)”, |
“description” | The description of the Account. *Information in this field will be displayed under “Additional Information” in-app. |
“description”: “(Alphanumerics)”, |
“owned_by” | The ID number of the Tripleseat User who owns this particular Account. | “owned_by”: (Numerics), |
“created_at” | The Date and Timestamp for when the Account was Created. | “created_at”: “MM/DD/YYYY HH:MM AM/PM”, |
“updated_at” | The Date and Timestamp for when the Account was last Updated. | “updated_at”: “MM/DD/YYYY HH:MM AM/PM”, |
“deleted_at” | The Date and Timestamp for when the Account was Deleted. | “deleted_at”: “MM/DD/YYYY HH:MM AM/PM”, |
“customer_id” | The ID number for the Customer that the Account belongs to. *For additional clarity, the Customer is a collection of all Sites and their associated Locations. Customer -> Site(s) -> Location(s) |
“customer_id”: (Numerics), |
“site_id” | The ID number for the Site that the Account belongs to within the Customer. | “site_id”: (Numerics), |
“websites” | Array | An array or “collection” of fields specific to the Websites associated with the Account. |
“websites”: [ { “id”: (Numerics), “url”: “(Alphanumerics) }, { ... } ] |
“market_segment” | This is to indicate what segment of the market the Account is. Examples of this would be Corporate, Social, Non-Profit, etc. *This field is a dropdown in-app and can have the displayed options adjusted in Settings -> Preferences. |
“market_segment”: “(Alphanumerics), |
“phone_numbers” | Array | An array or “collection” of assorted fields specific to the Phone Number(s) for the Account. |
“phone_numbers”: [ { “id”: (Numerics), “number: “(Alphanumerics)”, “phone_number_type”: “(Main/Mobile/Fax/Work/Home/Pager/Skype)”, “extension”: “(Alphanumerics)” }, |
“addresses” | Array | An array or “collection” of assorted fields specific to the Addresses for the Account. |
“addresses”: [ { “id”: (Numerics), “address1”: "(Alphanumerics)", “address2”: "(Alphanumerics)", “city”: "(Alphanumerics)", “state”: "(Alphanumerics)", “country”: "(Alphanumerics)", “zip_code”: "(Alphanumerics)", “address_type”: "(Alphanumerics)" }, {...} ], |
“custom_fields” | Array | An array or “collection” of assorted fields specific to the Custom Fields set on the Account level. |
“custom_fields”: [ { “id”: (Numerics), “custom_field_name”: “(Alphanumerics)”, “custom_field_id”: (Numerics), “custom_field_required”: (true/false), “custom_field_slug”: “(Alphanumerics)”, “value”: “(Alphanumerics)” }, {...} ], |
GET Request Examples:
You are able to pull this information via a GET request, as shown below:
GET https://api.tripleseat.com/v1/accounts.(XML | JSON)
This request will pull a paginated list of all Accounts.
GET https://api.tripleseat.com/v1/accounts/(Account_ID).(XML | JSON)
This request will pull Account information specific to the ID specified in the request URL.
Accounts Search:
GET https://api.tripleseat.com/v1/accounts/search.(XML | JSON)?query=(Search_Parameters)
This request will pull Account information for any records that match the queried parameters. When querying multiple parameters, you can append parameters together using a “&”.
Parameter | Value |
query | Name, Email Address, Phone Number |
order | created_at, updated_at, name |
sort_direction | desc, asc |
account_created_start_date | mm/dd/yyyy (Part of a range | Requires end date) |
account_created_end_date | mm/dd/yyyy (Part of a range | Requires start date) |
account_updated_start_date | mm/dd/yyyy (Part of a range | Requires end date) |
account_updated_end_date | mm/dd/yyyy (Part of a range | Requires start date) |
page |
(Numerics starting at 1) |
site_id |
numerics |
Example: ?page=1&query=mark&query=support@tripleseat.com
The above example would Search the Accounts list on Page 1, Name containing “mark”, and Email Address that is support@tripleseat.com
DELETE Request Example:
DELETE https://api.tripleseat.com/v1/accounts/(Account_ID).(XML | JSON)
This request will delete the Account identified by the Account ID in the request URL.
POST Request Examples:
Creating Accounts via the API can be done by either:
Appending the Account information to the end of the URL. This would look similar to the following.
POST https://api.tripleseat.com/v1/accounts.(XML | JSON)?account[name]=Tripleseat
Including the Account information in the Body of the Request. The following is the URL and the Body, which is in the JSON format.
POST https://api.tripleseat.com/v1/accounts.(XML | JSON)
{
"account": {
"name": "(Alphanumerics)"
}
}
Required Fields for creating an Account:
- “name”
- *“site_id”
* The “site_id” field is only required if there are multiple Sites within the Customer to specify which Site the Account should be created under. To include this information this can be done with the following formatting:
Appending the Account information to the end of the URL:
&site_id=(numerics)
Including the Account information in the Body of the Request:
{
"site_id": (Numerics),
"account": {
"name": "(Alphanumerics)"
}
}
PUT Request Examples:
Updating Accounts via the API require the Account ID be identified in the URL similar to the GET Example from earlier in this article. Once the URL is adjusted the update format can be done by either:
Appending the Account information that needs to be updated to the end of the URL. This would look similar to the following:
PUT https://api.tripleseat.com/v1/accounts/(Account_ID).(XML | JSON)?account[name]=Tripleseat&account[description]=Event Management Software
Including the Account information that needs to be updated in the Body of the Request. This would look similar to the following:
PUT https://api.tripleseat.com/v1/accounts/(Account_ID).(XML | JSON)
{
"account": {
"name": "(Alphanumerics)"
}
}
Comments
0 comments
Article is closed for comments.