Retag

Available levels of programs for the ad space

Parameters

HTTP method Access rights URL Parameters Note
GET webmaster_retag https://api.admitad.com/retag/website/{website_id}/levels/
  • limit*
  • offset*
  • Returns the list of programs levels for setting a retag for the website.
  • * Sets skipping and the number of records returned. For example limit=5&offset=2.

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET
https://api.admitad.com/retag/website/22/levels/

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

{
"_meta": {
"count": 5,
"limit": 20,
"offset": 0
},
"results": [
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 78,
"level": "Level 1. Main page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 81,
"level": "Level 2. Categories page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 82,
"level": "Level 3. Product page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 83,
"level": "Level 5. Page \"Thank you\""
},
{
"advcampaign": {
"id": 8,
"name": "AdvCamp 3"
},
"id": 84,
"level": "Level 1. Main page"
}
]
}

Description of API server response fields

Available program levels

Parameters

HTTP method Access rights URL Parameters Note
GET webmaster_retag https://api.admitad.com/retag/advcampaign/{advcampaign_id}/levels/
  • limit*
  • offset*
  • Returns the list of program levels for setting a ReTag.
  • * Sets skipping and the number of records returned. For example limit=5&offset=2.

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X GET
https://api.admitad.com/retag/advcampaign/6/levels/

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

{
"_meta": {
"count": 4,
"limit": 20,
"offset": 0
},
"results": [
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 78,
"level": "Level 1. Main page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 81,
"level": "Level 2. Categories page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 82,
"level": "Level 3. Product page"
},
{
"advcampaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 83,
"level": "Level 5. Page \"Thank you\""
}
]
}

Description of API server response fields

Name Description
id Level identifier (unique for each program level)
name Name of level
advcampaign Information about the program

List of ReTag tags

Parameters

HTTP method Access rights URL Parameters Note
GET webmaster_retag https://api.admitad.com/retag/
  • limit**
  • offset**
  • website***
  • active****
Returns the list of Postback URLs*.
GET webmaster_retag https://api.admitad.com/retag/{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 publisher's ad spaces. For example, &website=12, where the value is the ad space identifier.
  • **** Filter by active/inactive ReTag codes. For example, &active=0, only inactive &active=1, only active

Example of use

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

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

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

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

{
"_meta": {
"count": 8,
"limit": 2,
"offset": 0
},
"results": [
{
"active": false,
"comment": "Test",
"id": 11,
"level": {
"campaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 78,
"name": "Level 1. Main page"
},
"script": "<script>console.log('test script')</script>",
"status": 1,
"website": {
"id": 22,
"name": "site1_of_webmaster1"
}
},
{
"active": true,
"comment": "Test script #2",
"id": 15,
"level": {
"campaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 78,
"name": "Level 1. Main pageа"
},
"script": "<script>console.log(\"loaded\")</script>",
"status": 2,
"website": {
"id": 22,
"name": "site1_of_webmaster1"
}
}
]
}

Description of API server response fields

Name Description
id Tag identifier
website Tag ad space
comment Comment to the tag
level Program level
script Tag
active Activation status (true — active, false — inactive)
status Moderation status (0 — accepted, 1 — rejected, 2 — in moderation, 3 — active, 4 — stopped, 5 — stopped by the advertiser)

Create ReTag tags

Parameters

HTTP method Access rights URL Parameters Note
POST manage_webmaster_retag https://api.admitad.com/retag/create/ Parameter request list
  • * Returns the result in the JSON format.

Parameter request list

Name Type Required Settings restrictions Allowed values
website integer   The list of publisher's ad spaces
level integer   Available program levels
active integer     0 — inactive, 1 — active
script string   "Body" of the tag
comment string     Comment to the tag

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X POST
https://api.admitad.com/retag/create/ -d
'website=22&level=78&active=1&comment=test&script=test'

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

{
"active": true,
"comment": "test",
"id": 17,
"level": {
"campaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 78,
"name": "Level 1. Main page"
},
"script": "test",
"status": 2,
"website": {
"id": 22,
"name": "site1_of_webmaster1"
}
}

Description of API server response fields

Edit ReTag tags

Parameters

HTTP method Access rights URL Parameters Note
POST manage_webmaster_retag https://api.admitad.com/retag/update/{id}/ Parameter request list
  • * Returns the result in the JSON format.

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X POST
https://api.admitad.com/retag/update/17/ -d
'level=82&comment=test_1&script=test_1&active=1'

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

{
"active": true,
"comment": "test_1",
"id": 17,
"level": {
"campaign": {
"id": 6,
"name": "AdvCamp 1"
},
"id": 82,
"name": "Level 3. Product page"
},
"script": "test_1",
"status": 2,
"website": {
"id": 22,
"name": "site1_of_webmaster1"
}
}

Description of API server response fields

Delete ReTag tags

Parameters

HTTP method Access rights URL Parameters Note
POST manage_webmaster_retag https://api.admitad.com/retag/delete/{id}/ Parameter request list Returns the result of the operation, where id is the ad space ID*.
  • * Returns the result in the JSON format.

Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X POST
https://api.admitad.com/retag/delete/17/

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

{
"message": "The tag record was deleted successfully",
"success": "Deleted"
}