Method: accounts.createAndConfigure

Creates a standalone Merchant Center account with additional configuration. Adds the user that makes the request as an admin for the new account.

HTTP request

POST https://merchantapi.googleapis.com/accounts/v1beta/accounts:createAndConfigure

The URL uses gRPC Transcoding syntax.

Request body

The request body contains data with the following structure:

JSON representation
{
  "account": {
    object (Account)
  },
  "users": [
    {
      object (CreateUserRequest)
    }
  ],
  "service": [
    {
      object (AddAccountService)
    }
  ],
  "acceptTermsOfService": {
    object (AcceptTermsOfService)
  }
}
Fields
account

object (Account)

Required. The account to be created.

users[]

object (CreateUserRequest)

Optional. Users to be added to the account.

service[]

object (AddAccountService)

Optional. If specified, an account service between the account to be created and the provider account is initialized as part of the creation.

acceptTermsOfService

object (AcceptTermsOfService)

Optional. The Terms of Service (ToS) to be accepted immediately upon account creation.

Response body

If successful, the response body contains an instance of Account.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the OAuth 2.0 Overview.

CreateUserRequest

Request message for the CreateUser method.

JSON representation
{
  "parent": string,
  "userId": string,
  "user": {
    object (User)
  }
}
Fields
parent

string

Required. The resource name of the account for which a user will be created. Format: accounts/{account}

userId

string

Required. The email address of the user (for example, john.doe@gmail.com).

user

object (User)

Required. The user to create.

AcceptTermsOfService

Reference to a Terms of Service resource.

JSON representation
{
  "name": string,
  "regionCode": string
}
Fields
name

string

Required. The resource name of the terms of service version.

regionCode

string

Required. Region code as defined by CLDR. This is either a country when the ToS applies specifically to that country or 001 when it applies globally.

AddAccountService

Additional instructions to add account services during creation of the account.

JSON representation
{

  // Union field service_type can be only one of the following:
  "accountAggregation": {
    object
  }
  // End of list of possible types for union field service_type.
  "provider": string
}
Fields
Union field service_type. Currently only supports Multi-client parent account type. service_type can be only one of the following:
accountAggregation

object

The provider is an aggregator for the account.

provider

string

Optional. The provider of the service. Format: accounts/{account}