Skip to main content

Vouchers

Get the current voucher codes and deals of the programs available to you, each with a ready-to-use tracking link.

A
Written by AccountManager

Vouchers come from the same endpoint as Programs (v1.0): add one parameter and every program in the response carries its vouchers. This article covers only what is specific to vouchers. For authorization, paging and all other filters, see Programs (v1.0).

1. Quick start

Add getVouchers=true to your programs request. Add onlyVouchers=true as well to receive only programs that currently have vouchers.

Endpoint

GET https://api.advanced-store.com/publishers/programs/1.0/

Required headers

Authorization: Bearer YOUR_ACCESS_TOKEN Content-Type: application/json

Minimal example

curl --location 'https://api.advanced-store.com/publishers/programs/1.0/?siteId=100&page=1&size=10&getVouchers=true&onlyVouchers=true' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json'

2. Authorization

The same as for all advanced API endpoints: every request needs a Bearer token in the Authorization header. If you don't have one yet, follow advanced API – Get an access token.

3. Parameters

The voucher parameters are added to a normal programs request. siteId, page and size stay required, and every other parameter of Programs (v1.0) (countries, categories, search, url, …) works as usual.

Name

Type

Description

getVouchers

boolean

If true, every program in the response contains a vouchers list. Without it, no vouchers are returned and the response stays exactly as before.

onlyVouchers

boolean

If true, returns only programs that currently have at least one voucher. It only filters: add getVouchers=true to receive the vouchers themselves. Can't be combined with hasDeeplink=true.

subId

string

Optional. Your internal identifier, added to every voucher's clickLink as well as to the program's clickLink.

4. Response

The response is the normal Programs (v1.0) response. With getVouchers=true, each program object has one more field, vouchers: a list of up to 10 currently valid vouchers of that program, the ones ending soonest first. A program without vouchers has "vouchers": [].

4.1 Example response (shortened to the voucher part)

{   "totalEntries": 1,   "currentPage": 1,   "totalPageCount": 1,   "pageSize": 10,   "programDataList": [     {       "id": 455,       "name": "Example Shop",       "url": "shop.example",       "clickLink": "https://as.ad4m.at/ad/tur?a=100&b=newsletter&c=https%3A%2F%2Fshop.example",       "vouchers": [         {           "id": 123456,           "code": "SUMMER10",           "start": 1764547200000,           "end": 1767225600000,           "name": "10% off everything",           "description": "10% off the whole range, minimum order value 50 EUR",           "voucherType": "voucher",           "discountType": "percentage",           "discountValue": 10,           "clickLink": "https://as.ad4m.at/ad/tvr?a=100&b=newsletter&v=123456"         }       ]     }   ] }

4.2 Voucher fields

Field

Description

id

Identifier of the voucher.

code

The voucher code to show your users. null for a deal that needs no code.

start

Valid from, timestamp in ms since epoch. null if there is no start date.

end

Valid until (exclusive), timestamp in ms since epoch. null if there is no end date.

name

Title of the voucher, e.g. "10% off everything".

description

The voucher's details from the advertiser, e.g. conditions such as a minimum order value. null if there are none.

voucherType

voucher = comes with a code, discount = a deal without a code.

discountType

percentage, fixed (an amount off), free_shipping, bogo (buy one, get one) or other. null if not specified.

discountValue

Size of the discount: percent for percentage, an amount for fixed. null if not specified.

clickLink

The tracking link for this voucher, with your siteId and subId already in it. Use this URL to earn commission.

5. Good to know

  • Always use the voucher's clickLink. It sends your users through the voucher's own tracking, so the sale is attributed to you. Don't link the shop directly.

  • You can set individual sub Ids for your vouchers by setting the b-parameter in your click links.

  • If a voucher has expired by the time someone clicks, the link still takes the user to the shop through our regular tracking.

  • Refresh at least once a day. Vouchers change daily, and only vouchers that are valid right now are returned. Remove vouchers that no longer appear in the response.

6. Common use cases

Replace YOUR_ACCESS_TOKEN and siteId=100 with your own values.

All programs with vouchers in Germany

curl --location 'https://api.advanced-store.com/publishers/programs/1.0/?siteId=100&page=1&size=50&countries=DE&getVouchers=true&onlyVouchers=true' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json'

The vouchers of one shop

curl --location 'https://api.advanced-store.com/publishers/programs/1.0/?siteId=100&page=1&size=10&url=example.com&getVouchers=true' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json'

Vouchers with a SubID for your newsletter

curl --location 'https://api.advanced-store.com/publishers/programs/1.0/?siteId=100&page=1&size=50&getVouchers=true&onlyVouchers=true&subId=newsletter_2026_12' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --header 'Content-Type: application/json'

7. Related articles

Did this answer your question?