- HTTP request
- Request body
- Response body
- Authorization scopes
- AccountsCustomBatchRequest
- AccountsCustomBatchRequestEntry
- AccountsCustomBatchRequestEntryLinkRequest
- AccountsCustomBatchResponseEntry
- Try it!
Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.
HTTP request
POST https://shoppingcontent.googleapis.com/content/v2.1/accounts/batch
Request body
The request body contains an instance of AccountsCustomBatchRequest
.
Response body
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"entries": [
{
object ( |
Fields | |
---|---|
entries[] |
The result of the execution of the batch requests. |
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.
AccountsCustomBatchRequest
JSON representation |
---|
{
"entries": [
{
object ( |
Fields | |
---|---|
entries[] |
The request entries to be processed in the batch. |
AccountsCustomBatchRequestEntry
A batch entry encoding a single non-batch accounts request.
JSON representation |
---|
{ "batchId": integer, "merchantId": string, "method": string, "accountId": string, "account": { object ( |
Fields | |
---|---|
batch |
An entry ID, unique within the batch request. |
merchant |
The ID of the managing account. |
method |
The method of the batch entry. Acceptable values are:
|
account |
The ID of the targeted account. Only defined if the method is not |
account |
The account to create or update. Only defined if the method is |
overwrite |
Only applicable if the method is |
force |
Whether the account should be deleted if the account has offers. Only applicable if the method is |
link |
Details about the |
view |
Controls which fields are visible. Only applicable if the method is 'get'. |
label |
Label IDs for the 'updatelabels' request. |
AccountsCustomBatchRequestEntryLinkRequest
JSON representation |
---|
{ "action": string, "linkedAccountId": string, "linkType": string, "services": [ string ] } |
Fields | |
---|---|
action |
Action to perform for this link. The Acceptable values are:
|
linked |
The ID of the linked account. |
link |
Type of the link between the two accounts. Acceptable values are:
|
services[] |
Provided services. Acceptable values are:
|
AccountsCustomBatchResponseEntry
A batch entry encoding a single non-batch accounts response.
JSON representation |
---|
{ "batchId": integer, "kind": string, "account": { object ( |
Fields | |
---|---|
batch |
The ID of the request entry this entry responds to. |
kind |
Identifies what kind of resource this is. Value: the fixed string " |
account |
The retrieved, created, or updated account. Not defined if the method was |
errors |
A list of errors for failed custombatch entries. |