# REST Resource: orders

- [Resource: Order](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#Order)
  - [JSON representation](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#Order.SCHEMA_REPRESENTATION)
- [OrderState](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#OrderState)
- [Methods](https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#METHODS_SUMMARY)

## Resource: Order

An order is a collection of `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders.lines#Line` which specify when and where to display ads.

| JSON representation |
|---|
| ``` { "name": string, "externalId": string, "displayName": string, "description": string, "orderState": enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#OrderState`), "createTime": string, "updateTime": string, "advertiserInfo": { object (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/AdvertiserInfo`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of the order in the format: orders/{id}\`. |
| `externalId` | `string` Optional. An id used to map this entity to external sources. |
| `displayName` | `string` Output only. The display name of the order. Must be UTF-8 encoded with a maximum size of 240 bytes. |
| `description` | `string` Output only. Additional freeform field to describe the order. |
| `orderState` | ``enum (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders#OrderState`)`` Output only. Represents the computed state of the order based on the state of its lines. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.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 (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.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 (`https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/AdvertiserInfo`)`` Output only. Advertiser info. |

## OrderState

The state of the order.

| Enums ||
|---|---|
| `ORDER_STATE_UNSPECIFIED` | The default value when the order state has not been specified or is unknown in this version. |
| `ORDER_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. |
| `ORDER_STATE_RESERVED` | The order contains: - zero lines in pending reservation state. - one or more lines in reserved state. - zero or more lines in rejected by seller state. - zero lines in all other states. |
| `ORDER_STATE_PENDING_BOOKING` | The order contains: - zero lines in pending reservation state. - zero lines in reserved state. - one or more lines in pending booking state. - zero or more lines in rejected by seller state. - zero or more lines in cancelled by buyer. - zero lines in all other states. |
| `ORDER_STATE_BOOKED` | The order contains: - zero lines in pending reservation state. - zero lines in reserved state. - zero lines in pending booking state. - one or more lines in booked state. - zero or more lines in rejected by seller state. - zero or more lines in cancelled by buyer. - zero lines in all other states. |
| `ORDER_STATE_REJECTED_BY_SELLER` | The order contains: - zero lines in pending reservation state. - zero lines in reserved state. - zero lines in pending booking state. - zero lines in booked state. - one or more lines in rejected by seller state. - zero lines in cancelled by buyer. - zero lines in all other states. |
| `ORDER_STATE_CANCELLED_BY_BUYER` | The order contains: - zero lines in pending reservation state. - zero lines in reserved state. - zero lines in pending booking state. - zero lines in booked state. - zero lines in rejected by seller state. - one or more lines in cancelled by buyer. - zero lines in all other states. |
| `ORDER_STATE_PENDING_RESERVATION_EXPIRED` | The order contains: - one or more lines in pending reservation expired. - zero lines in all other states. |
| `ORDER_STATE_RESERVED_EXPIRED` | The order contains: - one or more lines in reserved expired. - zero lines in all other states. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders/get` | Retrieves an individual order. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders/list` | Lists orders. |
| ### `https://developers.google.com/display-video/out-of-home-seller/reference/rest/v1beta1/orders/patch` | Updates an existing order. |