Register (COPY)

Changed on

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 <glossary:JWT>. <br>

🚧 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.

post/customers (COPY)

Request

  • Base URL
    https://mediastoreapi-sandbox.cleeng.com
  • URL
    https://mediastoreapi-sandbox.cleeng.com/customers (COPY)
  • Auth
    none required

Request body

emailstring required

The email address of the customer (valid RFC2822 email address)

passwordstring required

The password of the customer. String containing at least one letter and one digit or special character (!@#$%^&), length - 8-80 characters

offerIdstring required

ID of Cleeng offer. The first letter defines the type of offer, then 9 numbers occurs, underscore and country code, e.g. S565568989_US. Required conditionally, when publisherId is not given

publisherIdstring required

ID of publisher. Consist of 9 digits. Required conditionally, when offerId is not given

localestring required

Language and text formatting of customer. You can fetch it using /locales. A list of supported values can be found HERE

countrystring required

2-letter customer country code (ISO 3166 country code - without 'UK')

currencystring required

Customer currency. A list of supported values can be found HERE

firstNamestring

Customer first name (1-50 characters)

lastNamestring

Customer last name (1-50 characters)

externalIdstring

Customer's external ID. Can be used to integrate with external systems. Has to be unique to the publisher

externalDatastring

Custom data in JSON format

customerIPstring

Customer IP address. This field is used for geo restrictions (stored as last user IP)

captchaValuestring

To integrate Google reCAPTCHA go HERE

Response

200

Example response

{
  "responseData": {
    "jwt": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21lcklkIjoiNzc1ODQzMzU4Iiwib2ZmZXJJZCI6IlM1Njc5MjE3NjZfTkwifQ.rh67_MtVAe4ggE3kFALsuAL-XI3bQoOd_VYo1pii3GCNNSMp0-Ewfrg3o0JOWnNYfaZaXo6DaYiJ7TDSGXyiQQPXJpz3LmJhfGgjww_gXcrf_CvQayQlV-ZpcapNPHKS-1zgClLhOz0ACE4FBos9fUsHrwQEcGDDY0hvs4TOLmWiRXGtgyJyK_SHIvUOsFcEe2TQqTnL76hfZp-8JX1NBEi0QVy6ymVlJThdiK8GO4rIF7-6qi5UiXkCIzRb-qIfo5T0qYqHcEHksD3rOFMpC3GdS-1oLRttDO4sfKKFFftTiXZl27XfyRDH8_RseuCizrDGgqGWDC7baKxgTYfwEA",
    "refreshToken": "06ec4f290ec432f20dd2718697642920a0f3c334966aafe1d952b447d1ceffaa",
    "customerToken": "MZYbftC_e378Vm9dualp1RaQU8XgJFnrSxaFuBZmDdQZ8FyU",
    "customerId": 123456789
  }
}

Changes