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)

Required. An account service between the account to be created and the provider account is initialized as part of the creation. At least one such service needs to be provided. Currently exactly one of these needs to be accountAggregation, which means you can only create sub accounts, not standalone account through this method. Additional accountManagement or product_management services may be provided.

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 in the format termsOfService/{version}. To retrieve the latest version, use the termsOfService.retrieveLatest method.

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 (AccountAggregation)
  }
  // End of list of possible types for union field service_type.
  "provider": string
}
Fields
Union field service_type. The service type to be added. service_type can be only one of the following:
accountAggregation

object (AccountAggregation)

The provider is an aggregator for the account. Payload for service type Account Aggregation.

provider

string

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

AccountAggregation

This type has no fields.

AccountAggregation payload.