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:

Code

Description

1

Customer token cannot be empty
Customer token is invalid

3

Publisher token cannot be empty
Publisher token is invalid

4

Offer offerId does not exist.

5

Enterprise account is required to call this API.

10

User customerEmail does not exist.
Customer customerEmail is not associated with your account or doesn't exist.
customerEmail is not valid e-mail address.

11

E-mail address is required
Invalid customerData
Password is missing

12

Customer account is inactive

13

Customer already exists

14

Ip address limit exceeded

15

Invalid customer credentials

16

resetPasswordToken is not valid or has expired
resetUrl is not valid URL.