Ecommerce API

The Ecommerce API allows you to connect your ecommerce platform with Tango.ad and send ecommerce-related data to support personalization, targeting, analytics, and visitor engagement.
Use the Ecommerce API when you need to exchange ecommerce data with Tango.ad programmatically.
What You Can Use the Ecommerce API For
The Ecommerce API supports ecommerce data used by Tango.ad, including:
- Products
- Product information
- Categories
- Customer or visitor-related ecommerce data
- Orders and purchase information
- Cart and checkout activity
The available operations depend on the endpoints enabled for your Tango.ad integration.
Before You Start
Before using the Ecommerce API, make sure that:
- Your Tango.ad account is set up.
- Your website or ecommerce store is connected to Tango.ad.
- You have the required API credentials.
- Your integration can send HTTP requests.
- You have the data required by the API operation you want to use.
Keep API credentials secure. Do not expose private credentials in browser-side JavaScript, public repositories, or other publicly accessible locations.
Authentication
The Ecommerce API requires authentication.
Authentication Method
[ADD VERIFIED AUTHENTICATION METHOD FROM ENGINEERING]
Authentication Header
Include the required authentication information in the request header:
[ADD VERIFIED AUTHENTICATION HEADER]
Obtain API Credentials
You can obtain the required API credentials from:
[ADD VERIFIED LOCATION IN TANGO.AD]
Store credentials securely on your server or in a secure environment.
Base URL
Use the following base URL for Ecommerce API requests:
[ADD VERIFIED BASE URL]
API Endpoints
[ADD VERIFIED ENDPOINT NAME]
Method: [ADD HTTP METHOD]
Path: [ADD ENDPOINT PATH]
Description:
[ADD VERIFIED DESCRIPTION OF THE ENDPOINT.]
Request
Use the following request format:
[ADD VERIFIED COMPLETE REQUEST]
Request Body
{ "[VERIFIED_FIELD]": "[EXAMPLE_VALUE]" }
Response
A successful request returns:
{ "[VERIFIED_RESPONSE_FIELD]": "[EXAMPLE_VALUE]" }
Working With Ecommerce Data
When sending ecommerce data to Tango.ad, make sure the information matches the requirements of the API operation you are using.
Depending on the endpoint, ecommerce data may include:
- Product ID
- Product name
- Product URL
- Product category
- Product price
- Product image
- Product availability
- Order information
- Cart information
- Customer or visitor information
The exact fields and data types depend on the endpoint.
API Responses
After sending a request, Tango.ad returns an HTTP response indicating whether the request was processed successfully.
A successful response may contain requested ecommerce data or confirmation that submitted data was processed.
For example:
[ADD VERIFIED SUCCESS STATUS]
The response body may contain:
{ "[VERIFIED_RESPONSE_FIELD]": "[EXAMPLE_VALUE]" }
Error Responses
If a request cannot be processed, the API returns an error response.
| HTTP Status | Error | Description |
|---|---|---|
| [CODE] | [ERROR] | [VERIFIED DESCRIPTION] |
| [CODE] | [ERROR] | [VERIFIED DESCRIPTION] |
| [CODE] | [ERROR] | [VERIFIED DESCRIPTION] |
Check the response body for additional information about the error.
Rate Limits
The Ecommerce API supports the following rate limits:
[ADD VERIFIED RATE LIMIT FROM ENGINEERING]
If your integration exceeds the allowed request rate, the API returns:
[ADD VERIFIED RATE-LIMIT RESPONSE/STATUS]
Handle rate-limit responses in your integration and retry requests according to the API's requirements.
Best Practices
Follow these recommendations when working with the Ecommerce API:
- Keep API credentials secure.
- Never expose private credentials in frontend code.
- Validate data before sending API requests.
- Use the correct HTTP method and endpoint.
- Send only the required data.
- Handle API errors in your integration.
- Handle rate-limit responses appropriately.
- Avoid unnecessary API requests.
- Log errors during development and troubleshooting.
Troubleshooting
Authentication Failed
Check that:
- Your API credentials are correct.
- The authentication header is formatted correctly.
- Your account has permission to use the Ecommerce API.
Invalid Request
Check:
- The base URL and endpoint.
- The HTTP method.
- Required headers.
- Required parameters.
- Request body.
- Data types and values.
Data Is Not Appearing in Tango.ad
Verify that:
- The API request was successfully processed.
- The correct endpoint was used.
- The submitted data matches the required format.
- The correct Tango.ad account and integration are being used.
API Request Returns an Error
Review the HTTP status code, response body, and error message. Correct the request based on the returned error before retrying.
Rate Limit Exceeded
If the API indicates that the rate limit has been exceeded, reduce the request frequency and retry according to the API's rate-limit behavior.