Search the Documentations
Cart Paid
The Cart Paid API allows you to send bulk cart paid notifications to Releva. Any cart paid notifications submitted through this API will be live within 1 minute of receiving a successful response.
Do I need to call it?
You need to call this in order to fully use Releva. Without implementing this, store revenue, attribution tracking, and order-based segmentation will not function.
Request Parameters
You may perform requests to the API using the following curl equivalent:
curl -H 'Content-Type: application/json' -H 'Authorization: Bearer <secretKey>' -XPOST https://releva.ai/api/v0/carts -d'{
"carts": [
{
"email": "user@email.com",
"phoneNumber": "+359123",
"orderId": "orderId1",
"cartPaid": true,
"products": [
{
"id": "1",
"price": 10,
"currency": "BGN",
"quantity": 2,
"custom": {
"string": [
{"key": "color", "values": ["red"]}
],
"numeric": [
{"key": "size", "values": [18]}
]
}
}
],
"custom": {
"string": [
{"key": "city", "values": ["San Francisco"]}
],
"numeric": [
{"key": "rewardPoints", "values": [18]}
]
},
"timestamp": "YYYY-mm-ddT00:00:00.000Z"
}
]
}'
The cart
Object
Field | Type | Description |
---|---|---|
carts[].email | String (Optional) | The email of the user who has placed the order. You need to pass an email, a phone number, or both. |
carts[].phoneNumber | String (Optional) | The phone number of the user who has placed the order. Phone numbers must start with “+” followed by a sequence of numbers. Valid phone number: +49875345976. ou need to pass an email, a phone number, or both. |
carts[].orderId | String | A unique order ID that identifies the completed order once a cart has been checked out. If the cart is not checked out, this should not be set. |
carts[].cartPaid | Boolean | True if the cart has been checked out, false otherwise. |
carts[].custom | Object (Optional) | The custom fields associated with thecart, for example the reward points gained for this order, and/or the order address. See custom for details. |
carts[].timestamp | ISO-8601 String (Optional) | The date and time when this visitor created their order. We will use the current date and time if you don’t send this field. |
carts[].acceptPrivacyPolicy | Boolean (Optional) | The consent of the user with our privacy policy. |
carts[].products[] | Array[Object] | A list of products in the cart |
carts[].products[].id | String | The id of the product in the cart. |
carts[].products[].price | Float | The unit price at which the product was pruchased. |
carts[].products[].quantity | Integer | The units purchased |
carts[].products[].currency | ISO-4217 String | The currency of the product |
carts[].products[].custom | Object (Optional) | The custom fields associated with the product in the cart, for example the chosen size and color. See custom for details. |
A successful response will return HTTP Status 202
with an empty resposne body ({}
).
Response Format
An error response will return a HTTP 4xx
or 5xx
status code and have the following structure:
{
"message": "A description of the error and how to fix it, if it's a client error."
}