These docs are for v2.0. Click to read the latest docs for v2.1.

Getting started with JS API

Endpoint and schema

JavaScript

In order to be able to use Cleeng JavaScript API, you need to include following JS file in your HTML document:

Testing API calls

In order to make developers life easier, we prepared API console that allows to test the API functions before actually implementing them:

Go to API Console.

While we suggest to use the Console for testing, you can also access API directly from command line using curl command:

curl https://api.cleeng.com/3.0/json-rpc -d '{"method":"getCustomer","params":{"customerToken":"eDpPP30t8LhJdW9mAKxennC6inFZScmfQqICbxNFrhJkSlsj"},"id":1,"json-rpc":"2.0"}'

Troubleshooting

Errors codes available through Cleeng API:

CodeDescription
1Customer token cannot be empty
Customer token is invalid
3Publisher token cannot be empty
Publisher token is invalid
4Offer offerId does not exist.
5Enterprise account is required to call this API.
10User customerEmail does not exist.
Customer customerEmail is not associated with your account or doesn't exist.
customerEmail is not valid e-mail address.
11E-mail address is required
Invalid customerData
Password is missing
12Customer account is inactive
13Customer already exists
14Ip address limit exceeded
15Invalid customer credentials
16resetPasswordToken is not valid or has expired
resetUrl is not valid URL.