- HTTP request
- Query parameters
- 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/accounts/batch
Query parameters
Parameters | |
---|---|
dryRun |
Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
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 | |
---|---|
batchId |
An entry ID, unique within the batch request. |
merchantId |
The ID of the managing account. |
method |
The method of the batch entry.
|
accountId |
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 |
linkRequest |
Details about the |
labelIds[] |
Label IDs for the 'updatelabels' request. |
AccountsCustomBatchRequestEntryLinkRequest
JSON representation | |
---|---|
{ "action": string, "linkedAccountId": string, "linkType": string } |
Fields | |
---|---|
action |
Action to perform for this link. The
|
linkedAccountId |
The ID of the linked account. |
linkType |
Type of the link between the two accounts.
|
AccountsCustomBatchResponseEntry
A batch entry encoding a single non-batch accounts response.
JSON representation | |
---|---|
{ "batchId": integer, "kind": string, "account": { object ( |
Fields | |
---|---|
batchId |
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 defined if and only if the request failed. |
linkStatus |
Deprecated. This field is never set.
|