REST Resource: sellers.orders

Resource: Order

An order is a collection of Lines which specify when and where to display ads.

JSON representation
{
  "name": string,
  "externalId": string,
  "displayName": string,
  "description": string,
  "state": enum (State),
  "createTime": string,
  "updateTime": string,
  "advertiserInfo": {
    object (AdvertiserInfo)
  },
  "cancellationReason": enum (CancellationReason)
}
Fields
name

string

The resource name of the order. Format: sellers/{seller}/orders/{order}

externalId

string

An id used to map this entity to external sources.

displayName

string

The display name of the order.

Must be UTF-8 encoded with a maximum size of 240 bytes.

description

string

Additional freeform field to describe the order.

state

enum (State)

Output only. The state of the order.

Seller can use the following custom methods: orders.completeOrderReservation, orders.completeOrderBooking to set to one of the following:

  • STATE_RESERVATION_COMPLETE
  • STATE_BOOKING_COMPLETE.

All other order states are set by the buyer.

createTime

string (Timestamp format)

Output only. Creation timestamp for the order.

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".

updateTime

string (Timestamp format)

Output only. Last updated timestamp for the order.

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".

advertiserInfo

object (AdvertiserInfo)

Advertiser info.

cancellationReason

enum (CancellationReason)

Output only. Cancellation reason.

State

The state of the order.

Enums
STATE_UNSPECIFIED The default value when the order state has not been specified or is unknown in this version.
STATE_PENDING_RESERVATION

The order contains:

  • one or more lines in pending reservation state.
  • zero or more lines in reserved state.
  • zero lines in all other states.
STATE_RESERVATION_COMPLETE

The order contains:

  • one or more lines in either reserved or rejected by seller states.
  • zero lines in all other states.
STATE_PENDING_BOOKING

The order contains:

  • one or more lines in either pending booking or rejected by seller states.
  • zero lines in all other states.
STATE_BOOKING_COMPLETE

The order contains:

  • one or more lines in either booked or rejected by seller states.
  • zero lines in all other states.
STATE_CANCELLED_BY_BUYER

The order contains:

  • one or more lines in either cancelled by buyer or rejected by seller states.
  • zero lines in all other states.
STATE_PENDING_RESERVATION_EXPIRED

The order contains:

  • one or more lines in pending reservation expired.
  • zero lines in all other states.
STATE_RESERVED_EXPIRED

The order contains:

  • one or more lines in reserved expired.
  • zero lines in all other states.

CancellationReason

The reason for cancellation, if the order has been canceled.

Enums
CANCELLATION_REASON_UNSPECIFIED The default value when the cancellation reason has not been specified or is unknown in this version.
CANCELLATION_REASON_BUYER_REQUESTED The buyer requested cancellation of the order.
CANCELLATION_REASON_INVALID_ADVERTISER_INFO The provided advertiser info was invalid.

Methods

completeOrderBooking

Completes the order booking.

completeOrderReservation

Completes the order reservation.

create

Creates a new order.

get

Retrieves an individual order.

list

Lists orders.

patch

Updates an existing order.