post https://mediastoreapi-sandbox.cleeng.com/customers
Use /customers
endpoint to register user. After registration customer is related with your account and you will see him in Cleeng Dashboard > Customer Accounts. Customers are recognized in Cleeng by customerId
, which is encoded in JWT.
Important
It is recommended that customerIP is passed as it is required for correct price calculation because tax rate depends on the country. If customerIP is NOT given, the price will be calculated for request source IP address.
Please note that when using Cleeng Merchant, customerIP should be available for the purpose of proper tax calculation in the US and Canada. It is recommended that customerIP is passed in the register, login and create order methods.
Response description
Response | Description |
---|---|
jwt | Token used for authorization. It is required for endpoints related to customers. JWT is valid for 15 minutes. It includes customerId , publisherId , and expiration date (to decode use package like jwt-decode). |
refreshToken | A token to generate a new access JWT. Read more about refresh token HERE. |
customerToken | Session/authentication token for JSON RPC API. |
customerId | Customer identifier at Cleeng. |
Errors
HTTP Status code | Error code | Message |
---|---|---|
400 | REQ0001 | Invalid request body |
422 | USER0002 | Customer already exists |
429 | CPT0001 | Google reCAPTCHA verification required! |
429 | CPT0002 | Google reCAPTCHA verification failed! |
500 | SXXXX (X - number) | Internal Server Error |