Glue API: Create customers
Edit on GitHubInstallation
For details on the modules that provide the API functionality and how to install them, see Glue API: Customer Access Feature Integration.
Create a customer
To create a customer, send the request:
POST
/customers
Request
Request sample: create a customer
POST http://glue.mysprykershop.com/customers
{
"data": {
"type": "customers",
"attributes": {
"salutation": "Mrs",
"firstName":"Sonia",
"lastName":"Wagner",
"email":"sonia@spryker.com",
"gender": "Female",
"password":"change123",
"confirmPassword":"change123",
"acceptedTerms":true
}
}
}
ATTRIBUTE | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
acceptedTerms | Boolean | ✓ | Specifies whether the customer has accepted the terms of service. For a new customer to be created, this parameter needs to be set to true. |
confirmPassword | String | ✓ | Specifies a password confirmation for the account of the new customer. |
String | ✓ | Specifies customer’s last email address. The address must be unique in the system. | |
gender | String | ✓ | Specifies gender of the customer. |
firstName | String | ✓ | Specifies customer’s first name. |
lastName | String | ✓ | Specifies customer’s last name. |
password | String | ✓ | Specifies a password (7 characters or more) for the account of the new customer. This password will be used by the customer to access their account. |
salutation | String | ✓ | Specifies a salutation for a new customer. |
Response
Response sample: create a customer
{
"data": {
"type": "customers",
"id": "DE--25",
"attributes": {
"firstName": "Sonia",
"lastName": "Wagner",
"gender": null,
"dateOfBirth": null,
"salutation": "Mr",
"createdAt": "2018-11-06 08:15:02.694668",
"updatedAt": "2018-11-06 08:15:02.694668"
},
"links": {
"self": "http://glue.mysprykershop.com/customers/DE--25"
}
}
}
RESOURCE | ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|---|
customers | firstName | String | Customer’s first name. |
customers | lastName | String | Customer’s last name. |
customers | gender | String | Gender of the customer. |
customers | dateOfBirth | String | Customer’s date of birth. |
customers | salutation | String | Salutation to use when addressing the customer. |
customers | createdAt | String | Account creation date. |
customers | updatedAt | String | Date of the last update. |
After creating a customer, users receive a verification email. The email contains a link with the token that confirms and finalizes the customer registration process. Customers click the verification link from the email and finish the registration. Alternatively, you can confirm the customer registration via API (see Confirming customer registration). After confirmation, you can authenticate as a customer to perform requests to the protected resources.
Thank you!
For submitting the form