rocket
Meet
Merchant API
- the official successor to Content API for Shopping.
update
Get the latest
on new Merchant API features, bug fixes, and updates.
add_alert
Note: Content API for Shopping will be sunset on August 18, 2026.
Method: returnpolicy.custombatch
Stay organized with collections
Save and categorize content based on your preferences.
Batches multiple return policy related calls in a single request.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/returnpolicy/batch
Request body
The request body contains an instance of ReturnpolicyCustomBatchRequest
.
Response body
If successful, the response body contains data with the following structure:
Fields |
entries[] |
object (ReturnpolicyCustomBatchResponseEntry )
The result of the execution of the batch requests.
|
kind |
string
Identifies what kind of resource this is. Value: the fixed string "content#returnpolicyCustomBatchResponse ".
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/content
For more information, see the OAuth 2.0 Overview.
ReturnpolicyCustomBatchRequest
ReturnpolicyCustomBatchRequestEntry
JSON representation |
{
"batchId": integer,
"merchantId": string,
"method": string,
"returnPolicyId": string,
"returnPolicy": {
object (ReturnPolicy )
}
} |
Fields |
batchId |
integer (uint32 format)
An entry ID, unique within the batch request.
|
merchantId |
string
The Merchant Center account ID.
|
method |
string
Method of the batch request entry. Acceptable values are:
|
returnPolicyId |
string
The return policy ID. This should be set only if the method is delete or get .
|
returnPolicy |
object (ReturnPolicy )
The return policy to submit. This should be set only if the method is insert .
|
ReturnpolicyCustomBatchResponseEntry
JSON representation |
{
"batchId": integer,
"returnPolicy": {
object (ReturnPolicy )
},
"errors": {
object (Errors )
},
"kind": string
} |
Fields |
batchId |
integer (uint32 format)
The ID of the request entry to which this entry responds.
|
returnPolicy |
object (ReturnPolicy )
The retrieved return policy.
|
errors |
object (Errors )
A list of errors defined if, and only if, the request failed.
|
kind |
string
Identifies what kind of resource this is. Value: the fixed string "content#returnpolicyCustomBatchResponseEntry "
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-25 UTC.
[null,null,["Last updated 2025-02-25 UTC."],[[["\u003cp\u003eBatch multiple return policy calls in a single request to improve efficiency.\u003c/p\u003e\n"],["\u003cp\u003eUtilize methods such as \u003ccode\u003edelete\u003c/code\u003e, \u003ccode\u003eget\u003c/code\u003e, and \u003ccode\u003einsert\u003c/code\u003e to manage return policies.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ehttps://www.googleapis.com/auth/content\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"],["\u003cp\u003eResponses include a batch ID, return policy details or errors encountered.\u003c/p\u003e\n"],["\u003cp\u003eEach request entry needs a unique batch ID within the batch request.\u003c/p\u003e\n"]]],["This content outlines a batch processing system for managing return policies. It uses a `POST` request to `returnpolicy/batch`. The request body, `ReturnpolicyCustomBatchRequest`, contains an array of `ReturnpolicyCustomBatchRequestEntry` objects, each specifying a `method` (`delete`, `get`, or `insert`), `batchId`, `merchantId`, and optionally `returnPolicyId` or `returnPolicy`. The response, `ReturnpolicyCustomBatchResponse`, contains `ReturnpolicyCustomBatchResponseEntry` objects with results, errors, and a `batchId` to link back to the request. Requires `https://www.googleapis.com/auth/content` scope.\n"],null,["# Method: returnpolicy.custombatch\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ReturnpolicyCustomBatchResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [ReturnpolicyCustomBatchRequest](#ReturnpolicyCustomBatchRequest)\n - [JSON representation](#ReturnpolicyCustomBatchRequest.SCHEMA_REPRESENTATION)\n- [ReturnpolicyCustomBatchRequestEntry](#ReturnpolicyCustomBatchRequestEntry)\n - [JSON representation](#ReturnpolicyCustomBatchRequestEntry.SCHEMA_REPRESENTATION)\n- [ReturnpolicyCustomBatchResponseEntry](#ReturnpolicyCustomBatchResponseEntry)\n - [JSON representation](#ReturnpolicyCustomBatchResponseEntry.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nBatches multiple return policy related calls in a single request.\n\n### HTTP request\n\n`POST https://shoppingcontent.googleapis.com/content/v2.1/returnpolicy/batch`\n\n### Request body\n\nThe request body contains an instance of [ReturnpolicyCustomBatchRequest](/shopping-content/reference/rest/v2.1/returnpolicy/custombatch#ReturnpolicyCustomBatchRequest).\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"entries\": [ { object (/shopping-content/reference/rest/v2.1/returnpolicy/custombatch#ReturnpolicyCustomBatchResponseEntry) } ], \"kind\": string } ``` |\n\n| Fields ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `entries[]` | `object (`[ReturnpolicyCustomBatchResponseEntry](/shopping-content/reference/rest/v2.1/returnpolicy/custombatch#ReturnpolicyCustomBatchResponseEntry)`)` The result of the execution of the batch requests. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#returnpolicyCustomBatchResponse`\". |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/content`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2).\n\nReturnpolicyCustomBatchRequest\n------------------------------\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"entries\": [ { object (/shopping-content/reference/rest/v2.1/returnpolicy/custombatch#ReturnpolicyCustomBatchRequestEntry) } ] } ``` |\n\n| Fields ||\n|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `entries[]` | `object (`[ReturnpolicyCustomBatchRequestEntry](/shopping-content/reference/rest/v2.1/returnpolicy/custombatch#ReturnpolicyCustomBatchRequestEntry)`)` The request entries to be processed in the batch. |\n\nReturnpolicyCustomBatchRequestEntry\n-----------------------------------\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"batchId\": integer, \"merchantId\": string, \"method\": string, \"returnPolicyId\": string, \"returnPolicy\": { object (/shopping-content/reference/rest/v2.1/returnpolicy#ReturnPolicy) } } ``` |\n\n| Fields ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `batchId` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` An entry ID, unique within the batch request. |\n| `merchantId` | `string` The Merchant Center account ID. |\n| `method` | `string` Method of the batch request entry. Acceptable values are: - \"`delete`\" - \"`get`\" - \"`insert`\" \u003cbr /\u003e |\n| `returnPolicyId` | `string` The return policy ID. This should be set only if the method is `delete` or `get`. |\n| `returnPolicy` | `object (`[ReturnPolicy](/shopping-content/reference/rest/v2.1/returnpolicy#ReturnPolicy)`)` The return policy to submit. This should be set only if the method is `insert`. |\n\nReturnpolicyCustomBatchResponseEntry\n------------------------------------\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"batchId\": integer, \"returnPolicy\": { object (/shopping-content/reference/rest/v2.1/returnpolicy#ReturnPolicy) }, \"errors\": { object (/shopping-content/reference/rest/v2.1/Errors) }, \"kind\": string } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `batchId` | `integer (`[uint32](https://developers.google.com/discovery/v1/type-format)` format)` The ID of the request entry to which this entry responds. |\n| `returnPolicy` | `object (`[ReturnPolicy](/shopping-content/reference/rest/v2.1/returnpolicy#ReturnPolicy)`)` The retrieved return policy. |\n| `errors` | `object (`[Errors](/shopping-content/reference/rest/v2.1/Errors)`)` A list of errors defined if, and only if, the request failed. |\n| `kind` | `string` Identifies what kind of resource this is. Value: the fixed string \"`content#returnpolicyCustomBatchResponseEntry`\" |"]]