Create Entity Snapshot

You can create file-based snapshot for all the campaign entities for an advertiser using this method

Note: The POST functionality is similar for both Onsite and Offsite display

📘

URL: POST /api/v1/snapshot/entity

Request Parameters

ParameterDescriptionTypeRequiredPossible Values
advertiserIdThe ID of the advertiserintegerYUnique numeric identifier
entityStatusThe status of the entitystringY

Possible values: active, inactive, all

Note: if entityStatus = active:

  1. For Onsite display: the json snapshot response will have entities with status = LIVE, SCHEDULED
  2. For Offsite display: the json snapshot response will have entities with status = ACTIVE

if entityStatus = inactive:

  1. For Onsite display: the json snapshot response will have entities with status =DRAFT, PAUSED
  2. For Offsite display: the json snapshot response will have entities with status =INACTIVE

if entityStatus = all:

  1. For Onsite display: the json snapshot response will have entities with status = LIVE, SCHEDULED, DRAFT, PAUSED, COMPLETED
  2. For Offsite display: the json snapshot response will have entities with status = ACTIVE, INACTIVE, PAUSED, COMPLETED

entityTypesThe type of entity for which the snapshot should be generated.arrayYPossible values: campaign, lineItem

Note:

  • There is no limit on number of snapshot requests for an advertiser. However, there is a rate limit in place
  • The snapshot format type is gzip 

Headers

Header NameDescriptionRequiredValues
AuthorizationThe token will provide you the access to the API. It is same for all advertisers you access through the APIYPlease utilize the generated auth_token shared with you at the time of partner onboarding from the Getting Started Guide. This key can be repurposed for SP API access as well.
WM_CONSUMER.IDWe will provide you the consumer ID to access the API. It is same for all advertisers you access through the API.YPlease use the generated ConsumerId shared with you at the time of partner onboarding. Refer to the Getting Started Guide for further explanation on this
WM_SEC.AUTH_SIGNATUREAuth signature as an API keyYUse the signature generator code from Getting Started Guide to generate this value
WM_CONSUMER.intimestampTimestamp for which the auth signature is generated. Use Unix epoch format for the timestampYUse the signature generator code (Getting Started Guide) to generate this value
WM_SEC.KEY_VERSIONWe will provide you with the KEY VERSION to access the API. It is same for all advertisers you access through the APIY1
x-targeting-format
Note: Its applicable only for Line item entity snapshots.
Specifies the JSON schema used to evaluate and return the targeting object. To ensure backward compatibility, omitting this header defaults to the legacy expression structure.

It assumes two values:
  • FLAT: The targeting object is represented in the modern, flattened domain schema using explicit include and exclude arrays.
  • EXPRESSION: The targeting object is represented in the legacy logical expression structure, utilizing nested and / not operators.
N

Default: EXPRESSION

Values: EXPRESSION, FLAT

Response

FieldDescriptionOptional field/Nullable?TypePossible values
codeThe response code can have following values:
  • success
  • failure

Click here for more information about Status Codes and Errors
Nstringsuccess, failure
detailsDetails will populate success or error message depending upon value of code.Nstring
snapshotIdID of the snapshot. This will be returned only when code=successYstring
jobStatusIt is an indicator to confirm status of snapshot generation.The possible values of jobStatus are: pending, processing, done, failed, expiredYstring
messageHigh-level summary of the error, when available. Ystring 
errorsDetailed information about one or more errors, including the affected field (when applicable), error code, and a human-readable description.Yarray<object> 

errors array object details

FieldDescriptionOptional field/Nullable?TypePossible values
fieldJSON field associated with the error. Omitted if the error applies to the request as a whole.Ystring 
errorTypeMachine-readable error code that uniquely identifies the error condition. Applications should use this value for error handling logic.Nstring 
descriptionHuman-readable explanation of the error, including why the request failed and, when possible, how to resolve itNstring 

Did this page help you?