A Customer
represents a guest at a Trybe site.
A Customer
is created when a guest creates an account on a Trybe shopfront, places a booking, or is created manually in the Trybe app.
The ID of the customer.
first_name
The first name of the customer.
last_name
The last name of the customer.
full_name
The customer's full name
phone
The customer's phone number in E.164 format, or null
if not provided.
Whether the user has a password
dob
The customer's date of birth in YYYY-MM-DD format, or null
if not provided.
The ID of the brand this customer belongs to
The ID of the site this customer belongs to
stripe_id
The Stripe Customer ID for this customer
express_stripe_id
The Stripe Customer ID for this customer if they also exist in Trybe's legacy Stripe integration
email
The email address of the customer.
The case of the email address is not preserved, so you'll always see this in lowercase.
An array of labels associated with this customer
The preferred locale of the customer.
This must be one of the platform's supported locales, which can be retrieved using the listMetaSupportedLocales
endpoint.
locked_at
The datetime which the customer was locked, or null if it has not been locked.
The datetime which the customer was created
The datetime which the customer was last updated
deleted_at
The datetime which the customer was anonymised, or null if it has not been.
last_active_at
The datetime which the customer was last active
email_verified_at
The datetime which the customer verified their email address
last_check_in
A summary of the last check-in event associated with this customer, or null
if they have never checked-in.
avatar_id
The media ID of the customer's avatar, or null
if one hasn't been provided.
avatar
The media object of the customer's avatar, or null
if one hasn't been provided.
external_ref
An external reference for this customer.
""
getCustomerStats
Use this endpoint to retrieve high-level stats for a single customer.
customerId
The ID of the customer being accessed.
{
"data": {
"totals": {
"total_order_value": 38500,
"average_order_value": 19250,
"num_orders": 2
},
"recent_orders": []
},
"meta": {
"currency": "gbp"
}
}
{
"message": "The requested resource could not be found"
}
listCustomers
This endpoint lists the Customer
s which are associated to the provided site.
Filters customers with a similar name, email or phone number to the given value
Filter customers with the given email address
Filter customers that belong to the given organisation ID
Filter customers that belong to the given brand ID
Filter customers that belong to the given site ID
Filter customers that have a membership with the given membership number
Filter customers with a similar name to the given value
Filter customers with the given phone number
Filter customers that have at least one membership of the given state. Set to "none" to filter customers that do not have any memberships, "any" to filter customers that have any memberships, and "needs_dd_mandate" for memberships awaiting a Direct Debit mandate or payment method.
Filters customers which have at least one membership that was created on or after the given date
Filters customers which have at least one membership that was created on or before the given date
Filters customers which have at least one membership of the given membership type ID
Filters customers which have at least one membership of the given membership rate ID
Filters customers who are opted into the given marketing preference ID. Alternatively, pass "any" to filter customers opted into any marketing preference, or "none" to filter customers not opted into any preferences.
Filters customers which have the given CustomerLabel ids.
Filters to just the customers with the given IDs.
page
The page to retrieve results from
per_page
The number of results to return per page
The Customer
s were successfully retrieved
{
"data": [
{
"id": "2e12dd9b-e723-0798-2adf-b9bc3abb5b6d",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1944-02-01",
"brand_id": "02096152-2de2-4c47-5c04-3c4be571a741",
"site_id": "beb4e162-6fe1-2c37-330b-0a03c1ef62fc",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [],
"preferred_locale": "en",
"locked_at": "1958-06-17T20:05:17.0Z",
"created_at": "1952-05-10T03:43:40.0Z",
"updated_at": "1935-04-14T18:11:34.0Z",
"deleted_at": "1930-08-04T11:50:39.0Z",
"last_active_at": "1896-04-20T04:08:43.0Z",
"email_verified_at": "1939-09-17T11:29:53.0Z",
"last_check_in": {
"checked_in_at": "1893-06-15T23:08:57.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "9fa0cb85-b855-0359-9b97-53726c9ff494",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "officia aute in magna"
}
],
"meta": {
"from": 1,
"to": 2,
"total": 2,
"current_page": 1,
"last_page": 2,
"per_page": 15,
"path": "http://example.com/api"
},
"links": {
"first": "http://example.com?page=1",
"next": "https://example.com?page=3",
"prev": "https://example.com?page=1",
"last": "https://example.com?page=4"
}
}
createCustomer
Use this endpoint to create a new Customer
.
When creating a new Customer
, you must specify at least one of the following fields along with any other fields marked as required:
email
first_name
last_name
site_id
The ID of the site this customer belongs to
first_name
The first name of the customer.
last_name
The last name of the customer.
phone
The customer's phone number in E.164 format, or null
if not provided.
dob
The customer's date of birth in YYYY-MM-DD format, or null
if not provided.
email
The email address of the customer.
The case of the email address is not preserved, so you'll always see this in lowercase.
The customer's password. This must be at least 8 characters long
An array of marketing preference IDs to opt the customer in to
external_ref
An external reference for this customer.
The guestline reference for this customer.
The preferred locale of the customer.
This must be one of the platform's supported locales, which can be retrieved using the listMetaSupportedLocales
endpoint.
The Customer
was successfully retrieved
{
"data": {
"id": "97d1c44a-c840-524e-66eb-6dbf8954f866",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1935-03-05",
"brand_id": "1f075728-eb70-8746-ca2e-7f206fe839e4",
"site_id": "6a40c54b-2e80-2299-991f-ca7354b26c75",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "e8ee936d-eb4b-63d5-e2cc-cb63cc9b6cfb",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "74059cf6-00ba-4041-f011-d558d67b0bc2",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "5a781339-02da-9269-fe2c-5b0b9e295337",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "20b0c845-a177-986b-b6fe-ba2933bb6984",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "6e260405-6c0b-b46e-646b-28ebfc5f4e4e",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1967-04-23T07:08:41.0Z",
"created_at": "1937-11-27T10:15:15.0Z",
"updated_at": "1903-12-29T01:18:20.0Z",
"deleted_at": "1908-09-26T21:11:56.0Z",
"last_active_at": "1910-02-11T19:58:12.0Z",
"email_verified_at": "1956-08-12T06:09:42.0Z",
"last_check_in": {
"checked_in_at": "1940-04-22T22:20:43.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "2bc8dc51-2142-4e23-242a-fe0256a81135",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "sunt"
}
}
getCustomer
Use this endpoint to retrieve a Customer
by their ID.
customerId
The ID of the customer
{
"data": {
"id": "8746284f-78f0-3ab6-a5a5-8471759a6602",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1921-05-15",
"brand_id": "2c81ad48-21dd-a23a-1399-1648a88dcb8c",
"site_id": "f581d580-2798-a645-6377-9bb884c46b6e",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "de291fd6-8881-21c7-3dad-4de285010b13",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1969-04-20T04:03:13.0Z",
"created_at": "1944-05-14T07:32:33.0Z",
"updated_at": "1929-04-25T02:27:22.0Z",
"deleted_at": "1967-07-15T05:37:22.0Z",
"last_active_at": "1919-06-01T08:23:59.0Z",
"email_verified_at": "1919-05-21T17:50:59.0Z",
"last_check_in": {
"checked_in_at": "1961-02-02T05:35:09.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "3237a5dd-1c48-d986-5f0a-4315cce8c4c8",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "nostrud"
}
}
{
"message": "The requested resource could not be found"
}
updateCustomer
Use this endpoint to update an existing Customer
.
customerId
The ID of the customer
first_name
The first name of the customer.
last_name
The last name of the customer.
phone
The customer's phone number in E.164 format, or null
if not provided.
dob
The customer's date of birth in YYYY-MM-DD format, or null
if not provided.
The customer's password. This must be at least 8 characters long
external_ref
An external reference for this customer.
The preferred locale of the customer.
This must be one of the platform's supported locales, which can be retrieved using the listMetaSupportedLocales
endpoint.
{
"data": {
"id": "585f9956-02ed-ab2f-ce14-b5682e4628f2",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1944-08-28",
"brand_id": "7b2a24cd-eeea-5e69-1e3f-e21bbc33420d",
"site_id": "42e0c1ec-7a9d-0556-fbd0-81fdce2a7976",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "0b10e13e-2065-679a-af76-4835f6460417",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "b925e381-608d-b6a3-03e0-9fe43beef4d1",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1940-02-25T09:03:12.0Z",
"created_at": "1910-11-25T07:27:36.0Z",
"updated_at": "1951-06-05T03:41:51.0Z",
"deleted_at": "1908-05-18T17:22:26.0Z",
"last_active_at": "1916-10-11T20:45:40.0Z",
"email_verified_at": "1941-09-03T22:43:39.0Z",
"last_check_in": {
"checked_in_at": "1930-09-17T08:54:34.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "693fd98a-d700-a98b-67f9-002c1b7b52fa",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "anim"
}
}
{
"message": "The requested resource could not be found"
}
getCustomerMemberships
Use this endpoint to retrieve a list of Membership
s for the given Customer
.
When retrieving memberships with this endpoint, the next_charge
property will be populated if applicable.
customerId
The ID of the customer
{
"data": [],
"meta": {
"from": 1,
"to": 2,
"total": 2,
"current_page": 1,
"last_page": 2,
"per_page": 15,
"path": "http://example.com/api"
},
"links": {
"first": "http://example.com?page=1",
"next": "https://example.com?page=3",
"prev": "https://example.com?page=1",
"last": "https://example.com?page=4"
}
}
{
"message": "The requested resource could not be found"
}
actionLockCustomer
Use this endpoint to lock a Customer
.
When a customer is locked, their details cannot be modified until their profile is unlocked.
Any requests to updateCustomer
or anonymiseCustomer
will fail with a 400
response.
customerId
The ID of the customer
{
"data": {
"id": "28215d0f-c259-5c5a-dfc2-19576306a3f4",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1928-03-27",
"brand_id": "aba1174a-c81e-2d35-c3d9-b51b3b04209c",
"site_id": "53d19a07-9bac-f918-5e83-849d08507771",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "adeae370-d1e5-b04c-e36c-136cab5b97db",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1960-04-13T15:55:04.0Z",
"created_at": "1928-08-06T14:30:16.0Z",
"updated_at": "1952-04-07T08:29:10.0Z",
"deleted_at": "1921-10-28T19:24:24.0Z",
"last_active_at": "1891-12-16T23:35:45.0Z",
"email_verified_at": "1968-08-11T05:23:33.0Z",
"last_check_in": {
"checked_in_at": "1925-08-03T17:16:48.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "a74d9a22-7b5c-3d40-6b2f-1274fc406f35",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "nisi velit"
}
}
{
"message": "The requested resource could not be found"
}
actionUnlockCustomer
Use this endpoint to unlock a Customer
.
customerId
The ID of the customer
{
"data": {
"id": "090760c1-5590-e2dd-d01d-4716c1167e69",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1927-06-26",
"brand_id": "e6bf0813-1d6c-5ca6-cce7-0673916d88cd",
"site_id": "f03b0cf3-9965-d25c-83f8-2227f5770ff6",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "993dbffe-7842-7084-88bf-6b7e983fa452",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1935-03-16T11:19:09.0Z",
"created_at": "1952-04-24T16:29:03.0Z",
"updated_at": "1907-03-02T17:02:40.0Z",
"deleted_at": "1931-10-21T04:15:12.0Z",
"last_active_at": "1948-02-22T01:01:56.0Z",
"email_verified_at": "1949-12-19T19:06:39.0Z",
"last_check_in": {
"checked_in_at": "1892-11-17T18:54:35.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "942ed0b6-d280-2ed4-aa03-576a89bcb97d",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "id enim commodo est"
}
}
{
"message": "The requested resource could not be found"
}
actionTriggerCustomerPasswordReset
Use this endpoint to trigger a password reset for a Customer
.
The customer will receive a URL via email which they can use to reset their password.
The URL will be valid for 1 hour.
customerId
The ID of the customer
{
"data": {
"id": "f93c3e6c-bc40-6360-7895-8f57905292c3",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1895-03-07",
"brand_id": "f436b2b7-4904-bdfd-de37-3b7842695e19",
"site_id": "b7122b6e-1d29-d396-888a-e1b66c43ef00",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "d5edef87-1ca6-feff-2045-781fedd44dd1",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "36eb6996-b620-658e-38b8-8233bae581cd",
"value": "VIP",
"colour": "ff6634"
},
{
"id": "6cae3dc9-8bdb-b1e6-f4ff-42389043bbd3",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1962-01-28T07:29:12.0Z",
"created_at": "1952-03-29T06:56:16.0Z",
"updated_at": "1930-03-06T23:35:37.0Z",
"deleted_at": "1911-12-24T03:01:42.0Z",
"last_active_at": "1938-01-02T17:25:46.0Z",
"email_verified_at": "1923-01-07T11:18:02.0Z",
"last_check_in": {
"checked_in_at": "1903-08-07T21:16:08.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "266ac382-f945-425c-066a-9fb1e173a9a8",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "commodo irure Duis Ut proident"
}
}
{
"message": "The requested resource could not be found"
}
actionResendCustomerVerification
Use this endpoint to resend the email verification email for a Customer
.
The customer will receive a URL via email which they can use to verify their email address.
customerId
The ID of the customer
{
"data": {
"id": "3213f5f2-a2c7-0a53-b0a2-507d0f3cdc12",
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"phone": "+447900000000",
"has_password": true,
"dob": "1909-08-13",
"brand_id": "5dae53e4-09b7-c01a-a4fa-8fa946e8a3a1",
"site_id": "523ae257-fc71-8982-e9e7-da9b62865e99",
"stripe_id": "cus_1234567890",
"express_stripe_id": "cus_1234567890",
"email": "janedoe@example.com",
"labels": [
{
"id": "9eef7b33-6575-9d0c-7195-c28577a8d9e2",
"value": "VIP",
"colour": "ff6634"
}
],
"preferred_locale": "en",
"locked_at": "1930-04-15T01:27:36.0Z",
"created_at": "1946-11-22T22:04:17.0Z",
"updated_at": "1898-10-25T21:05:01.0Z",
"deleted_at": "1938-09-27T01:43:42.0Z",
"last_active_at": "1925-07-12T18:43:27.0Z",
"email_verified_at": "1969-07-07T17:59:01.0Z",
"last_check_in": {
"checked_in_at": "1954-02-08T20:02:05.0Z",
"method": "Scanned"
},
"avatar_id": "000000-000000-000000-000000",
"avatar": {
"id": "f652ca80-6362-18a6-e1dd-ebde8e6dab4b",
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo.jpg"
},
"external_ref": "dolore deserunt enim"
}
}
{
"message": "The requested resource could not be found"
}