Ad Unit Creation API

1. Website:

Method: POST

URL: https://api.vertoz.com/ip/addunit

add unit refers to ad placements in selected Website, Mobile App or Vast Site.

Following table describes the parameters that contains the requested JSON body:

Request Fields

Parameters Is Required Description Type
website Yes

Contains the ID of the Website.

For example,

website”: {“entry_id”: 1805 }

This is site entry ID or site ID.

object
productId Yes

Displays the product ID

of the selected products.

int
sizeMaster Yes Contains the list f the sizeMaster JSON object. object

Following table describes the parameters wrapped by the adUnit – sizeMaster object:

Parameters Is Required Description Type
entry_id Yes Includes the complete list of JSON objects which contain the size ID and ad type ID, for example, paged int
adType Yes Holds the ad type ID for example, “adType”:{entry_id”:1} object
adServeTypeId Yes (Only in case of Header Bidding) 3 int

Following table describes the parameters wrapped by the adUnit – sizeMaster object: Response

Parameters Type Description
message String

Displays the success or

error message for

the operation performed

by the users.

statusCode int

Displays the status code

for the operation performed

by the users.For example,

it will display 200 for success

and 406 for error.

data object

Stores the ID or entry ID

of the size unit if the

data object contains JSON.

This ID can be used for unit

updation of json: {“ids”: 6657,

“name”:”www.testvertoz1123.com_160_600″}

Response Parameters

Example: Website 

1. Request API: 

https://api.vertoz.com/ip/addunit

Method: POST

Request:

{
“sizeMaster”: [{
“entry_id”: 16,
“adType”: {
“entry_id”: 1
}
}],
“website”: {
“entry_id”: 12398
},
“productId”: 1
}

Response:

{
“message”: ” 300 x 600 Unit is added successfully for selected Website”,
“data”:
{
“id”: 0,
“name”: “[ClientSite.com_300_600_0]”,
“ids”:
[
45172
]
},
“statusCode”: 200
}

Example: Website (Header Bidding)

{
“sizeMaster”: [{
“adServeTypeId”: 3,
“entry_id”: 1,
“adType”: {
“entry_id”: 1
}
}],
“website”: {
“entry_id”: 12753
},
“productId”: 1
}Response : Website (Header Bidding){
“message”: ” 160 x 600 Unit is added successfully for selected Website”,
“data”: {
“id”: 0,
“name”: “[headerbiddingsizetest1.com_160_600_1]”,
“ids”: [
46543
]
},
“statusCode”: 200
}

 

1. Request API:

Example: Mobile App

https://api.vertoz.com/ip/addunit

Method: POST

Request:

{
“sizeMaster”: [{
“entry_id”: 21,
“adType”: {
“entry_id”: 6
}
}, {
“entry_id”: 44,
“adType”: {
“entry_id”: 6
}
}
}],
“website”: {
“entry_id”: 12400
},
“productId”: 3,
“commentsHistory”: []
}

 

Response:

{
“message”: ” 300 x 50, 300 x 50 Units are added successfully for selected Mobile App”,
“data”: {
“id”: 0,
“name”: “[MobileSite.com_300_50_0, MobileSite.com_300_50_0]”,
“ids”: [45176, 45177]
},
“statusCode”: 200
}

 

Example: Vast

1. Request API:

https://api.vertoz.com/ip/addunit

Method: POST

Request:

{
“sizeMaster”: [{
“entry_id”: 0,
“adType”: {
“entry_id”: 11
}
}, {
“entry_id”: 56,
“adType”: {
“entry_id”: 11
}
}],
“website”: {
“entry_id”: 12399
},
“productId”: 5,
}

 

Response:

{
“message”: ” VAST 3.0 Unit is added successfully for selected Vast”,
“data”:
{
“id”: 0,
“name”: “[VastSite.com_VAST3.0_0]”,
“ids”:
[
45174
]
},
“statusCode”: 200
}

 

Update Website AdUnit

 URL: https://api.vertoz.com/ip/updateunit

Method: POST

Request:

{

“entry_id”: 45172, “unitName”: “ClientSite.com_300_600_0”, “statusId”: 1

}

Response:

{

“message”: “Ad Unit updated successfully.”, “statusCode”: 200

}