- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- OrdersSetLineItemMetadataRequest
- Try it!
Sets (or overrides if it already exists) merchant provided annotations in the form of key-value pairs. A common use case would be to supply us with additional structured information about a line item that cannot be provided through other methods. Submitted key-value pairs can be retrieved as part of the orders resource.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/orders/{orderId}/setLineItemMetadata
Path parameters
Parameters | |
---|---|
merchantId |
The ID of the account that manages the order. This cannot be a multi-client account. |
orderId |
The ID of the order. |
Request body
The request body contains an instance of OrdersSetLineItemMetadataRequest
.
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{ "executionStatus": string, "kind": string } |
Fields | |
---|---|
executionStatus |
The status of the execution. Acceptable values are:
|
kind |
Identifies what kind of resource this is. Value: the fixed string " |
Authorization Scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
OrdersSetLineItemMetadataRequest
JSON representation |
---|
{
"operationId": string,
"lineItemId": string,
"productId": string,
"annotations": [
{
object ( |
Fields | |
---|---|
operationId |
The ID of the operation. Unique across all operations for a given order. |
lineItemId |
The ID of the line item to set metadata. Either lineItemId or productId is required. |
productId |
The ID of the product to set metadata. This is the REST ID used in the products service. Either lineItemId or productId is required. |
annotations[] |
|