Method: accounts.custombatch

Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.

HTTP request

POST https://www.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 (AccountsCustomBatchResponseEntry)
    }
  ],
  "kind": string
}
Fields
entries[]

object (AccountsCustomBatchResponseEntry)

The result of the execution of the batch requests.

kind

string

Identifies what kind of resource this is. Value: the fixed string

"content#accountsCustomBatchResponse"

.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/content
  • https://www.googleapis.com/auth/structuredcontent

For more information, see the OAuth 2.0 Overview.

AccountsCustomBatchRequest

JSON representation
{
  "entries": [
    {
      object (AccountsCustomBatchRequestEntry)
    }
  ]
}
Fields
entries[]

object (AccountsCustomBatchRequestEntry)

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 (Account)
  },
  "overwrite": boolean,
  "force": boolean,
  "linkRequest": {
    object (AccountsCustomBatchRequestEntryLinkRequest)
  }
}
Fields
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.

AccountsCustomBatchRequestEntryLinkRequest

JSON representation
{
  "action": string,
  "linkedAccountId": string,
  "linkType": string,
  "services": [
    string
  ]
}
Fields
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.

services[]

string

accounts.list of provided services.

AccountsCustomBatchResponseEntry

A batch entry encoding a single non-batch accounts response.

JSON representation
{
  "batchId": integer,
  "kind": string,
  "account": {
    object (Account)
  },
  "errors": {
    object (Errors)
  }
}
Fields
batchId

integer (uint32 format)

The ID of the request entry this entry responds to.

kind

string

Identifies what kind of resource this is. Value: the fixed string

"content#accountsCustomBatchResponseEntry"

.

account

object (Account)

The retrieved, created, or updated account. Not defined if the method was delete, claimwebsite or link.

errors

object (Errors)

A list of errors defined if and only if the request failed.

Try it!