Method: adPlays.createWithExternalIds

Creates an ad play with external ids.

  • Returns the newly created ad play if successful.
  • Returns error code INVALID_ARGUMENT if invalid ad unit external id, order external id, line external id, or creative asset external id are specified.
  • Returns error code INVALID_ARGUMENT if an ad play for the same ad unit, order, line, and creative with the same startTime already exists.
  • Returns error code NOT_FOUND if no matching ad unit external id, order external id, line external id, or creative asset external id found.

HTTP request

POST https://dv360outofhomeseller.googleapis.com/v1beta1/adPlays:createWithExternalIds

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "lineExternalId": string,
  "orderExternalId": string,
  "adUnitExternalId": string,
  "creativeAssetExternalId": string,
  "startTime": string,
  "endTime": string,
  "recordTime": string,
  "impressions": number
}
Fields
lineExternalId

string

Required. The external id of the line this ad play belongs to. Format: 123.

orderExternalId

string

Required. The external id of the order this ad play belongs to. Format: 456.

adUnitExternalId

string

Required. The external id of the ad unit this ad play was served on. Format: 789.

creativeAssetExternalId

string

Required. The external id of the creative this ad play served. Format: 3210.

startTime

string (Timestamp format)

Required. Time the ad started to play (inclusive). Should be in the past and within the last 3 days.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

endTime

string (Timestamp format)

Required. Time the ad play ended (exclusive). Should be in the past and after start time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

recordTime

string (Timestamp format)

Optional. Time this ad play was recorded. Should be in the past and after end time.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

impressions

number

Required. Total number of impressions.

Response body

If successful, the response body contains an instance of AdPlay.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/doubleclickbidmanager

For more information, see the OAuth 2.0 Overview.