Publisher ad spaces

The list of publisher’s ad spaces

Parameters

HTTP method Access rights URL Parameters Note
GET websites https://api.admitad.com/websites/v2/
  • status*
  • campaign_status**

Returns the list of ad spaces.*

GET websites https://api.admitad.com/websites/v2/{id}/  

Returns the ad space, where id is ad space identifier.*

  • *** Filter by the ad space status. Possible values:
    • new
    • active
    • suspended
  • *** Filter by the status of cooperation with the ad space. Possible values:
    • pending
    • active
    • declined
    • disabled

Example of use

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

curl -L -H 'Authorization: Bearer access-token' -X GET https://api.admitad.com/websites/v2/


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

[
{
"status": "active",
"kind": "website",
"is_old": true,
"account_id": "",
"verification_code": "59505879f5",
"creation_date": "2010-03-31T18:25:19",
"id": 22,
"site_url": "http://www.test.ru/",
"validation_passed": false,
"name": "Site 1",
"is_lite": false
},
{
"status": "active",
"kind": "",
"is_old": true,
"account_id": "",
"verification_code": "bc76d01ad4",
"creation_date": "2010-03-31T18:25:38",
"id": 23,
"site_url": "http://www.test.ru/",
"validation_passed": false,
"name": "Site 2",
"is_lite": false
}
]


Description of API server response fields

Name

Description

id

Ad space ID

name

Name of ad space

status

Ad space status

creation_date

Ad space creation date

site_url

Ad space website

verification_code

Verification code

validation_passed

Indicator for successful validation

is_old

Old-type indicator

account_id

Account identifier

is_lite

Whether this is a Lite ad space

kind Types of ad spaces

 

Creating a publisher’s ad space

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST manage_websites https://api.admitad.com/websites/v2/create/ Parameter request list
  • Request data format application/json

  • Returns created ad space.*

  • * Returns the result in the JSON format.


Parameter request list

Name

Type

Required

Settings restrictions

Note, allowed values

name string max length - 200  
kind string max length - 20 Types of ad spaces (‘social_network’, ‘traffic_purchase’)
url string   max length - 255  
category array of integers     Categories of affiliate programs
region array of strings     Ad space regions


Example of data for a request

{
"name": "Test Website",
"kind": "social_network",
"url": "https://test.com",
}


Example of use

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

curl -L -H 'Authorization: Bearer access_token' -H "Content-Type: application/json" -X POST https://api.admitad.com/websites/v2/create/ -d '{ "name": "Test Website", "kind": "social_network", "url": "https://test.com" }'


Example of a raw request
:

POST /websites/v2/create/ HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: api.admitad.com
Accept: */*
Authorization: Bearer access_token
Content-Type: application/json
{
"name": "Test Website",
"kind": "social_network",
"url": "https://test.com",
}


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

{
"status": "active",
"kind": "social_network",
"is_old": false,
"account_id": "",
"verification_code": "d47d616e54",
"creation_date": "2020-02-06T16:22:46",
"id": 35,
"site_url": "",
"validation_passed": false,
"name": "Test Website",
"is_lite": false
}


Description of API server response fields

Name

Description

id

Ad space ID

name

Name of ad space

status

Ad space status

creation_date

Ad space creation date

site_url

Ad space website

verification_code

Verification code

validation_passed

Indicator for successful validation

is_old

Old-type indicator

account_id

Account identifier

is_lite

Whether this is a Lite ad space

kind Types of ad spaces

 

Editing the publisher’s ad space

Parameters

HTTP method

Access rights

URL

Parameters

Note

POST manage_websites https://api.admitad.com/websites/v2/update/{id}/ Parameter request list
  • Request data format application/json

  • Returns the updated ad space.*, where id is the ad space ID.*

  • * Returns the result in the JSON format.


Parameter request list

Name

Type

Required

Settings restrictions

Note, allowed values

name string   max length - 200  
url string   max length - 255  


Example of data for a request

{
"name": "Test Website Updated",
"url": "https://updated.test/"
}


Example of use

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

curl -L -H 'Authorization: Bearer access_token' -H "Content-Type: application/json" -X POST https://api.admitad.com/websites/v2/update/63/ -d '{ "name": "Test Website Updated", "url": "https://updated.test/"}'


Example of a raw request
:

POST /websites/v2/update/63/ HTTP/1.1
User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
Host: api.admitad.com
Accept: */*
Authorization: Bearer access_token
Content-Type: application/json
{ "name": "Test Website Updated",
"url": "https://updated.test/"
}


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

{
"status": "active",
"kind": "website",
"is_old": true,
"account_id": "",
"verification_code": "59505879f5",
"creation_date": "2010-03-31T18:25:19",
"id": 22,
"site_url": "https://updated.test/",
"validation_passed": false,
"name": "Test Website Updated",
"is_lite": false
}


Description of API server response fields

Name

Description

id

Ad space ID

name

Name of ad space

status

Ad space status

creation_date

Ad space creation date

site_url

Ad space website

verification_code

Verification code

validation_passed

Indicator for successful validation

is_old

Old-type indicator

account_id

Account identifier

is_lite

Whether this is a Lite ad space

kind Types of ad spaces

 

Confirmation of a publisher’s ad space

Parameters

HTTP method

Access rights

URL

Note

POST manage_websites https://api.admitad.com/websites/v2/verify/{id}/

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/websites/v2/verify/8/


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

{
"message": "Ad space validated successfully.",
"success": "Accepted"
}

 

Deleting a publisher’s ad space

Parameters

HTTP method

Access rights

URL

Note

POST manage_websites https://api.admitad.com/websites/v2/delete/{id}/

Returns the result of the operation, where id is the ad space ID.*

  • * Responds with the “200” status in case of successful operation.


Example of use

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

curl -L -H 'Authorization: Bearer access_token' -X POST https://api.admitad.com/websites/v2/delete/8/

 

Description of API server response fields

Name

Description

id

Ad space ID

name

Name of ad space

status

Ad space status

creation_date

Ad space creation date

site_url

Ad space website

verification_code

Verification code

validation_passed

Indicator for successful validation

is_old

Old-type indicator

account_id

Account identifier

is_lite

Whether this is a Lite ad space

kind Types of ad spaces