Search loyalty customer by phone number | email | name
Search a customer by their phone number, an email, or a name.
The type of search can be found in the Third-Party settings in POS API via /v2/third-party/.
If a customer is found in the loyalty service, but do not exist in our database, a new customer will be created and a link will be established between the two records.
Returns a customer object with an externalLoyaltyId field corresponding to the loyalty customer unique identifier.
POST
/v1/customers/searchauthorization<token>
To get an API key, please contact us. We'll be happy to help you.
In: header
typestring
Search by name.
Value in
"name"valuestring
Length
1 <= length <= 255Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:4010/v1/customers/search" \ -H "Content-Type: application/json" \ -d '{ "type": "phone", "value": "+33601010101" }'{
"id": "c49f95c8-8fd6-4ab5-8a01-e56c8fdd916d",
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"phoneNumber": "+33601020304",
"birthDate": null,
"hasOptinSms": null,
"hasOptinEmail": null,
"externalLoyaltyId": "external-loyalty-id-12345"
}{
"code": "CUSTOMER_NOT_FOUND",
"message": "No customers found."
}{
"code": "CUSTOMER_SEARCH_BODY_NOT_VALID",
"message": "Customer search body is invalid."
}{
"code": "UNEXPECTED_ERROR",
"message": "Internal server error"
}