PRODUCT

Amazon Ad Server will be sunset in Q4 2024, please visit this page (AAS offboarding information) for offboarding support resources and sunset FAQs. Details shared on that page represent the most up to date information in the Help Center, if you find disparate information in other resources please default to the information in the AAS offboarding information page accordingly.

Please note that on October 1, 2024, the ability to create new campaigns, placements and tag managers was disabled.

Follow

Overview

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.

Resource URL

https://adapi.sizmek.com/sas/deliveryGroups/

Objects Used by This Resource

HTTP Method and URI List

HTTP Method

URI

Description

GET

/deliveryGroups/

Retrieves a set of delivery groups.

GET

/deliveryGroups/placement/{id}

Retrieves delivery groups attached to a specific placement.

GET

/deliveryGroups/{id}

Retrieves an existing delivery group.

PUT

/deliveryGroups/swapDeliveryGroups

Replaces an existing delivery group.

PUT

/deliveryGroups/

Modifies a delivery group.

PUT

  • /deliveryGroups/simpleAttachment

  • /deliveryGroups/advancedAttachment

Attaches an ad or a delivery group to a placement.

PUT

  • /deliveryGroups/simpleDetach/

  • /deliveryGroups/partialDetachPlacementsFromDeliveryGroups

Detaches a delivery group from a placement.

PUT

/deliveryGroups/enableDisable

Enables/disables a delivery group.

POST

/deliveryGroups/

Creates a new delivery group.

Method Examples and Request Parameters

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", ... }] }   

Get Multiple Delivery Groups (GET)

Retrieves multiple delivery groups. Can be filtered according to query parameters.

Request 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"]}}

Note

Note: 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

Note

Note: 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

Request Format

GET https://adapi.sizmek.com/sas/deliveryGroups/?from=0&max=250

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the delivery groups' details.

Get Delivery Groups Attached to a Placement (GET)

Retrieves all delivery groups attached to a specific placement.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

ID

Placement ID

Long

Required

Request Format

GET https://adapi.sizmek.com/sas/deliveryGroups/placement/1234567890

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the delivery group details for the specific placement.

Get an Existing Delivery Group (GET)

Retrieves an existing delivery group.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

ID

Delivery group ID.

Long

Required

Request Format

GET https://adapi.sizmek.com/sas/deliveryGroups/1234567890

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the delivery group's details.

Replace an Existing Delivery Group (PUT)

Replaces an existing delivery group that is attached to a placement.

Request Parameters

Name

Description

Type

Required

Notes

Body

Request containing delivery group to replace.

JSON

Required

Request Format

PUT https://adapi.sizmek.com/sas/deliveryGroups/swapDeliveryGroups

Response Format

A successful request returns the HTTP 200 OK status code, and a JSON response body that shows the new delivery group's details.

Update an Existing Delivery Group (PUT)

Modifies an existing delivery group.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

id

ID of the delivery group.

Long

Required

Body

Request containing delivery group to replace.

JSON

Required

Request Format

PUT https://adapi.sizmek.com/sas/deliveryGroups/

Attach an Ad or Delivery Group to a Placement (PUT)

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.

Request Parameters for Simple Attach

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

Request Parameters for Advanced Attach

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

Request Format
  • PUT https://adapi.sizmek.com/sas/deliveryGroups/simpleAttachment

  • PUT https://adapi.sizmek.com/sas/deliveryGroups/advancedAttachment

Response Format

Detach a Delivery Group From a Placement (PUT)

Detaches a delivery group from a placement.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

Body

Request containing delivery group to detach.

JSON

Required

Request Format

  • PUT https://adapi.sizmek.com/sas/deliveryGroups/simpleDetach/

  • PUT https://adapi.sizmek.com/sas/deliveryGroups/partialDetachPlacementsFromDeliveryGroups

Response Format

A successful request returns the HTTP 200 OK status code with the detached delivery group in the JSON response body.

Enable/Disable a Delivery Group From a Placement (PUT)

Enables/disables a delivery group from a placement.

Request Parameters

NAME

DESCRIPTION

TYPE

REQUIRED

NOTES

id

ID of the delivery group.

Long

Required

Body

Request containing delivery group to enable/disable.

JSON

Required

Request Format

PUT https://adapi.sizmek.com/sas/deliveryGroups/enableDisable

Response Format

A successful request returns the HTTP 200 OK status code with the enabled/disabled delivery group in the JSON response body.

Create a Delivery Group (POST)

Creates a new delivery group.

Request Parameters

Name

Description

Type

Required

Notes

Body

Request containing delivery group body

JSON

Required

Request Format

POST https://adapi.sizmek.com/sas/deliveryGroups/

Response Format

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the new delivery group resource.

Status Codes and Errors

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

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

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments