- HTTP request
- Request body
- Response body
- Authorization scopes
- CreateUserRequest
- AcceptTermsOfService
- AddAccountService
- Try it!
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 ( |
Fields | |
---|---|
account |
Required. The account to be created. |
users[] |
Optional. Users to be added to the account. |
service[] |
Optional. If specified, an account service between the account to be created and the provider account is initialized as part of the creation. |
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 ( |
Fields | |
---|---|
parent |
Required. The resource name of the account for which a user will be created. Format: |
userId |
Required. The email address of the user (for example, |
user |
Required. The user to create. |
AcceptTermsOfService
Reference to a Terms of Service resource.
JSON representation |
---|
{ "name": string, "regionCode": string } |
Fields | |
---|---|
name |
Required. The resource name of the terms of service version. |
regionCode |
Required. Region code as defined by CLDR. This is either a country when the ToS applies specifically to that country or |
AddAccountService
Additional instructions to add account services during creation of the account.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field service_type . Currently only supports Multi-client parent account type. service_type can be only one of the following: |
|
accountAggregation |
The provider is an aggregator for the account. |
provider |
Optional. The provider of the service. Format: |