Receiving offline deals

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET offline_sales https://api.admitad.com/offline_sales/ List of request parameters

Returns the list of deals.*,

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

Returns the deal.*, where id is the deal identifier.

  • * Returns the result in the JSON format.

List of request parameters

Name

Type

Allowed values

campaign integer List of affiliate programs
disabled string
  • true
  • false
datetime_start_from datetime %d.%m.%Y %H:%M
datetime_start_to datetime %d.%m.%Y %H:%M
datetime_end_from datetime %d.%m.%Y %H:%M
datetime_end_to datetime %d.%m.%Y %H:%M
datetime_created_from datetime %d.%m.%Y %H:%M
datetime_created_to datetime %d.%m.%Y %H:%M
limit integer limit, offset parameters
offset integer limit, offset parameters
is_activation_required string
  • true
  • false

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/offline_sales/?limit=1&disabled=false

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/offline_sales/3/

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

{
    "results": [
        {
            "campaign_id": 748,
            "campaign_name": "foo campaign name",
            "currency": "USD",
            "description": "foo description",
            "disabled": false,
            "id": 3,
            "image": "https://www.admitad.com/public/ceVbXte.jpg",
            "name": "foo name",
            "rate": "100.00",
            "rate_type": "fixed",
            "is_activation_required": true,
            "datetime_start": "2018-10-11T15:53:54",
            "datetime_end": "2018-11-09T15:53:54"
        }
    ],
    "_meta": {
        "count": 3,
        "limit": 1,
        "offset": 0
    }
}

Description of API server response fields

Name

Description

id

Deal identifier

campaign_id

Affiliate program ID

campaign_name

Name of affiliate program

currency

Currency code (ISO 4217)

name

Deal name

rate

Rate

datetime_start

Starting date and time of a deal

datetime_end

End date and time of a deal

rate_type
Rate type
  • fixed
  • percent
description

Deal terms

image

Image link

disabled
Disabled deal
  • true
  • false
is_activation_required
Requires activation (user’s consent)
  • true
  • false