List of coupons

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET coupons https://api.admitad.com/coupons/ Request parameters list.

Returns the list of publisher’s coupons.*

GET coupons https://api.admitad.com/coupons/{id}/  

Returns the coupon for the ad space, where id is the coupon ID.*

  • * Returns the result in the JSON format.

Request parameters list.

Name

Type

Allowed values

campaign integer List of affiliate programs
category integer Coupon categories
campaign_category integer Categories of affiliate programs
type integer  
search string  
date_start date %d.%m.%Y
date_end date %d.%m.%Y
offset integer limit, offset parameters
limit integer limit, offset parameters
order_by * string
  • name
  • rating
  • date_start
  • date_end

Sign ‘-‘ before the value means inverse sort order. For example, order_by=-rating&order_by=date_start.

region string Ad space regions

Example of use

Example of a request with utility ``curl``:

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/coupons/?region=KZ&limit=1

Example of the response from the API server in the JSON format:

{
    "results": [
        {
            "status": "active",
            "rating": "2.50",
            "campaign": {
                "id": 8,
                "name": "Campaign3"
            },
            "name": "Coupon1",
            "short_name": "coupon",
            "date_end": "2013-07-25 23:59:59",
            "date_start": "2011-11-10 00:00:00",
            "exclusive": false,
            "discount": "20%",
            "species": "promocode",
            "categories": [
                {
                    "name": "Category name 1",
                    "id": 1
                },
                {
                    "name": "Category name 2",
                    "id": 2
                }
            ],
            "image": "//cdn.admitad.com/media/campaign/images/2012/06/13/1d37869cf370a26b091f726cc4b24025.jpg",
            "id": 3,
            "regions": [
                "KZ"
            ],
            "types": [
                {
                    "name": "Type name 1",
                    "id": 1
                },
                {
                    "name": "Type name 2",
                    "id": 3
                }
            ],
            "description": "description"
        }
    ],
    "_meta": {
        "count": 8,
        "limit": 1,
        "offset": 1
    }
}

Description of API server response fields

Name

Description

id

Coupon identifier

name

Name of coupon

image

Coupon image

status

Coupon status

rating

Coupon rating

description

Coupon description

campaign

Coupon affiliate program

date_start

Coupon start date

date_end

Coupon end date (if the field value is null, the coupon is permanent)

categories

Coupon categories

types

Types of coupons

exclusive

Exclusive

discount

Coupon discount (optional)

species

Kind of coupon (‘promocode’, ‘action’ - special offer or deal)

regions Ad space regions