Channel Management
getChannelListByAgencyId
Description: Get all channels from selected agency
Implementation: URL/chn/agc/[agencyId]
Method: GET
Json example
Method: GET http://api.example.com/chn/agc/1
getChannelListByWebsiteId
Description: Get all channels from selected website
Implementation: URL/chn/website/[websiteId]
Method: GET
Json example
Method: GET http://api.example.com/chn/website/1
getChannel
Description: Get existing channel
Implementation: URL/chn/[channelId]
Method: GET
Json example
Method: GET http://api.example.com/chn/1
addChannel
Description: Add new channel
Implementation: URL/chn/new
Method: POST/PUT
Requested parameters
Name | Description: | Allowed Values | Required / Optional | Default |
---|---|---|---|---|
channelName | channel name | string | required | – |
agencyId | agency ID | int | optional | null |
websiteId | website ID | int | optional | null |
Description: | channel Description: | string | optional | null |
comments | comments | string | optional | null |
Json example
Method: POST http://api.example.com/chn/new Request Header: Content-Type:text/javascript Request Body: { "channelName":"My new channel", "agencyId":1, "websiteId":1, "Description: ":"test channel Description: ", "comments":"test channel comments" }
modifyChannel
Description: Modify existing channel
Implementation: URL/chn/[channelId]
Method: POST/PUT
Requested parameters
Name | Description: | Allowed Values | Required / Optional | Default |
---|---|---|---|---|
channelName | channel name | string | optional | null |
agencyId | agency ID | int | optional | null |
websiteId | website ID | int | optional | null |
Description: | channel Description: | string | optional | null |
comments | comments | string | optional | null |
Json example
Method: POST http://api.example.com/chn/4 Request Header: Content-Type:text/javascript Request Body: { "channelName":"My new channel", "agencyId":1, "websiteId":1, "Description: ":"test channel Description: ", "comments":"test channel comments" }
deleteChannel
Description: Delete existing channel
Implementation: URL/chn/[channelId]
Method: DELETE
Json example
Method: DELETE http://api.example.com/chn/4
getChannelTargeting
Description: Returns all channel’s delivery limitations
Implementation: URL/bnn/[channelId]/targeting
Method: GET
Json example
Method: GET http://api.example.com/chn/1/targeting
setChannelTargeting
Description: Sets delivery limitation for particular channel. All previous delivery limitation for the channel will be deleted.
Implementation: URL/chn/[channelId]/targeting
Method: POST/PUT
Parameters
Name | Description: | Allowed Values | Required / Optional | Default |
---|---|---|---|---|
logical | logical parameter | enum(and,or) | required | |
type | type of the delivery limitation | string | required | |
comparation | type of comparation | enum (=~,!=~,==,!=,>,<….) | required | |
data | comparation data | string | required |
Json example
Method: POST http://api.example.com/chn/1/targeting Request Body: [ { "logical": "and", "type": "deliveryLimitations:Client:Browser", "comparison": "=~", "data": "FX,MZ,OP" }, { "logical": "and", "type": "deliveryLimitations:Client:Ip", "comparison": "!=", "data": "10.0.0.1" } ]