# REST Resource: projects.locations.orders

- [Resource: Order](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#Order)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#Order.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#State)
- [Type](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#Type)
- [HardwareLocation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#HardwareLocation)
  - [JSON representation](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#HardwareLocation.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#METHODS_SUMMARY)

## Resource: Order

An order for GDC hardware.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "createTime": string, "updateTime": string, "labels": { string: string, ... }, "state": enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#State`), "organizationContact": { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/OrganizationContact`) }, "targetWorkloads": [ string ], "customerMotivation": string, "fulfillmentTime": string, "regionCode": string, "orderFormUri": string, "type": enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#Type`), "submitTime": string, "billingId": string, "existingHardware": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#HardwareLocation`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. Name of this order. Format: `projects/{project}/locations/{location}/orders/{order}` |
| `displayName` | `string` Optional. Display name of this order. |
| `createTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time when this order was created. 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. Time when this order was last updated. 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"`. |
| `labels` | `map (key: string, value: string)` Optional. Labels associated with this order as key value pairs. For more information about labels, see [Create and manage labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `state` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#State`)`` Output only. State of this order. On order creation, state will be set to DRAFT. |
| `organizationContact` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/OrganizationContact`)`` Required. Customer contact information. |
| `targetWorkloads[]` | `string` Optional. Customer specified workloads of interest targeted by this order. This must contain \<= 20 elements and the length of each element must be \<= 50 characters. |
| `customerMotivation` | `string` Required. Information about the customer's motivation for this order. The length of this field must be \<= 1000 characters. |
| `fulfillmentTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Required. Customer specified deadline by when this order should be fulfilled. 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"`. |
| `regionCode` | `string` Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this order will be deployed. For a list of valid CLDR region codes, see the [Language Subtag Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). |
| `orderFormUri` | `string` Output only. Link to the order form. |
| `type` | ``enum (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#Type`)`` Output only. Type of this Order. |
| `submitTime` | ``string (`https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp` format)`` Output only. Time when the order was submitted. Is auto-populated to the current time when an order is submitted. 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"`. |
| `billingId` | `string` Required. The Google Cloud Billing ID to be charged for this order. |
| `existingHardware[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders#HardwareLocation`)`` Optional. Existing hardware to be removed as part of this order. Note: any hardware removed will be recycled unless otherwise agreed. |

## State

Valid states of an order.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | State of the order is unspecified. |
| `DRAFT` | Order is being drafted by the customer and has not been submitted yet. |
| `SUBMITTED` | Order has been submitted to Google. |
| `ACCEPTED` | Order has been accepted by Google. |
| `ADDITIONAL_INFO_NEEDED` | Order needs more information from the customer. |
| `BUILDING` | Google has initiated building hardware for the order. |
| `SHIPPING` | The hardware has been built and is being shipped. |
| `INSTALLING` | The hardware is being installed. |
| `FAILED` | An error occurred in processing the order and customer intervention is required. |
| `PARTIALLY_COMPLETED` | Order has been partially completed i.e., some hardware have been delivered and installed. |
| `COMPLETED` | Order has been completed. |
| `CANCELLED` | Order has been cancelled. |

## Type

Valid types of an Order.

| Enums ||
|---|---|
| `TYPE_UNSPECIFIED` | Type of the order is unspecified. |
| `PAID` | Paid by the customer. |
| `POC` | Proof of concept for the customer. |

## HardwareLocation

Represents the location of one or many hardware.

| JSON representation |
|---|
| ``` { "site": string, "rackLocation": string, "rackSpace": [ { object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/RackSpace`) } ] } ``` |

| Fields ||
|---|---|
| `site` | `string` Required. Name of the site where the hardware are present. Format: `projects/{project}/locations/{location}/sites/{site}` |
| `rackLocation` | `string` Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, Rack 3. |
| `rackSpace[]` | ``object (`https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/RackSpace`)`` Optional. Spaces occupied by the hardware in the rack. If unset, this location is assumed to be the entire rack. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/create` | Creates a new order in a given project and location. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/delete` | Deletes an order. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/get` | Gets details of an order. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/list` | Lists orders in a given project and location. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/patch` | Updates the parameters of an order. |
| ### `https://docs.cloud.google.com/distributed-cloud/connected/1.7.1/docs/reference/hardware/rest/v1alpha/projects.locations.orders/submit` | Submits an order. |