My Customer Profile
The My Customer Profile API creates and provides access to a Customer profile scoped to a specific Customer.
The API requires an access token from the password flow or anonymous session flow.
The My Customer Profile API can also be used to create (sign up) a Customer from an anonymous session, or merge (sign in) an anonymous session to an existing account.
The API intentionally provides access to a limited subset of fields on Customer to provide extra security in scenarios when the client application must communicate directly with the commercetools Composable Commerce API on behalf of a customer, such as commerce in a mobile application. If you need to modify a field available on the Customer resource, do it from a trusted, server-side application.
Customer Group, customer number, external ID, and ExternalAuth
authentication mode cannot be set with this API.
Representations
Representations are JSON objects submitted or received as payload to API requests or responses. Responses are similar to the responses returned on the Customers API, but requests may differ.
MyCustomerDraft
email String | Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer. |
password String | Password of the Customer. |
firstName String | Given name (first name) of the Customer. |
lastName String | Family name (last name) of the Customer. |
middleName String | Middle name of the Customer. |
title String | Title of the Customer, for example, 'Dr.'. |
salutation String | Salutation of the Customer, for example, 'Mr.' or 'Mrs.'. |
dateOfBirth Date | Date of birth of the Customer. |
companyName String | Company name of the Customer. |
vatId String | Individual VAT ID of the Customer. |
addresses Array of BaseAddress | Addresses of the Customer. |
defaultShippingAddress Int | Index of the address in the |
defaultBillingAddress Int | Index of the address in the |
locale | Preferred language of the Customer. Must be one of the languages supported by the Project. |
stores Array of StoreResourceIdentifier | Sets the Stores for the Customer. |
custom | Custom Fields for the Customer. |
MyCustomerSignin
email String | Email address of the Customer treated as case-insensitive. |
password String | Password of the Customer. |
activeCartSignInMode | |
updateProductData Boolean |
false |
{"email": "johndoe@example.com","password": "secret123","anonymousCart": {"id": "{{cart-id}}","typeId": "cart"}}
MyCustomerChangePassword
version Int | Expected version of the Customer on which the changes should be applied. |
currentPassword String | Current password of the Customer. If the current password does not match, an InvalidCurrentPassword error is returned. |
newPassword String | New password to be set. |
{"version": 1,"currentPassword": "secret123","newPassword": "newSecret456"}
MyCustomerResetPassword
tokenValue String | Value of the token to reset the Customer password. |
newPassword String | New password to be set. |
{"tokenValue": "VRndRV5oCr-pKH2360DnlhqEOVVUZXSAIUXgT5HL","newPassword": "newsecret123"}
MyCustomerEmailVerify
tokenValue String | Value of the token to verify Customer email. |
{"tokenValue": "hI_6fkuFIyd_wadz1JmpRGh1vMvgFrlsSJia3G6d"}
Get Customer
Returns a Customer for a given Query Predicate. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists for the given Query Predicate.
- If a Customer exists for the given Query Predicate, but does not have an
id
value that matches the customer:{id} scope.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
where | The parameter can be passed multiple times. |
/^var[.][a-zA-Z0-9]+$/ Any string parameter matching this regular expression | Predicate parameter values. The parameter can be passed multiple times. |
sort | The parameter can be passed multiple times. |
expand | The parameter can be passed multiple times. |
limit Int | Number of results requested. |
offset Int | Number of elements skipped. |
withTotal Boolean | Controls the calculation of the total number of query results. Set to Default: true |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/me -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Get Customer in Store BETA
Returns a Customer for a given Query Predicate in a Store. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists in the Store for the given Query Predicate.
- If a Customer exists in the Store for the given Query Predicate, but does not have an
id
value that matches the customer:{id} scope. - If a Customer exists for the given Query Predicate but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
where | The parameter can be passed multiple times. |
/^var[.][a-zA-Z0-9]+$/ Any string parameter matching this regular expression | Predicate parameter values. The parameter can be passed multiple times. |
sort | The parameter can be passed multiple times. |
expand | The parameter can be passed multiple times. |
limit Int | Number of results requested. |
offset Int | Number of elements skipped. |
withTotal Boolean | Controls the calculation of the total number of query results. Set to Default: true |
application/json
curl --get https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Create (sign up) Customer
When used with an access token obtained by an anonymous session flow, all Orders and Carts belonging to the anonymousId
are assigned to the newly created Customer.
If used with an optional access token for an anonymous session, all Orders and Carts that belong to the anonymousId
are assigned to the newly created Customer.
Creating a Customer produces the CustomerCreated Message.
manage_my_profile:{projectKey}
anonymous_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me/signup -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"email" : "johndoe@example.com","firstName" : "John","lastName" : "Doe","password" : "secret123"}DATA
{"customer": {"addresses": [],"email": "johndoe@example.com","firstName": "John","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 1,"createdAt": "2015-07-06T13:22:33.339Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}}
Create (sign up) Customer in Store BETA
When used with an access token obtained by an anonymous session flow, all Orders and Carts belonging to the anonymousId
are assigned to the newly created Customer.
If used with an optional access token for an anonymous session, all Orders and Carts that belong to the anonymousId
are assigned to the newly created Customer.
If omitted in the request body, the Customer stores
field is set to the Store specified in the path parameter.
A Cart returned in the CustomerSignInResult has any invalid Line Items removed and is updated with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: MatchingPriceNotFound and MissingTaxRateForCountry.
Creating a Customer produces the CustomerCreated Message.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
anonymous_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me/signup -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"email" : "johndoe@example.com","firstName" : "John","lastName" : "Doe","password" : "secret123"}DATA
{"customer": {"addresses": [],"email": "johndoe@example.com","firstName": "John","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 1,"createdAt": "2015-07-06T13:22:33.339Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}}
Authenticate (sign in) Customer
When used with an access token obtained by an anonymous session flow, all Orders and Carts belonging to the anonymousId
are assigned to the newly created Customer.
Retrieves the authenticated customer (that matches the given email/password pair).
If used with an optional access token for an anonymous session, all Orders and Carts that belong to the anonymousId
are assigned to the newly logged-in Customer.
- If the Customer does not have a Cart yet, the most recently modified anonymous cart becomes the Customer's Cart.
- If the Customer already has a Cart, the most recently modified anonymous cart is handled in accordance with AnonymousCartSignInMode.
A Cart returned in the CustomerSignInResult has any invalid Line Items removed and is updated with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: MatchingPriceNotFound and MissingTaxRateForCountry.
If an account with the given credentials is not found, an InvalidCredentials error is returned.
manage_my_profile:{projectKey}
anonymous_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me/login -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"email" : "johndoe@example.com","password" : "secret123","anonymousCart" : {"id" : "{{cart-id}}","typeId" : "cart"}}DATA
{"customer": {"addresses": [],"email": "johndoe@example.com","firstName": "John","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 1,"createdAt": "2015-07-06T13:22:33.339Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}}
Authenticate (sign in) Customer in Store BETA
When used with an access token obtained by an anonymous session flow, all Orders and Carts belonging to the anonymousId
are assigned to the newly created Customer.
Retrieves the authenticated Customer (that matches the given email/password pair) if they are part of a specific Store.
If used with an optional access token for an anonymous session, all Orders and Carts that belong to the anonymousId
are assigned to the newly logged-in Customer.
- If the Customer does not have a Cart, the most recently modified anonymous cart becomes the Customer's Cart.
- If the Customer already has a Cart, the most recently modified anonymous cart is handled according to AnonymousCartSignInMode.
A Cart returned in the CustomerSignInResult has any invalid Line Items removed and is updated with the latest prices, taxes, and discounts. During these updates, the following errors can be returned: MatchingPriceNotFound and MissingTaxRateForCountry.
If an account with the given credentials is not found, an InvalidCredentials error is returned.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
anonymous_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me/login -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"email" : "johndoe@example.com","password" : "secret123","anonymousCart" : {"id" : "{{cart-id}}","typeId" : "cart"}}DATA
{"customer": {"addresses": [],"email": "johndoe@example.com","firstName": "John","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 1,"createdAt": "2015-07-06T13:22:33.339Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}}
Update Customer
Updates the Customer specified in the customer:{id} scope. Returns a 200 OK
status if successful.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
version Int | Expected version of the Customer on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned. |
actions Array of MyCustomerUpdateAction | Update actions to be performed on the Customer. |
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 3,"actions" : [ {"action" : "addAddress","address" : {"streetName" : "Any Street","streetNumber" : "1337","postalCode" : "11111","city" : "Any City","country" : "US"}} ]}DATA
{"addresses": [{"city": "Any City","country": "US","id": "some_456_id","postalCode": "11111","streetName": "Any Street","streetNumber": "1337"}],"email": "janedoe@example.com","firstName": "Jane","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 4,"createdAt": "2015-05-06T12:10:12.421Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}
Update Customer in Store BETA
Updates the Customer in a Store. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists with the
id
specified in the customer:{id} scope. - If the Customer exists but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
version Int | Expected version of the Customer on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned. |
actions Array of MyCustomerUpdateAction | Update actions to be performed on the Customer. |
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 3,"actions" : [ {"action" : "addAddress","address" : {"streetName" : "Any Street","streetNumber" : "1337","postalCode" : "11111","city" : "Any City","country" : "US"}} ]}DATA
{"addresses": [{"city": "Any City","country": "US","id": "some_456_id","postalCode": "11111","streetName": "Any Street","streetNumber": "1337"}],"email": "janedoe@example.com","firstName": "Jane","id": "some_123_id","isEmailVerified": false,"lastName": "Doe","password": "****aGg=","version": 4,"createdAt": "2015-05-06T12:10:12.421Z","lastModifiedAt": "2015-07-06T13:22:33.339Z","authenticationMode": "Password","stores": []}
Update actions
Change Email
Changing the email of the Customer produces the CustomerEmailChanged Message.
action String | "changeEmail" |
email String | New value to set. |
{"action": "changeEmail","email": "email@example.com"}
Set First Name
Setting the first name of the Customer produces the CustomerFirstNameSet Message.
action String | "setFirstName" |
firstName String | Value to set. If empty, any existing value is removed. |
{"action": "setFirstName","firstName": "John"}
Set Last Name
Setting the last name of the Customer produces the CustomerLastNameSet Message.
action String | "setLastName" |
lastName String | Value to set. If empty, any existing value is removed. |
{"action": "setLastName","lastName": "Person"}
Set Middle Name
action String | "setMiddleName" |
middleName String | Value to set. If empty, any existing value is removed. |
{"action": "setMiddleName","middleName": "middleName"}
Set Title
Setting the title of the Customer produces the CustomerTitleSetMessage.
action String | "setTitle" |
title String | Value to set. If empty, any existing value is removed. |
{"action": "setTitle","title": "Dr"}
Set Salutation
action String | "setSalutation" |
salutation String | Value to set. If empty, any existing value is removed. |
{"action": "setSalutation","salutation": "Mr"}
Add Address
Adding an address to the Customer produces the CustomerAddressAdded Message.
action String | "addAddress" |
address | Value to append to the |
{"action": "addAddress","address": {"key": "exampleKey","title": "My Address","salutation": "Mr.","firstName": "Example","lastName": "Person","streetName": "Example Street","streetNumber": "4711","additionalStreetInfo": "Backhouse","postalCode": "80933","city": "Exemplary City","region": "Exemplary Region","state": "Exemplary State","country": "DE","company": "My Company Name","department": "Sales","building": "Hightower 1","apartment": "247","pOBox": "2471","phone": "+49 89 12345678","mobile": "+49 171 2345678","email": "email@example.com","fax": "+49 89 12345679","additionalAddressInfo": "no additional Info","externalId": "Information not needed"}}
Change Address
Changing an address of the Customer produces the CustomerAddressChanged Message.
Either addressId
or addressKey
is required.
action String | "changeAddress" |
addressId String |
|
addressKey String |
|
address | Value to set. |
{"action": "changeAddress","addressId": "{{addressId}}","address": {"key": "exampleKey","title": "My Address","salutation": "Mr.","firstName": "Example","lastName": "Person","streetName": "Example Street","streetNumber": "4711","additionalStreetInfo": "Backhouse","postalCode": "80933","city": "Exemplary City","region": "Exemplary Region","state": "Exemplary State","country": "DE","company": "My Company Name","department": "Sales","building": "Hightower 1","apartment": "247","pOBox": "2471","phone": "+49 89 12345678","mobile": "+49 171 2345678","email": "email@example.com","fax": "+49 89 12345679","additionalAddressInfo": "no additional Info","externalId": "Information not needed"}}
Remove Address
Removing an address of the Customer produces the CustomerAddressRemoved Message.
Either addressId
or addressKey
is required.
Set Default Shipping Address
Sets the default shipping address from addresses
.
If the address is not currently a shipping address, it is added to shippingAddressIds
. Either addressId
or addressKey
is required.
Add Shipping Address ID
Adds an address from the addresses
array to shippingAddressIds
. Either addressId
or addressKey
is required.
Remove Shipping Address ID
Removes an existing shipping address from shippingAddressesIds
.
If the shipping address is the default shipping address, the defaultShippingAddressId
is unset. Either addressId
or addressKey
is required.
Set Default Billing Address
Sets the default billing address from addresses
.
If the address is not currently a billing address, it is added to billingAddressIds
. Either addressId
or addressKey
is required.
Add Billing Address ID
Adds an address from the addresses
array to billingAddressIds
. Either addressId
or addressKey
is required.
Remove Billing Address ID
Removes an existing billing address from billingAddressesIds
.
If the billing address is the default billing address, the defaultBillingAddressId
is unset. Either addressId
or addressKey
is required.
Set Company Name
Setting the companyName
field on the Customer produces the CustomerCompanyNameSet Message.
action String | "setCompanyName" |
companyName String | Value to set. If empty, any existing value is removed. |
{"action": "setCompanyName","companyName": "Company Ltd."}
Set Date of Birth
Setting the date of birth of the Customer produces the CustomerDateOfBirthSet Message.
action String | "setDateOfBirth" |
dateOfBirth Date | Value to set. If empty, any existing value is removed. |
{"action": "setDateOfBirth","dateOfBirth": "2015-10-21"}
Set Vat ID
action String | "setVatId" |
vatId String | Value to set. If empty, any existing value is removed. |
{"action": "setVatId","vatId": "vatId"}
Set Custom Type
Adding or updating a Custom Type on a Customer generates the CustomerCustomTypeSet Message, removing one generates the CustomerCustomTypeRemoved Message.
action String | "setCustomType" |
type | Defines the Type that extends the MyCustomer with Custom Fields. If absent, any existing Type and Custom Fields are removed from the MyCustomer. |
fields | Sets the Custom Fields fields for the MyCustomer. |
{"action": "setCustomType","type": {"id": "{{type-id}}","typeId": "type"},"fields": {"exampleStringTypeField": "TextString"}}
Set CustomField
Adding a Custom Field to a Customer generates the CustomerCustomFieldAdded Message, removing one generates the CustomerCustomFieldRemoved Message, and updating an existing one generates the CustomerCustomFieldChanged Message.
action String | "setCustomField" |
name String | Name of the Custom Field. |
value | If |
{"action": "setCustomField","name": "ExampleStringTypeField","value": "TextString"}
Set Locale
Change password of Customer
Changing the password of the Customer produces the CustomerPasswordUpdated Message with reset=false
.
If the current password does not match, an InvalidCurrentPassword error is returned.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me/password -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"currentPassword" : "secret123","newPassword" : "newSecret456"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Change password of Customer in Store BETA
Changing the password of the Customer produces the CustomerPasswordUpdated Message with reset=false
. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists with the
id
specified in the customer:{id} scope. - If the Customer exists but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me/password -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"version" : 1,"currentPassword" : "secret123","newPassword" : "newSecret456"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Reset password of Customer
This is the last step in the password reset process of a Customer.
Resetting a password of the Customer produces the CustomerPasswordUpdated Message with reset=true
.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me/password/reset -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"tokenValue" : "VRndRV5oCr-pKH2360DnlhqEOVVUZXSAIUXgT5HL","newPassword" : "newsecret123"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Reset password of Customer in Store BETA
This is the last step in the password reset process of the authenticated Customer.
Resetting a password produces the Customer CustomerPasswordUpdated Message with reset=true
.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists with the
id
specified in the customer:{id} scope. - If the Customer exists but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me/password/reset -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"tokenValue" : "VRndRV5oCr-pKH2360DnlhqEOVVUZXSAIUXgT5HL","newPassword" : "newsecret123"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Verify email of Customer
This is the last step in the email verification process of a Customer.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/me/email/confirm -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"tokenValue" : "hI_6fkuFIyd_wadz1JmpRGh1vMvgFrlsSJia3G6d"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Verify email of Customer in Store BETA
This is the last step in the email verification process of a Customer. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists with the
id
specified in the customer:{id} scope. - If the Customer exists but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
application/json
application/json
curl https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me/email/confirm -i \--header 'Authorization: Bearer ${BEARER_TOKEN}' \--header 'Content-Type: application/json' \--data-binary @- << DATA{"tokenValue" : "hI_6fkuFIyd_wadz1JmpRGh1vMvgFrlsSJia3G6d"}DATA
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Delete Customer
Deletes the Customer specified in the customer:{id} scope. Returns a 200 OK
status if successful.
manage_my_profile:{projectKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
version Int | Last seen version of the resource. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/me?version={version} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}
Delete Customer in Store BETA
Deletes the Customer in a Store. Returns a 200 OK
status if successful.
A ResourceNotFound error is returned in the following scenarios:
- If no Customer exists with the
id
specified in the customer:{id} scope. - If the Customer exists but is associated with a different Store than what is specified in the
manage_my_profile:{projectKey}:{storeKey}
scope.
manage_my_profile:{projectKey}
manage_my_profile:{projectKey}:{storeKey}
customer_id:{id}
region String | Region in which the Project is hosted. |
projectKey String |
|
storeKey String |
|
version Int | Last seen version of the resource. |
application/json
curl -X DELETE https://api.{region}.commercetools.com/{projectKey}/in-store/key={storeKey}/me?version={version} -i \--header 'Authorization: Bearer ${BEARER_TOKEN}'
{"id": "3cdcdcc8-80c5-41bb-abb5-ac8772c9cc24","version": 1,"createdAt": "2022-09-19T14:34:35.843Z","lastModifiedAt": "2022-09-19T14:34:35.843Z","lastModifiedBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"createdBy": {"clientId": "P1Xf1NG2YsFqH2LC31oveDWT","isPlatformClient": false},"email": "johndoe@example.com","firstName": "John","lastName": "Doe","password": "****aGg=","addresses": [],"shippingAddressIds": [],"billingAddressIds": [],"isEmailVerified": false,"stores": [],"authenticationMode": "Password"}