Tracking API (REST)
What is this API for?
Tracking API (REST) is an endpoint that accepts sales events from your online store or backend for Aklamio reward tracking using a client-to-server mode or server-to-server mode.
If you want to access all functionalities that can be used through the Partner Interface and the Agent Backoffice instead, please check our Partner API documentation.
API Details
Endpoint URL:
https://tracking.aklamio.com/api/v1/events
Method:
POST
Header:
Api-Secret
Authentication
This endpoint needs an additional header with the request: Api-Secret. This header key is used to validate the brand and program used in payload. Ask your Aklmaio Customer Success Manager or Integration Manager for your brand's API Secret Key.
Request Parameters
The Sales Event object is the main object that will be used to track your end users' purchases. This is where the sales items and general information will be sent to Aklamio when your request is executed.
,<>?;:'"\|[{]}!#$%^&*()=+`~).
partner-sale.
1601904516011.
email and
encryptedEmail should not be set in the same
request object.
¹
email and encryptedEmail should not
be set in the same request object;²
email is not required for Keep use case;
aid and coupon are
present, aid takes precedence (see aid). When
coupon is set and the use case is Share or Give,
email is required.
online (digital/web), offline (e.g.
in-store / POS), or hotline
(telesales / contact center). Use this when sending sales from
multiple channels so Aklamio can attribute and evaluate the sale
correctly. This is attributed to the program's default sales
channel when not provided.
Sales Item
The Item object is the main object used to create items from a sales event. This is where one stores the item information that is to be sent to Aklamio using api .
_ . & ( ) | : / -. Everything else is
rejected.
Check the full Item object sample:
{
"id": "aklamio_test_111",
"name": "item 1",
"price": 20,
"category": "category"
}
Cashback & Encrypted Email
encryptedEmail field must only be used in Cashback
campaigns - known as Native Cashback. Remember that you can NOT use
email and encryptedEmail properties in the
same request.
In order to implement Native Cashback tracking, you needs to add an encrypted version of your user's email address - the email address of the cashback receiver - as a parameter in your sales tracking API call.
For Cashback examples look up Java/Kotlin or Swift in code samples.
How to get the encrypted email value
Testing
When you first implement the API, you likely want to test it to see
that everything is working perfectly before you send real data to
Aklamio. The best way for doing this is using our
test parameter. This way, we can identify if the data
you are sending is real or just a test, and test sales are excluded
from performance reports. To achieve this, add
"test": true to the request body:
{
"partnerId": "158490ab8bc200ca5bdfed0c3188a6dc",
"orderRef": "sample_order_ref",
"checkoutLocation": "online checkout page",
"items": [
{
"id": "sample_id",
"name": "sample_name",
"price": 1000,
"category": "sample_category"
}
],
"EventName": "partner-sale",
"SendTimestamp": 1658301157011,
"aid": "ar4363cb1a8bd9217b724c72477b9eb261478b95563cd29ffdd0e5d6f987acb461",
"email": "sample@email.com",
"test": true
}