Create Postback URL by action

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST manage_opt_codes https://api.admitad.com/opt_codes/action/create/ Request parameters list.
  • * Returns the result in the JSON format.

Request parameters list.

Name

Type

Required

Settings restrictions

Allowed values

website integer     The list of publisher’s ad spaces
campaign integer     List of affiliate programs
desc_mode integer  

0 for advanced mode, and 1 for easy mode

url string    
method integer  

0 for GET method, and 1 for POST method

action_type integer  

0 for all action types, 1 for Sale, and 2 for Lead

status integer  

5 - new, 6 - accepted, 7 - rejected, 8 - pending

The list of link parameters

Name

Parameter

Affiliate program ID

[[[offer_id]]]

Name of affiliate program

[[[offer_name]]]

Name of ad space

[[[website_name]]]

Ad space ID

[[[website_id]]]
SubID [[[subid]]]

Amount of your earnings

[[[payment_sum]]]

Currency of the program

[[[currency]]]

Order number

[[[order_id]]]

Order amount

[[[order_sum]]]

Click time (unix time)

[[[click_time]]]

Duration (unix time)

[[[time]]]

Conversion time (in seconds)

[[[conversion_time]]]

Type of action

[[[type]]]

Action IP

[[[action_ip]]]
User-Agent [[[user_agent]]]

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X POST https://api.admitad.com/opt_codes/action/create/ -d 'website=33&campaign=6&status=6&status=7&desc_mode=0&method=1&action_type=1&url=http%3A//test.com/%3Foffer_id%3D%5B%5B%5Boffer_id%5D%5D%5D%26time%3D%5B%5B%5Btime%5D%5D%5D'

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

{
    "campaign": {
        "id": 6,
        "name": "AdvCamp"
    },
    "desc_mode": 0,
    "event": 0,
    "generated_url": "http://test.com/?offer_id=[[[offer_id]]]&time=[[[time]]]",
    "id": 18,
    "method": 1,
    "status": [
        {
            "id": 6
        },
        {
            "id": 7
        }
    ],
    "user_url": "http://test.com/",
    "website": {
        "id": 33,
        "name": "AdRiver"
    },
}

Description of API server response fields