This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.
To add a customer record to a restaurant and its restaurant group
you send a POST
request to the
/crm/v1/customers
endpoint of the CRM API. The
POST
request to the customers endpoint creates a
customer record and returns a JSON Customer
object containing
the new customer information.
Before you add a customer record, you must make sure that the Toast POS does not have an existing customer record for the customer. The customers endpoint will create a new customer record each time you submit a successful POST request. To avoid duplicate customer records for the same restaurant customer you must:
Before creating a new guest record
-
Search for an existing customer record for the restaurant customer. For more information, see Searching for guest records.
-
If one or more customer records match your search criteria, add customer credit or perform other customer-related operations on the existing customer record.
-
If no existing customer records match your search criteria, create a new customer record by sending a
POST
request to the/crm/v1/customers
endpoint of the CRM API.
To create a customer record, you must provide a unique identifier
(UUID or GUID) for the customer. The Customer
object in the
message body of the POST
request must include a
guid
value containing a unique UUID or GUID for the new
customer record.
The following example shows the JSON message body content for a
POST
request to the
/crm/v1/customers
endpoint.
Message body content to add a guest
{ "guid": "743B0D5C-66E4-4A46-B3E2-6694031B180C","firstName": "Josephine",
"lastName": "Banton",
"email": "jbanton@example.org"
}
Generate a unique identifier for the customer (UUID or
GUID). Include the identifier in the |
|
Include a first name, or given name, for the customer. |
|
Include a last name, or family name, for the customer. |
|
You must include either an email address (shown) or a telephone number for the customer. |
The following example shows the JSON response data for a
POST
request to the
/crm/v1/customers
endpoint.
Add guest response data
{ "guid": "743b0d5c-66e4-4a46-b3e2-6694031b180c", "entityType": "Customer", "firstName": "Josephine", "lastName": "Banton", "phone": null, "email": "jbanton@example.org" }