Search for coupons

The Take API searches for a suitable coupon based on the entered IRIs.

If matching coupons are not found, an empty array response will be returned with a status code of 200.

You can test this API endpoint and inspect the possible responses using Swagger UI

Request

URL: https://api.takeads.com/v1/product/monetize-api/v1/coupon/search

Method: POST

Request headers

Header Value Description
Authorization Bearer Header with a platform public key value, which is a string of alphanumeric characters with Bearer as prefix, used to authenticate and authorize your API requests.

To learn how to get your Public key, refer to the Authorization article.

Request body

A request body must contain the required iris parameter.

Context-Type: application/json

Property Type Description
iris

(required)

array of strings List of links to the advertiser or product that you search a coupon for.
languageCodes

(optional)

array of strings ISO 639-1 alpha-2 language code supported by the coupon merchant.
categoryIds

(optional)

array of integers Coupon category identifiers.
subId

(optional)

string SubID parameter that you want to add to the affiliate link.
  • Only one SubID can be sent with each request.
  • If you send more than one link in the request, the specified SubID will be added to each link.
  • SubID parameter:
    • does not exceed 6144 symbols
    • can include numbers from 1 to 9, Latin letters, and the _ and - symbols.

Request examples

Response

If the request was successfully processed by the server, the HTTP response with a status code of 200 and a list of available coupons is returned.

The response payload is a JSON object that contains a data array. Each item of the array is an object with details of the coupon.

The following table describes the response properties.

Property Type Description
iri string Link sent in the request.
coupons string The result of affiliation of the link you requested for monetization.
couponId string Coupon unique identifier.
trackingLink string Affiliate link (RFC 3986).
name string Coupon name.
code string Coupon code.
merchantId integer Merchant unique identifier.
imageUri string URI to the coupon logo.
languageCodes string Array of languages supported by the website in ISO 639-1 alpha-2 format. If the value is empty, the coupon languages are unknown.
startDate string Date from which the coupon can be applied.
endDate string Date after which the coupon will no longer apply.
description string Detailed information about the coupon, including usage conditions and limitations.
countryCodes string List of the country codes in ISO 3166-1 alpha-2 format where the coupon operates.
categoryIds integer List of merchant category identifiers.
createdAt string Date of the last update of the coupon in ISO 8601: 1988 (E) format.
updatedAt string Date of the last update of the coupon in ISO 8601: 1988 (E) format.

Example value

{
"data": [
{
"iri": "https://aliexpress.com/item/1005003993360501.html",
"coupons": [
{
"couponId": "V1StGXR8_Z5jdHi6B-myT",
"trackingLink": "https://tatrck.com/h/0Hu30w1D0KX9?url=https://aliexpress.com/item/1005003993360501.html&s=subid",
"name": "ACME",
"code": "10OFF",
"merchantId": 12345,
"imageUri": "https://sitesample.com/image.svg",
"languageCodes": [
"en",
"de"
],
"startDate": "2023-01-30T08:07:12.166Z",
"endDate": "2023-01-30T08:07:12.166Z",
"description": "string",
"countryCodes": [
"US",
"DE",
"FR"
],
"categoryIds": [
12
],
"createdAt": "2023-01-30T08:07:12.166Z",
"updatedAt": "2023-01-30T08:07:12.166Z"
}
]
}
]
}

To view possible error responses, refer to the Error responses article.