Zones
Access to zones is provided to all users who have the appropriate permission in their personal account.
For getting information about zones, the following requests are provided:
The list method allows you to get a list of the zones
Request:
{site_path}/{lang}/api/zone/list
GET parameters list:
filter | array | Allows filtering data by all available fields |
fields | string | Allows to select only the specified fields from all available |
sort | string | Allows you to sort asc and desc entities by all available fields |
page | int | Allows you to pass the page number of the list of entities |
List of all available fields
id | int | Zone ID |
siteID | int | User ID |
name | string | Zone name |
active | boolean | Zone status Values:
|
typeName | string | Zone type |
format0 format1 format2 format3 format4 format5 |
int | Zone size |
doubleViewTime | int | The number of seconds until the next zone request to count impressions |
deepSession | int | deepSession |
betweenView | int | betweenView |
clicks | int | Total clicks |
clicksToday | int | Clicks for the current day |
clicksYtd | int | Clicks over the past day |
views | int | Total views |
viewsToday | int | Views for the current day |
viewsYtd | int | Views over the past day |
created_by | int | Zone creator's ID |
updated_by | int | ID of the last user who edited the zone |
created_at | int | UTC zone creation time |
updated_at | int | UTC last edit time |
assignID | int | ID of the user responsible for the zone |
siteName | string | Name of the site related to zone |
siteUserID | int | ID user of the related site |
publisher | string | Publisher name |
siteAssignID | int | ID of the user responsible for the related site |
notes | string | Zone notes |
tag | array |
Tags |
Response
The response is transmitted in JSON format. List of response fields:
result | array | List of zones based on query parameters |
_links | array | List of navigation links. May contain the following elements:
|
_meta | array | Information on list navigation. Contains elements:
|
Request example:
{site_path}/{lang}/api/zone/list?filter[id][in][]=1&filter[id][in][]=2&filter[id][in][]=3&filter[name][like]=first&sort=name
Response example:
{ "result": [ { "id": 1, "siteID": 2004937903, "name": "First", "active": "1", "typeName": "branding", "format0": 3, "format1": 1, "format2": 55, "format3": 0, "format4": 0, "format5": 0, "doubleViewTime": 0, "deepSession": 0, "betweenView": 0, "clicks": 0, "clicksToday": 0, "clicksYtd": 0, "views": 18181, "viewsToday": 0, "viewsYtd": 0, "created_by": 1, "updated_by": 907, "updated_at": 1571820197, "created_at": 1508851272, "assignID": 0, "siteName": "Test", "siteUserID": "908", "publisher": "name", "siteAssignID": "0", "notes": "", "tag": { "1": "sport", "2": "general" } } ], "_links": { "self": { "href": "{site_path}/{lang}/api/zone/list?filter%5Bid%5D%5Bin%5D%5B0%5D=1&filter%5Bid%5D%5Bin%5D%5B1%5D=2&filter%5Bid%5D%5Bin%5D%5B2%5D=3&page=1" } }, "_meta": { "totalCount": 1, "pageCount": 1, "currentPage": 1, "perPage": 20 } }
The view method provides extended information about the zone
Request:
{site_path}/{lang}/api/zone/view/[id]
GET parameters list:
id | int | It is a required parameter. Zone number |
fields | string |
Allows to select only the specified fields from all available *Does not apply to related entity fields |
List of all available fields
id | int | Zone ID |
siteID | int | User ID |
name | string | Zone name |
active | boolean | Zone status Values:
|
typeName | string | Zone type |
format0 format1 format2 format3 format4 format5 |
int | Zone size |
doubleViewTime | int | The number of seconds until the next zone request to count impressions |
deepSession | int | deepSession |
betweenView | int | betweenView |
clicks | int | Total clicks |
clicksToday | int | Clicks for the current day |
clicksYtd | int | Clicks over the past day |
views | int | Total views |
viewsToday | int | Views for the current day |
viewsYtd | int | Views over the past day |
created_by | int | Zone creator's ID |
updated_by | int | ID of the last user who edited the zone |
created_at | int | UTC zone creation time |
updated_at | int | UTC last edit time |
assignID | int | ID of the user responsible for the zone |
siteName | string | Name of the site related to zone |
siteUserID | int | ID user of the related site |
publisher | string | Publisher name |
siteAssignID | int | ID of the user responsible for the related site |
notes | string | Zone notes |
site | array |
Sites related to the zone All available site fields you can see on this page |
pool | array |
Pools related to the zone All available pool fields you can see on this page |
tag | array |
Tags |
Request example:
{site_path}/{lang}/api/zone/view/1
Response example:
{ "id": 1, "siteID": 2004937903, "name": "First", "active": null, "typeName": null, "format0": 3, "format1": 1, "format2": 55, "format3": 0, "format4": 0, "format5": 0, "doubleViewTime": 0, "deepSession": 0, "betweenView": 0, "clicks": 8, "clicksToday": 0, "clicksYtd": 0, "views": 18181, "viewsToday": 0, "viewsYtd": 0, "created_by": 1, "updated_by": 907, "updated_at": 1571820197, "created_at": 1508851272, "assignID": 0, "siteName": Test, "siteUserID": 908, "publisher": null, "siteAssignID": null, "notes": "", "site": { "id": "2004937903", "userID": "908", "name": "Test", "url": "http", "alias": "test", "notes": "do not delete, just for test", "clicks": "194", "clicksToday": "0", "clicksYtd": "0", "views": "215893", "viewsToday": "2", "viewsYtd": "4", "created_by": "907", "updated_by": "907", "updated_at": "1571995099", "created_at": "1522404319", "assignID": "0", "iabCat": "1", "publisher": "name", "active": "1" }, "pool": [ { "id": "1", "name": "pool name", "typeID": "1", "assignID": "0", "chain": "0", "priority": "1", "views": "0", "viewsToday": "0", "viewsYtd": "0", "clicks": "0", "clicksToday": "0", "clicksYtd": "0", "created_by": "0", "updated_by": "906", "created_at": "0", "updated_at": "1532346144", "attach_created_by": "0", "attach_updated_by": "906", "attach_created_at": "0", "attach_updated_at": "1532346131", "attached": "1", "active": "1" }, ], "tag": [ {"id": 1, "name": "sport"}, {"id": 2, "name": "general"}, ] }