- HTTP request
- Request body
- Response body
- Authorization scopes
- AddUser
- VerificationMailSettings
- VerificationMailMode
- AddAccountService
- SetAliasForRelationship
- Try it!
Creates a 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/v1/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. |
user[] |
Optional. Users to be added to the account. |
service[] |
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 |
setAlias[] |
Optional. If a relationship is created with a provider, you can set an alias for it with this field. The calling user must be an admin on the provider to be able to set an alias. |
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.
AddUser
Instruction for adding a user to the account during creation.
| JSON representation |
|---|
{ "userId": string, "user": { object ( |
| Fields | |
|---|---|
userId |
Required. The email address of the user (for example, |
user |
Optional. Details about the user to be added. At the moment, only access rights may be specified. |
verificationMailSettings |
Optional. Settings related to configuring the verification email that is sent after adding a user. |
VerificationMailSettings
Settings related to the verification email that is sent after adding a user.
| JSON representation |
|---|
{
"verificationMailMode": enum ( |
| Fields | |
|---|---|
verificationMailMode |
Optional. Mode of the verification mail. If not set, the default is |
VerificationMailMode
The different configuration options for sending a verification email when adding a user.
| Enums | |
|---|---|
VERIFICATION_MAIL_MODE_UNSPECIFIED |
Default first member of every enum. Do not use. |
SEND_VERIFICATION_MAIL |
An invitation email is sent to the user added shortly after. |
SUPPRESS_VERIFICATION_MAIL |
No invitation email is sent. This can be useful if the user is expected to accept the invitation through the API without needing another notification. |
AddAccountService
Additional instructions to add account services during creation of the account.
| JSON representation |
|---|
{ "externalAccountId": string, // Union field |
| Fields | |
|---|---|
externalAccountId |
Immutable. An optional, immutable identifier that Google uses to refer to this account when communicating with the provider. This should be the unique account ID within the provider's system (for example, your shop ID in Shopify). If you have multiple accounts with the same provider - for instance, different accounts for various regions — the The external account ID must be specified for the campaigns management service type. The external account ID must not be specified for the account aggregation service type. The external account ID is optional / may be specified for all other service types. |
Union field service_type. The service type to be added. service_type can be only one of the following: |
|
accountAggregation |
The provider is an aggregator for the account. Payload for service type Account Aggregation. |
accountManagement |
The provider manages this account. Payload for service type Account Management. |
comparisonShopping |
The provider is a CSS (Comparison Shopping Service) of this account. Payload for service type Comparison Shopping. |
productsManagement |
The provider manages products for this account. Payload for service type products management. |
campaignsManagement |
The provider manages campaigns for this account. Payload for service type campaigns management. |
provider |
Required. The provider of the service. Either the reference to an account such as |
SetAliasForRelationship
Set an alias for a relationship between a provider and the account to be created.
| JSON representation |
|---|
{ "provider": string, "accountIdAlias": string } |
| Fields | |
|---|---|
provider |
Required. The provider of the service. This is a reference to an account such as |
accountIdAlias |
Required. The unique ID of this account in the provider's system. The value must be unique across all accounts on the platform for this provider. |