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)
    }
  ]
}
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.

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.

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

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

AccountAggregation

This type has no fields.

AccountAggregation payload.