- 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 ( |
batchId
integer ( uint32
format)
An entry ID, unique within the batch request.
merchantId
string
The ID of the managing account.
method
string
The method of the batch entry.
Acceptable values are:
- "
claimWebsite
" - "
delete
" - "
get
" - "
insert
" - "
link
" - "
update
"
accountId
string
The ID of the targeted account. Only defined if the method is not insert
.
account
object (
Account
)
The account to create or update. Only defined if the method is insert
or update
.
overwrite
boolean
Only applicable if the method is claimwebsite
. Indicates whether or not to take the claim from another account in case there is a conflict.
force
boolean
Whether the account should be deleted if the account has offers. Only applicable if the method is delete
.
linkRequest
object (
AccountsCustomBatchRequestEntryLinkRequest
)
Details about the link
request.
view
string
Controls which fields are visible. Only applicable if the method is 'get'.
labelIds[]
string
Label IDs for the 'updatelabels' request.
AccountsCustomBatchRequestEntryLinkRequest
JSON representation |
---|
{ "action" : string , "linkedAccountId" : string , "linkType" : string , "services" : [ string ] } |
action
string
Action to perform for this link. The "request"
action is only available to select merchants.
Acceptable values are:
- "
approve
" - "
remove
" - "
request
"
linkedAccountId
string
The ID of the linked account.
linkType
string
Type of the link between the two accounts.
Acceptable values are:
- "
channelPartner
" - "
eCommercePlatform
" - "
paymentServiceProvider
" - "
localProductManager
"
services[]
string
Provided services.
Acceptable values are:
- "
shoppingAdsProductManagement
" - "
shoppingActionsProductManagement
" - "
shoppingActionsOrderManagement
" - "
paymentProcessing
" - "
localProductManagement
"
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 for failed custombatch entries. |