List of Postback URLs

Parameters

HTTP method

Access rights

URL

Parameters

Note

GET opt_codes https://api.admitad.com/opt_codes/
  • limit**
  • offset**
  • campaign ***
  • website ***
  • order_by ****

Returns the list of Postback URLs.*

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

Returns the postback url, where id is code identifier.*

  • * Returns the result in the JSON format.

  • ** Sets skipping and the number of records returned. For example limit=5&offset=2.

  • *** Filter by affiliate programs and pulisher’s ad spaces, respectively. For example, campaign=3&website=12, where the values are identifiers of the filtered categories.

  • **** Sorting order. Possible values:

    • action_type
    • method
    • desc_mode

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

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/opt_codes/?limit=2

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

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

{
    "results": [
        {
            "campaign": null,
            "desc_mode": 0,
            "event": 0,
            "generated_url": "http://127.0.0.1:8000/?oid=[[[offer_id]]]&oname=[[[offer_name]]]&ostat=[[[offer_status]]]",
            "id": 11,
            "method": 0,
            "status": [
                {
                    "id": 8
                }
            ],
            "user_url": "http://127.0.0.1:8000/",
            "website": null
        },
        {
            "campaign": null,
            "desc_mode": 0,
            "event": 0,
            "generated_url": "http://127.0.0.1:8000/?1=[[[offer_id]]]&2=[[[offer_name]]]&3=[[[offer_status]]]&4=[[[offer_status]]]&6=[[[offer_status]]]&7=[[[offer_id]]]",
            "id": 15,
            "method": 0,
            "status": [
                {
                    "id": 5
                }
            ],
            "user_url": "http://127.0.0.1:8000/",
            "website": null
        }
    ],
    "_meta": {
        "count": 3,
        "limit": 2,
        "offset": 0
    }
}

Description of API server response fields

Name

Description

id

Code ID

website

Ad space of the code

campaign

Affiliate program of the code

event

The type of event that triggers the code (0 - action (conversion), 1 - changing program status, 2 - connecting a referral)

status

Action status. Available only for actions (1 - new, 2 - accepted, 3 - rejected, 4 - pending)

desc_mode

Code setup mode (0 - advanced mode, 1 - easy mode)

action_type

Type of action (0 - All types, 1 - Sale, 2 - Lead)

method

Request method (0 - GET, 1 - POST)

user_url

User URL

generated_url

Generated URL