PRODUCT
Follow

Overview

This entity represents the ad resource properties. This article includes the available methods for the ad resource.

Ad Resource

Click a link to see the complete list of fields and a sample JSON for each ad type.

In-Banner

Expandable

In-Stream

Methods

Note: Depending on the API user that was created for you, use one of the following URLs:
  • https://api.sizmek.com/rest/ads
  • https://adapi.sizmek.com/sas/ads
Confirm with your client services manager regarding the correct URL to use.
Description

Retrieves a specific ad by ID.

Request Example
GET https://api.sizmek.com/rest/ads/123
Parameters
Name  Type  Parameter Type  Description 
ID Long  Path  ID of ad to fetch 
Response Example

If request is successful, response will be 200 OK and the requested ad resource in the response body.

Description

Retrieves a list of ads according to the ad filter. Can be filtered.

Request Example
GET https://api.sizmek.com/rest/ads?from=0&max=250

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
campaignId Long  Query Campaign id
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
sort String Query Sort by field name (For more information, click here.)
order String Query Sort order ASC or DESC, required if sort field name is specified (For more information, click here.)
q String Query Query string to search (For more information, click here.)
permissionNames String Query Permission name to filter by
Response Example

If request is successful, response will be 200 OK with the response body:

 
{
"metadata":{
"total": 9878
},
"error": null,
"result":[
{"type": "Ad", "id": 1073928827, "clientRefId": null, "relationsBag":{"parents": null,…},
{"type": "Ad", "id": 1073928826, "clientRefId": null, "relationsBag":{"parents": null,…}
]
}

Description

Creates or saves a new ad. The ad creation process is dynamic according to the ad format you select. Different parameters are available depending on the type of ad.

Request Example
POST https://api.sizmek.com/rest/ads/
Parameters
Name  Type  Parameter Type  Description 
Body    Body UIRequest containing ad to create
Response Example

If request is successful, response will be 200 OK.

{
  "entities": [
    {
      "type": "StandardBannerAd",
      "name": "Samsung new phone 300X900 2",
      "masterAdId": "",
      "changed": false,
      "adStatus": "ENABLED",
      "adFormat": "STANDARD_BANNER_AD",
      "accountId": "1",
      "mainClickthrough": {
        "type": "MainClickthrough",
        "url": "www.msn.com",
        "targetWindowType": null,
        "isShowAddressBar": true,
        "isShowMenuBar": false,
        "isCloseAllAdParts": false
      },
      "defaultImageClickthrough ": {
        "type": "Clickthrough",
        "url": "www.apple.com"
      },
      "defaultImage": {
        "type": "AdAsset",
        "assetId": "156155",
        "name": null
      },
      "banner": {
        "type": "AdAsset",
        "assetId": "156600",
        "name": null
      },
      "tooltip": ""
    }
  ]
}
Description

Updates the properties of the specified ad.

Request example
PUT https://api.sizmek.com/rest/ads/1234
Parameters
Name  Type  Parameter Type  Description 
id  Long  Path  ID of ad to fetch 
Body    Body UI request containing ad to update
Response Example

If request is successful, response will be 200 OK with the updated ad resource in the response body.

{
  "entities": [
    {
      "type": "StandardBannerAd",
      "id": "T4DY98P1J4",
      "name": "Samsung new phone 300X900 3",
      "masterAdId": "",
      "changed": false,
      "adStatus": "ENABLED",
      "adFormat": "STANDARD_BANNER_AD",
      "accountId": "1",
      "campaignId": "RH1ZCR2NSW",
      "placementId": "",
      "createdBy": "xxx",
      "createdOn": 1399552380157,
      "lastUpdatedBy": "xxx",
      "lastUpdateOn": 1399552380157,
      "mainClickthrough": {
        "type": "MainClickthrough",
        "id": "T4DY98P1J7",
        "url": "www.msn.com",
        "targetWindowType": null,
        "isShowAddressBar": false,
        "isShowMenuBar": false,
        "isCloseAllAdParts": false
      },
      "defaultImage": {
        "type": "AdAsset",
        "id": "T4DY98P1J6",
        "assetId": "156155",
        "name": null
      },
      "defaultImageClickthrough": {
        "type": "Clickthrough",
        "id": "T4DY98P1J5",
        "url": "www.apple.com"
      },
      "banner": {
        "type": "AdAsset",
        "id": "T4DY98P1J8",
        "assetId": "156600",
        "name": null
      },
      "tooltip": ""
    }
  ]
}
Description

Deletes an existing ad. 

Request Example
DELETE https://api.sizmek.com/rest/ads/1234
Parameters
Name  Type  Parameter Type  Description 
ID  Long  Path  ID of ad to fetch
Response Example

If request is successful, response will be 200 OK.

{
  "entities": [
    "HRA0HW","HRA0XG"
  ]
}
Description

Deletes all the ads according to the IDs. Can be filtered. You cannot delete ads that are live.

Request Example
DELETE https://api.sizmek.com/rest/ads?from=0&max=250

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
entities Long  Path IDs of ads to delete. Comma delineated list.
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK with the response body:

 
{
"metadata":{
"total": 9878
},
"error": null,
"result":[
{"type": "Ad", "id": 1073928827, "clientRefId": null, "relationsBag":{"parents": null,…},
{"type": "Ad", "id": 1073928826, "clientRefId": null, "relationsBag":{"parents": null,…}
]
}
Description

Assigns a master ad to a campaign.

Request Example
POST https://api.sizmek.com/rest/ads/assignMasterAd
Parameters
Name  Type  Parameter Type  Description 
ID  Long  Path  ID of campaign
Response Example

If request is successful, response will be 200 OK.

{
  "entities": [
    "19TI50K3NY8", "19TI8GV1RET"
  ]
}
Description

Unassigns a master ad from a campaign.

Request Example
POST https://api.sizmek.com/rest/ads/unassignMasterAdFromCampaign/456
Parameters
Name  Type  Parameter Type  Description 
ID  Long  Path  ID of campaign
Response Example

If request is successful, response will be 200 OK.

{
  "entities": [
    "19TI50K3NY8", "19TI8GV1RET"
  ]
}

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

Depending on the API user that was created for you, use one of the following request formats:

  • PUT https://api.sizmek.com/rest/deliveryGroups/simpleAttachment
  • PUT https://adapi.sizmek.com/sas/deliveryGroups/simpleAttachment
  • PUT https://api.sizmek.com/rest/deliveryGroups/advancedAttachment
  • PUT https://adapi.sizmek.com/sas/deliveryGroups/advancedAttachment
Example of Simple Attach
View Body

 

{
  "entities": [
    {
"type": " SimpleAttachmentDataContainer" ,
      "campaignId": 1083810552,
      "simpleAttachmentDataList": [
        {
          "type": "SimpleAttachmentData",
          "placementId": 1084027440,
          "adIds": [
            1085770226
          ]
        }
      ],
      "enableAds": true
    }
  ]
}

 

Example of Advanced Attach
View Body

 

{
  "entities": [
    {
"type": " AdvancedAttachmentDataContaine r",
      "advancedAttachmentDataList": [
        {
          "type": "AdvancedAttachmentData",
          "deliveryGroupId": 1073803945,
          "placementsIds": [
            1084027443
          ]
        }
      ],
      "campaignId": 1073790345
    }
  ]
}
Response Format
A successful request returns the HTTP 200 OK status code.
{
    "metadata": null,
    "debug": null,
    "error": [],
    "result": [1084027440]
}
A successful request returns the HTTP 200 OK status code.
{
    "metadata": null,
    "debug": null,
    "error": [],
    "result": [{
        "type": "DeliveryGroup",
        "id": 1073803945,
        "relationsBag": {
            "parents": {
                "account": {
                    "id": 1073741826,
                    "name": "QaAdminAccount",
                    "internal": false
                },
                "advertiser": {
                    "id": 1073746030,
                    "name": "03AdvertiserEidanTest05-01-17"
                },
                "brand": {
                    "id": 1073748832,
                    "name": "03AdvertiserEidanTest05-01-17"
                },
                "campaign": {
                    "id": 1073790345,
                    "name": "bat-el_advanced"
                },
                "site": null
            },
            "children": {
                "advertisers": {
                    "count": 0
                },
                "brands": {
                    "count": 0
                },
                "campaigns": {
                    "count": 0
                },
                "users": {
                    "count": 0
                }
            },
            "creativeAccountContact": false
        },
        "version": 1550747951428730880,
        "createdBy": 1073741831,
        "createdByName": "QaAdminUser",
        "createdByAccount": 1073741826,
        "createdByAccountName": "QaAdminAccount",
        "createdOn": 1502174301595,
        "lastUpdatedBy": 1073741831,
        "lastUpdatedByName": "QaAdminUser",
        "lastUpdatedByAccount": 1073741826,
        "lastUpdatedByAccountName": "QaAdminAccount",
        "lastUpdateOn": 1550747951430,
        "name": "dg",
        "subContainers": null,
        "placementType": "IN_BANNER",
        "width": 600,
        "height": 400,
        "rootContainer": {
            "type": "RootContainer",
            "id": null,
            "relationsBag": null,
            "childRotationType": "EvenDistribution",
            "aiMetric": null,
            "subContainers": [{
                "type": "DeliveryGroupAd",
                "id": 1085595849,
                "rotationSetting": {
                    "type": "EvenDistribution",
                    "enabled": true,
                    "rotationType": "EvenDistribution",
                    "weight": 100.0
                },
                "masterAdId": 1085770231,
                "name": "adddddddddddddd",
                "adName": "adddddddddddddd"
            }],
            "childOptimizationMetric": null,
            "childConversionTagId": null,
            "childConversionTagName": null,
            "acrossPlacement": false
        },
        "timeZone": 0,
        "servingSetting": {
            "type": "APIServingSetting",
            "impressionsPerUser": -1,
            "impressionsPerDay": -1,
            "timeBetweenAds": -1,
            "frequencyCappingLevel": false,
            "serveDefaultImage": true
        },
        "rotationAds": null,
        "placements": ["1084027443"],
        "defaultAds": [],
        "campaignId": 1073790345,
        "campaignName": null,
        "targetAudiencePriority": null,
        "targetAudienceId": null,
        "targetingTypeId": -1,
        "geoTargetingTypeId": -1,
        "geoTargetingCountryId": -1,
        "aosCrossPlacement": 0,
        "aoMethodTypeId": -1,
        "gmt": -1,
        "hideDisableAds": false,
        "servingTimeZoneType": "Brand",
        "targetAudienceName": "Untargeted",
        "strategyId": null,
        "strategyName": null,
        "automaticOptimization": false,
        "attachToTaContextual": false,
        "published": false,
        "sequenceLevelCrossPlacementSupport": false,
        "aoMethodType": -1
    }]
}
Description

Simple detach detaches an ad from a placement.

Request Parameters for Simple Detach
Name DESCRIPTION TYPE REQUIRED NOTES
campaignId ID of campaign on which you are working. Long Required  
placementToAdMap Includes the ad to detach, and the placements from which to detach the ad. Long Required  
Request Format

Depending on the API user that was created for you, use one of the following request formats:

  • PUT https://api.sizmek.com/rest/deliveryGroups/simpleDetach/
  • PUT https://adapi.sizmek.com/sas/deliveryGroups/simpleDetach/
Example of Simple Detach
View Body

 

{
  "entities": [
    {
      "campaignId":"1073741825", { 
      "placementToAdMap":{
"1073748187": [1073741825] } }
] }
Response Format

A successful request returns the HTTP 200 OK status code.

Description

Retrieve all add formats.

Request Example
GET https://api.sizmek.com/rest/ads/adFormats?from=0&max=250&order=asc&sort=name

Important: Currently requested is limited at a max 250 items pagination limit.

Response Example

If request is successful, response will be 200 OK.

{"metadata":
{
"total":46,
"types":["BaseAdFormatData"]
},
"debug":null,
"error":null,
"result":[
{
"type":"APIPairIdAndName",
"id":25,
"name":"Enhanced Standard Banner",
"count":31473
},
{
"type":"APIPairIdAndName",
"id":10,
"name":"Expandable Banner",
"count":31811
},
{
"type":"APIPairIdAndName",
"id":43,
"name":"HTML5 Expandable Banner",
"count":142199
},
{
"type":"APIPairIdAndName",
"id":38,
"name":"HTML5 Rich Media Banner",
"count":32762
},
{
"type":"APIPairIdAndName",
"id":39,
"name":"HTML5 Single Expandable Banner",
"count":29949
},
{
"type":"APIPairIdAndName",
"id":36,
"name":"In-Stream Video",
"count":28424
},
{
"type":"APIPairIdAndName",
"id":64,
"name":"In-Stream Video - Interactive",
"count":27001
},
{
"type":"APIPairIdAndName",
"id":13,"name":"Pushdown Banner",
"count":31678 },
{
"type":"APIPairIdAndName",
"id":9,
"name":"Rich Media Banner",
"count":32727
},
{
"type":"APIPairIdAndName",
"id":30,
"name":"Single Expandable Banner",
"count":30468},{"type":"APIPairIdAndName",
"id":42,
"name":"Standard Banner",
"count":102265
},
{
"type":"APIPairIdAndName",
"id":522578428,
"name":"CAF_1vlBHCuc",
"count":2
},
{
"type":"APIPairIdAndName",
"id":368818169,
"name":"CAF_5o6LFtCz",
"count":7
},
{
"type":"APIPairIdAndName",
"id":869404529,
"name":"CAF_INrIU772",
"count":2
},
{
"type":"APIPairIdAndName",
"id":222584472,
"name":"CAF_LaLSFKsJ",
"count":2
},
{
"type":"APIPairIdAndName",
"id":182842494,
"name":"CAF_O2RgKA6P",
"count":2
},
{
"type":"APIPairIdAndName",
"id":225283035,
"name":"CAF_UjnOeyks",
"count":2
},
{
"type":"APIPairIdAndName",
"id":680639297,
"name":"CAF_UtE2u9Z9",
"count":1
},
{
"type":"APIPairIdAndName",
"id":600719371,
"name":"CAF_XQaWyRW3",
"count":1
},
{
"type":"APIPairIdAndName",
"id":32751409,
"name":"CAF_ZPCfiwv1",
"count":3
},
{
"type":"APIPairIdAndName",
"id":730385923,
"name":"CAF_e9AOPhjK",
"count":2},{"type":"APIPairIdAndName",
"id":98218669,
"name":"CAF_fIvQ3OGy",
"count":2
},
{
"type":"APIPairIdAndName",
"id":833113522,
"name":"CAF_nA9RAoW2",
"count":1
},
{
"type":"APIPairIdAndName",
"id":122936013,
"name":"CAF_r0M3mLSu",
"count":1
},
{
"type":"APIPairIdAndName",
"id":881491566,
"name":"CAF_t8xGZa2c",
"count":3
},
{
"type":"APIPairIdAndName",
"id":974125918,
"name":"CAF_vASexVOx",
"count":3
},
{
"type":"APIPairIdAndName",
"id":414753366,
"name":"CAF_xPmv3Orr",
"count":1
},
{
"type":"APIPairIdAndName",
"id":980472822,
"name":"CAF_ybIdfDSG",
"count":1
},
{
"type":"APIPairIdAndName",
"id":751558674,
"name":"Format186c4fd0-954e-4af8-a6b8-",
"count":4
},
{
"type":"APIPairIdAndName",
"id":313519035,
"name":"Format55e3a69b-c9d7-4434-9809-",
"count":1
},
{
"type":"APIPairIdAndName",
"id":850019652,
"name":"Formata8664020-7b84-474c-a7cd-",
"count":2
},
{
"type":"APIPairIdAndName",
"id":88120046,
"name":"Formatc5ad2e85-8ec2-4f7a-a2cc-",
"count":2
},
{
"type":"APIPairIdAndName",
"id":467399731,
"name":"Formatd6f62ddd-89ab-4f65-b1bd-",
"count":4
},
{
"type":"APIPairIdAndName",
"id":174780908,
"name":"Formatf39ecc1a-ae0a-48a1-98ea-",
"count":1
}
]}
Description

Groups the ads by format ID.

Request Example
GET https://api.sizmek.com/rest/ads?adFormatId=10&adType=masterAd&from=0&max=250

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
Format ID Long  Path IDs of ads format
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK.

[{type: "ExpandableBannerAd", id: 1074552558, clientRefId: null, relationsBag: null,…},…]
[0 … 99]
0: {type: "ExpandableBannerAd", id: 1074552558, clientRefId: null, relationsBag: null,…}
1: {type: "ExpandableBannerAd", id: 1074552549, clientRefId: null, relationsBag: null,…}
2: {type: "ExpandableBannerAd", id: 1074552545, clientRefId: null, relationsBag: null,…}
Description

Groups the ads by dimensions.

Request Example
GET https://api.sizmek.com/rest/ads/dimensions?from=0&max=250&order=asc&sort=dimensions

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK with the response body:

[{type: "APIPairIdAndName", id: "0x0", name: "0x0", count: 468},…]
0: {type: "APIPairIdAndName", id: "0x0", name: "0x0", count: 468}
1: {type: "APIPairIdAndName", id: "1x1", name: "1x1", count: 155}
2: {type: "APIPairIdAndName", id: "80x80", name: "80x80", count: 17623}
Description

Groups the ads by status.

Request Example
GET https://api.sizmek.com/rest/ads/adStatus
Parameters
Name  Type  Parameter Type  Description 
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK with the response body:

[{type: "APIPairIdAndName", id: "0x0", name: "0x0", count: 468},…]
0: {type: "APIPairIdAndName", id: "0x0", name: "0x0", count: 468}
1: {type: "APIPairIdAndName", id: "1x1", name: "1x1", count: 155}
2: {type: "APIPairIdAndName", id: "80x80", name: "80x80", count: 17623}
Description

Gets placement ads using the master ad ID.

Request Example
GET https://api.sizmek.com/rest/ads?adId=1074552558&from=0&max=250

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
ID Long  Path IDs of ads
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example
[{type: "ExpandableBannerAd", id: 1074552559, clientRefId: null, relationsBag: null,…}]
0: {type: "ExpandableBannerAd", id: 1074552559, clientRefId: null, relationsBag: null,…}
accountId: 1073798798
accountName: "SanityAccount"
adAssignmentData: {type: "AdAssignmentData", accountId: 1073798798, accountName: "SanityAccount",…}
adChoicesLocation: "BOTTOM_RIGHT"
adChoicesStatus: false
adFormat: "EXPANDABLE_BANNER_AD"
adFormatId: 10
adFormatName: "Expandable Banner"
adStatus: "NEW"
adTemplateId: null
adTranscodingStatus: "TRANSCODING_NOT_REQUIRED"
adURLs: null
additionalAssets: null
analyticsData: null
analyticsSettings: null
asVersion: "NH04wIzbRP"
banner: {type: "AdAsset", id: 46900988477542, clientRefId: null, relationsBag: null, …}
changed: false
clientRefId: null
createdBy: 1073741827
createdByAccount: 1073741826
createdByAccountName: "QaAdminAccount"
createdByName: "QaAdminUser"
createdOn: 1457254462789
customFields: null
customInteractions: null
defaultImage: {type: "AdAsset", id: 46900988477541, clientRefId: null, relationsBag: null, …}
defaultImageClickthrough: null
dimensions: "300x250"
downloadMode: "POLITE"
enabled: true
feedEnabled: false
feedStatus: null
flashIDE: "w0nqvScNHC"
fourthPartyTag: "YUkk1qPqIt"
height: 250
hides: ["DROPDOWN_LISTS", "IFRAMES", "JAVA_APPLETS", "FLASH_ELEMENTS"]
id: 1074552559
initialSize: 39921
lastUpdateOn: 1457254462817
lastUpdatedBy: 1073741827
lastUpdatedByAccount: 1073741826
lastUpdatedByAccountName: "QaAdminAccount"
lastUpdatedByName: "QaAdminUser"
mainClickthrough: null
massVersioning: false
masterAdId: 1074552558
minAudioVersion: 0.6025420861253401
minFlashVersion: 9
mxpVersion: "Dd79W0nTgx"
name: "ExpandableBannerAdEQwbn3J3"
numberOfPlacementAds: 0
osVersion: "9Okozfrkif"
overallNumberOfPlacementAds: 0
overallSize: 76268
panels: null
panelsSettings: {type: "PanelsSettings", panelFrequency: "ONCE_IN_CAMPAIGN", panelFrequencyTimes: 1,…}
performAutoVideoTranscoding: false
placementId: 1073950267
placementName: "PlacementTestYpcNvQ"
pricingSize: 39921
qaStatus: "NOT_SUBMITTED"
relationsBag: null
servingMethod: "ONLY_VAST"
siteId: 1073764279
siteName: "SanitySite"
templateScriptName: "ExpBanner"
type: "ExpandableBannerAd"
unSavedTemplateAd: false
urlTokens: "ggDngAVC5i"
usedAsTemplate: false
variables: null
version: 17365008015909866
videoStartMethod: "AUTO_START"
width: 300
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk