# PurchaseItemExtension

- [JSON representation](https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#SCHEMA_REPRESENTATION)
- [ItemOption](https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption)
  - [JSON representation](https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption.SCHEMA_REPRESENTATION)

Line item contents of Purchase Vertical.

| JSON representation ||
|---|---|
| ``` { "status": enum (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseStatus`), "userVisibleStatusLabel": string, "type": enum (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseType`), "productId": string, "quantity": number, "unitMeasure": { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/MerchantUnitMeasure`) }, "returnsInfo": { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseReturnsInfo`) }, "fulfillmentInfo": { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseFulfillmentInfo`) }, "itemOptions": [ { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption`) } ], "extension": { "@type": string, field1: ..., ... }, "productDetails": { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/ProductDetails`) } } ``` |

| Fields ||
|---|---|
| `status` | ``enum (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseStatus`)`` Required: Line item level status. |
| `userVisibleStatusLabel` | `string` Required: User visible label/string for the status. Max allowed length is 50 chars. |
| `type` | ``enum (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseType`)`` Required: type of purchase. |
| `productId (deprecated)` | `string` > [!WARNING] > This item is deprecated! Product or offer id associated with this line item. <br /> |
| `quantity` | `number` Quantity of the item. |
| `unitMeasure` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/MerchantUnitMeasure`)`` Unit measure. Specifies the size of the item in chosen units. The size, together with the active price is used to determine the unit price. |
| `returnsInfo` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseReturnsInfo`)`` Returns info for this line item. If unset, this line item inherits order level returns info. |
| `fulfillmentInfo` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseFulfillmentInfo`)`` Fulfillment info for this line item. If unset, this line item inherits order level fulfillment info. |
| `itemOptions[]` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption`)`` Additional add-ons or sub-items. |
| `extension` | `object` Any extra fields exchanged between merchant and google. An object containing fields of an arbitrary type. An additional field `"@type"` contains a URI identifying the type. Example: `{ "id": 1234, "@type": "types.example.com/standard/id" }`. <br /> |
| `productDetails` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/ProductDetails`)`` Details about the product. |

## ItemOption

Represents add-ons or sub-items.

| JSON representation ||
|---|---|
| ``` { "id": string, "name": string, "prices": [ { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/orders/patch#PriceAttribute`) } ], "note": string, "quantity": number, "productId": string, "subOptions": [ { object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption`) } ] } ``` |

| Fields ||
|---|---|
| `id` | `string` For options that are items, unique item id. |
| `name` | `string` Option name. |
| `prices[]` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/orders/patch#PriceAttribute`)`` Option total price. |
| `note` | `string` Note related to the option. |
| `quantity` | `number` For options that are items, quantity. |
| `productId` | `string` Product or offer id associated with this option. |
| `subOptions[]` | ``object (`https://developers.google.com/assistant/transactions/reference/physical/rest/v3/PurchaseItemExtension#ItemOption`)`` To define other nested sub options. |