You can use the delivery group resource to retrieve a a set of delivery groups or a delivery group attached to a specific placement, create a new delivery group, modify a delivery group, replace an existing delivery group, enable/disable a placement, or detach a delivery group from a placement.
HTTP Method |
URI |
Description |
---|---|---|
/deliveryGroups/ |
Retrieves a set of delivery groups. |
|
/deliveryGroups/placement/{id} |
Retrieves delivery groups attached to a specific placement. |
|
/deliveryGroups/{id} |
Retrieves an existing delivery group. |
|
/deliveryGroups/swapDeliveryGroups |
Replaces an existing delivery group. |
|
/deliveryGroups/ |
Modifies a delivery group. |
|
|
Attaches an ad or a delivery group to a placement. |
|
|
Detaches a delivery group from a placement. |
|
/deliveryGroups/enableDisable |
Enables/disables a delivery group. |
|
/deliveryGroups/ |
Creates a new delivery group. |
Important
Important:
-
For PUT calls, do the following:
-
For any PUT method that updates an object, make sure that you include the entire "result": object from the GET response in the request body. If there is missing information, even if it is read-only, the request might fail or override the existing fields with the new values.
-
You must also change the "result": to "entities": and make the entities contents into an array. For example, here is the output from the GET request:
{ "result": { "type": "Advertiser", ... } }
You should make the following modifications, including your specific modifications, to the json object that you submit for the request.
{ "entities": [{ "type": "Advertiser", ... }] }
-
-
For POST calls, do the following:
-
Include the fields marked as Required, as indicated in the corresponding Object article.
-
Format the JSON object as follows:
{ "entities": [{ "type": "Advertiser", ... }] }
-
Retrieves multiple delivery groups. Can be filtered according to query parameters.
Name |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
from |
Starting index by which to fetch new campaigns for paging purposes. |
Long |
Required |
Getting multiple entities requires using from and max query parameters. |
max |
Maximum number of campaigns to fetch for each page. |
Long |
Required |
|
q |
Filtering options for the request (see here). |
String |
Optional |
Example of query string: q={"1":{"CREATEDBYNAME":["MonicaSmith"]},"2":{"ADVERTISERNAME":["autoads"]}} NoteNote: The date is according to the Unix epoch timestamp. |
order |
Sort order ASC or DESC, required if sort field name is specified (see here). |
String |
Optional NoteNote: Required if a sort field name is specified. |
By default, the API response is ascending. |
sort |
Sort by field name (see here). |
String |
Optional |
|
campaignID |
Campaign IDs from which to retrieve delivery groups. |
Long |
Optional |
Retrieves all delivery groups attached to a specific placement.
Retrieves an existing delivery group.
Replaces an existing delivery group that is attached to a placement.
Name |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
Body |
Request containing delivery group to replace. |
JSON |
Required |
Modifies an existing delivery group.
NAME |
DESCRIPTION |
TYPE |
REQUIRED |
NOTES |
---|---|---|---|---|
id |
ID of the delivery group. |
Long |
Required |
|
Body |
Request containing delivery group to replace. |
JSON |
Required |
There are two types of API calls for attachment:
-
Simple: Attaches placements to ads without using delivery groups. Use this flow when you have single ads in each placement, or when you have multiple ads that can be rotated evenly.
-
Advanced: Attaches placements to delivery groups. Use this flow when attaching multiple ads to placements and setting up rotation settings. This option is mandatory when using targeting or retargeting features.
Name |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
type |
Read-only |
SimpleAttachmentDataContainer |
||
campaignId |
ID of campaign on which you are working. |
Long |
Required |
|
simpleAttachmentDataList |
List that includes the placement and ad to attach. |
Object |
Required |
|
type |
Read-only |
simpleAttachmentData |
||
placementId |
ID of the placement. |
Long |
Required |
|
adIds |
IDs of the ads to attach. |
Long |
Required |
|
enableAds |
Indicates whether the ad is enabled or disabled (for serving purposes). |
Boolean |
Required |
Name |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
type |
Read-only |
AdvancedAttachmentDataContainer |
||
advancedAttachmentDataList |
List that includes the delivery group and placements to attach. |
Object |
Required |
|
type |
Read-only |
AdvancedAttachmentData |
||
deliveryGroupId |
ID of the delivery group to which to attach placements. |
Long |
Required |
|
placementsIds |
IDs of the placements to attach. |
Long |
Required |
|
campaignId |
ID of campaign on which you are working. |
Long |
Required |
Detaches a delivery group from a placement.
NAME |
DESCRIPTION |
TYPE |
REQUIRED |
NOTES |
---|---|---|---|---|
Body |
Request containing delivery group to detach. |
JSON |
Required |
-
PUT https://adapi.sizmek.com/sas/deliveryGroups/simpleDetach/
-
PUT https://adapi.sizmek.com/sas/deliveryGroups/partialDetachPlacementsFromDeliveryGroups
Enables/disables a delivery group from a placement.
NAME |
DESCRIPTION |
TYPE |
REQUIRED |
NOTES |
---|---|---|---|---|
id |
ID of the delivery group. |
Long |
Required |
|
Body |
Request containing delivery group to enable/disable. |
JSON |
Required |
Creates a new delivery group.
Name |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
Body |
Request containing delivery group body |
JSON |
Required |
The following table lists the possible HTTP status codes in responses.
Code |
String |
Description |
---|---|---|
200 OK |
Success |
Successful API execution |
500 |
Internal Error |
500 Internal server errors |
The following shows an example of an internal server error in a response body.
The following table lists the possible internal server errors for the advertiser resource.
INTERNAL CODE |
STRING |
DESCRIPTION |
---|---|---|
41002 |
Ad format mismatch. |
The ad that was added to the delivery group does not match the other ads. A delivery group can either include all video (In-Stream) ads, or all In-Banner ads, but not a mixture of ad types. |
41004 |
Ad does not belong to same campaign as delivery group. |
The ad that was added does not belong to the selected campaign. You should first assign the ad to the selected campaign. |
41005 |
Placement does not belong to same campaign as delivery group. |
The placement and delivery group must be in the same campaign. |
41013 |
Duplicate delivery group placements. |
The delivery group is already attached to the selected placement. |
41014 |
Delivery group type is different than placement. |
The placement type (In-Banner/In-Stream) must match the delivery group type. |
41021 |
Could not connect the placements and ad due to sizing mismatch. |
The placements' dimensions and the ads' dimensions are not the same, and therefore cannot be attached. You can either change the placements' dimensions or attach a different placement. |
41024 |
Failed to detach placement from delivery group. All placements must belong to any untargeted delivery group. |
The placement cannot be detached from the delivery group because the delivery group is the last untargeted delivery group attached to this placement. |
41025 |
Delivery group target audience cannot be changed for published delivery group. |
Delivery group target audience cannot be changed for published delivery group |
Comments