Ecommerce API

The Ecommerce API allows you to connect your ecommerce platform with Tango.ad and provide ecommerce-related data that can be used by Tango.ad for personalization, targeting, analytics, and visitor engagement.
Use the Ecommerce API when you need to send or retrieve ecommerce data programmatically instead of managing it manually in the Tango.ad interface.
What You Can Use the Ecommerce API For
Depending on your integration, the Ecommerce API can be used to work with ecommerce data such as:
- Products
- Product information
- Categories
- Customer or visitor-related ecommerce data
- Orders and purchase information
- Cart and checkout activity
The available data and operations depend on the API endpoints supported by your Tango.ad account and 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 requests to the Tango.ad API.
- You have reviewed the required request parameters for the endpoint you want to use.
Note: API credentials and authentication details should never be shared publicly or included directly in client-side code.
Authentication
The Ecommerce API requires authentication when making API requests.
Use the authentication method and credentials provided for your Tango.ad account when sending requests.
Keep your API credentials secure and store them on your server or in a secure environment. Do not expose private API credentials in browser-side JavaScript, public repositories, or other publicly accessible locations.
API Requests
API requests are sent to the appropriate Tango.ad Ecommerce API endpoint using the required HTTP method.
Each endpoint may require different:
- Request parameters
- Headers
- Request body fields
- Authentication information
- Response fields
Refer to the documentation for the specific endpoint before sending a request.
Working With Ecommerce Data
When integrating your ecommerce platform with Tango.ad, make sure the information you send matches the required format.
For example, product-related data may include information such as:
- Product ID
- Product name
- Product URL
- Product category
- Product price
- Product image
- Product availability
The exact fields supported depend on the Ecommerce API endpoint being used.
API Responses
After sending a request, Tango.ad returns a response indicating whether the request was successful.
A successful response may contain the requested ecommerce data or confirmation that the submitted data was processed.
If a request fails, check:
- The API endpoint.
- The HTTP method.
- Authentication credentials.
- Required parameters.
- Request body format.
- Data types and values.
- The returned error message.
Error Handling
If the API returns an error, use the response information to identify and correct the problem.
Common causes of API errors include:
- Missing required parameters
- Invalid authentication
- Incorrect endpoint
- Invalid request format
- Invalid or unsupported data
- Insufficient permissions
Always check the API response before retrying a failed request.
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 data format required by each endpoint.
- Handle API errors in your integration.
- Avoid sending unnecessary requests.
- Keep your integration synchronized with the latest Tango.ad API documentation.
Troubleshooting
Authentication failed
Check that your API credentials are correct and that your account has permission to use the requested API.
Invalid request
Check the endpoint, HTTP method, required parameters, and request body.
Data is not appearing in Tango.ad
Verify that the request was successful and that the data matches the format required by the endpoint.
API request returns an error
Review the returned error message and compare your request with the requirements of the endpoint you are using.