API | Contacts Endpoint
A contact represents an individual. When it comes to Contacts within Tripleseat, every Contact is associated with an Account. Should they have questions or need assistance, they are welcome to reach out to support@tripleseat.com
Contacts Fields Overview
Below you will find a comprehensive list of the fields within the Contacts 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 Contact. | “Id”: (Numerics), |
| “first_name” | The First Name of the Contact. | “first_name”: “(Alphanumerics)”, |
| “last_name” | The Last Name of the Contact. | “last_name”: “(Alphanumerics)”, |
| “account_id” | The ID of the Account that the Contact is associated with. | “account_id”: (Numerics), |
| “customer_id” | The ID of the Customer that the Contact is associated with. | “customer_id”: (Numerics), |
| “site_id” | The ID of the Site that the Contact is associated with. | “site_id”: (Numerics), |
| “title” | The Title of the Contact. | “title”: “(Alphanumerics)”, |
| “contact_type” | The relationship the individual has to their Account, Event, etc. on the Contact level. *This field is a dropdown in-app and can have the displayed options adjusted in Settings -> Preferences. An example of this would be a “Decision Maker” or “Owner” |
“contact_type”: “(Alphanumerics”, |
| “email_opt_in” | The Contact's decision to opt in/out from marketing or newsletter emails from the Venue. | “email_opt_in”: true/false, |
| “owned_by” | The ID of the User who owns this Contact within Tripleseat. | “owned_by”: (Numerics), |
| “created_at” | The Date and Timestamp for when the Contact was Created. | “created_at”: “MM/DD/YYYY HH:MM AM/PM”, |
| “updated_at” | The Date and Timestamp for when the Contact was last Updated. | “updated_at”: “MM/DD/YYYY HH:MM AM/PM”, |
| “deleted_at” |
The Date and Timestamp for when the Contact was deleted.
If “null” the Contact has yet to be deleted. |
“deleted_at”: “MM/DD/YYYY HH:MM AM/PM”, |
| “email_addresses” | Array | An array or “collection” of IDs and addresses specific to the Email Addresses associated with the Contact. |
“email_addresses”: [ { “id”: (Numerics), “address”: “(Alphanumerics)” }, {...} ], |
| “phone_numbers” | Array | An array or “collection” of assorted fields specific to the Phone Number(s) for the User. |
“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 Address(es) associated with the Contact. |
“addresses”: [ { “id”: (Numerics), “address1”: “(Alphanumerics)”, “address2”: “(Alphanumerics)”, “city”: “(Alphanumerics)”, “state”: “(Alphanumerics)”, “country”: “(Alphanumerics)”, “zip_code”: “(Alphanumerics)”, “address_type” “Main/Work/Home/Other” }, {...} ], |
| “custom_fields” | Array | An array or “collection” of assorted fields specific to the Custom Field(s) associated with the Contact. |
“custom_fields”: [ { “id”: (Numerics), “custom_field_name”: “(Alphanumerics)”, “custom_field_id”: (Numerics), “custom_field_required”: true/false, “custom_field_slug”: “(Alphanumerics)”, “value”: “(Alphanumerics)” } ] |
Request Examples:
You are able to pull this information via a GET request, as shown below:
GET https://api.tripleseat.com/v1/contacts.(XML | JSON)
This request will pull a paginated list of all Contacts.
GET https://api.tripleseat.com/v1/contacts/(Contact_ID).(XML | JSON)
This request will pull Contact information specific to the ID specified in the request URL.
Contacts Search:
GET https://api.tripleseat.com/v1/contacts/search.(XML | JSON)?query=(Search_Parameters)
This request will pull Contact information for any records that match the queried parameters. When query 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 |
| contact_created_start_date | mm/dd/yyyy (Part of a range | Requires end date) |
| contact_created_end_date | mm/dd/yyyy (Part of a range | Requires start date) |
| contact_updated_start_date | mm/dd/yyyy (Part of a range | Requires end date) |
| contact_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 Contact list on Page 1, First/Last Name containing “mark,” and Email Address that is support@tripleseat.com
DELETE Request Example:
DELETE https://api.tripleseat.com/v1/contacts/(Contact_ID).(XML | JSON)
This request will delete the Contact identified by the Contact ID in the request URL.
POST Request Examples:
Creating Contacts via the API can be done by either:
Appending the Contact information to the end of the URL. This would look similar to the following
POST https://api.tripleseat.com/v1/contacts.(XML | JSON)?contact[first_name]=Mark&contact[account_id]=26694634
Including the Contact information in the Body of the Request. The following is the URL and the Body, which is in the JSON format
{
"contact": {
"first_name": "(Alphanumerics",
"Account_id": (Numerics)
}
}
Required Fields for creating a Contact:
- “first_name”
- “account_id”
- * “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. This information should not be included within the Contact Array. This can be done with the following formatting:
Appending the Contact information to the end of the URL.
&site_id=SITE_ID_HERE
Including the Contact information in the Body of the Request.
{
“site_id”: (Numerics),
"contact": {
"first_name": "(Alphanumerics)",
"account_id": (Numerics)
}
}
PUT Request Examples:
Updating Contacts via the API require the Contact 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 Contact 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/contacts/(Contact_ID).(XML | JSON)?contact[first_name]=Marc&contact[last_name]=Laurence
Including the Contact 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/contacts/(Contact_ID).(XML | JSON)
{
"contact": {
"first_name": "(Alphanumerics)",
"last_name”": (Numerics)
}
}
Pro-tips:
Adding tasks to a Contact
add /tasks to your URL:
POST api.tripleseat.com/v1/contacts/{contact_id}/tasks.json
All the following key/value pairs are required to create a task on a contact, example payload below:
{
"body": "This is a test task",
"due_date": "String", // Date/time in ISO 8601 format,
"priority": integer, // (1 = Low, 2 = Medium, 3 = High)
"task_type_id": integer, // unique ID for the desired task type (See Sites API)
"assignee_ids": [], // array containing comma separated User IDs that should be assigned the task (See Users API)
"site_id": integer, // unique ID for the site the event belongs to
}Please note: At this time, there is no way to retrieve or update tasks associated to an contact via GET/PUT.