In this section, you will learn how to configure your store to record actions for purchases and product ratings.
To record actions from your store, you need the store’s API key. You can find it on the My Stores page by clicking the API Key button for the relevant store.
Once you have your API key, you can start sending actions to our server.
Example API key:
cleard.sapun.bg.n81sjpKAg1Or
To successfully create a record, include your API key in a dedicated header in the POST request: cleard-api-key.
Send the POST request to https://cleard.com/api/action.
Your requests should include the following parameters:
{
"link": "https://sapun.bg/vanilla-soap", // Link to your product page
"title": "Vanilla soap", // Title of your product
"image": "https://sapun.bg/images/vanilla-soap.png", // Product image
"type": "add-to-cart", // Record type. Can be "add-to-cart" or "rate"
"user": {
"id": "XGwitmzWH8PmrH7lU5NrrZnM1Ow2" // Identifier of the user who performed the action ➀
}
}
{
"link": "https://sapun.bg/vanilla-soap", // Link to your product page
"title": "Vanilla soap", // Title of your product
"image": "https://sapun.bg/images/vanilla-soap.png", // Product image
"type": "rate", // Record type. Can be "add-to-cart" or "rate"
"rating": {
"rate": 4, // Product rating. Value must be from 1 to 5 inclusive.
"description": "Great soap!" // Rating comment. Optional.
},
"user": {
"id": "XGwitmzWH8PmrH7lU5NrrZnM1Ow2" // Identifier of the user who performed the action ➀
}
}
The user identifier can be taken from the cleard-user cookie.
If the user is not logged in to their Clear'd account, there will be no identifier. In this case, you can provide the user’s name and photo from your own database as follows:
{
...
"user": {
"name": "John Doe", // User's name
"photoURL": "https://sapun.bg/images/avatars/user-22.png" // User's photo
}
}
© 2026 Clear'd. All rights reserved.