Create a loyalty customer
Create a customer in a loyalty service.
-
Hey Pongo:
- phone is required
-
Como:
- at least phone or email is required
-
Little Bill:
- phone is required
- firstName is required
- lastName is required
Those settings can be found in the Third-Party settings in POS API via /v2/third-party/.
POST
/v1/customers/authorization<token>
To get an API key, please contact us. We'll be happy to help you.
In: header
email?string|null
phoneNumber?string|null
firstName?string|null
lastName?string|null
creditLimit?integer|null
lastActivityAt?unknown
status?string
Default
"active"Value in
"active" | "suspended" | "inactive"birthDate?string|null
hasOptinSms?boolean|null
hasOptinEmail?boolean|null
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:4010/v1/customers/" \ -H "Content-Type: application/json" \ -d '{ "firstName": "John", "lastName": "Doe", "email": "john@doe.com", "phoneNumber": "+33601020304", "birthDate": null, "hasOptinSms": true, "hasOptinEmail": null }'{
"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_ALREADY_EXISTS",
"message": "Customer already exists."
}{
"code": "CUSTOMER_CREATE_BODY_NOT_VALID",
"message": "Customer create body is invalid."
}{
"code": "UNEXPECTED_ERROR",
"message": "Internal server error"
}