registerCustomer

❗️

Deprecated

JSON-RPC registerCustomer method is deprecated. Use POST /3.1/customers instead.

Creates new customer account in Cleeng database and generates customerToken.

📘

customerToken expires after 60 days. Expiration time can be extended using extendTokenExpiration method.

🚧

Enterprise account required. Contact us if you're interested about opening Enterprise account.

Parameters

NameTypeDescription
publisherToken* stringYour publisher token. To open enterprise account contact us.
customerData*stringRequired customer data
-email*stringCustomer's email
-locale*stringDefines language and text formatting for the user. E.g. "en_US", "fr_FR"
-country*string2-letter country code
-currency*stringChoose one: USD, EUR, GBP, CAD, AUD, NZD, SEK, DKK, NOK, TRL, ZAR, XOF
-passwordstringCustomer's password
-facebookIdstringCustomer's FacebookId
-registrationDateintegerUnix timestamp - Customer's registration date
-externalIdstringCustomer's external ID

Result Parameters

NameTypeDescription
tokenstringCustomer token used to identify the user

API Request/Response

Request

{
  "method": "registerCustomer",
  "params": {
    "publisherToken": "Ilrx-SjTLVMCsaRsOf2q2hvWKOlrF57yHknDRRRMX-13Fz-x",
    "customerData": {
      "email": "[email protected]",
      "locale": "pl_PL",
      "country": "PL",
      "currency": "EUR",
      "password": "password",
      "facebookId": "123456789012345",
      "registrationDate": "1451606400",
      "externalId": "OKK734237462384"
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}

Response

{
  "result": {
    "token": "AKr47GhD_tF7yWoKHinzfHjG7Ad_gta-TezKwyHVkxRHOYHs"
  },
 "id": "1",
 "jsonrpc": "2.0"
}

ErrorCodes

CodeDescription
3Invalid publisher token
5Access denied
11Invalid arguments
13Customer already exists