REST Resource: accounts.termsOfServiceAgreementStates
Stay organized with collections
Save and categorize content based on your preferences.
Resource: TermsOfServiceAgreementState
This resource represents the agreement state for a given account and terms of service kind. The state is as follows:
- If the business has accepted a terms of service,
accepted
will be populated, otherwise it will be empty
- If the business must sign a terms of service,
required
will be populated, otherwise it will be empty.
Note that both required
and accepted
can be present. In this case the accepted
terms of services will have an expiration date set in the validUntil
field. The required
terms of services need to be accepted before validUntil
in order for the account to continue having a valid agreement. When accepting new terms of services we expect third-party providers to display the text associated with the given terms of service agreement (the url to the file containing the text is added in the Required message below as tosFileUri
). The actual acceptance of the terms of service is done by calling accept on the TermsOfService
resource. validUntil
field.
JSON representation |
{
"name": string,
"regionCode": string,
"termsOfServiceKind": enum (TermsOfServiceKind ),
"accepted": {
object (Accepted )
},
"required": {
object (Required )
}
} |
Fields |
name |
string
Identifier. The resource name of the terms of service version. Format: accounts/{account}/termsOfServiceAgreementState/{identifier} The identifier format is: {[TermsOfServiceKind][google.shopping.merchant.accounts.v1.TermsOfServiceKind]}-{country} For example, an identifier could be: MERCHANT_CENTER-EU or MERCHANT_CENTER-US .
|
regionCode |
string
Required. Region code as defined by https://cldr.unicode.org/. This is the country the current state applies to.
|
termsOfServiceKind |
enum (TermsOfServiceKind )
Required. Terms of Service kind associated with the particular version.
|
accepted |
object (Accepted )
Optional. The accepted terms of service of this kind and for the associated regionCode
|
required |
object (Required )
Optional. The required terms of service
|
Accepted
JSON representation |
{
"termsOfService": string,
"acceptedBy": string,
"validUntil": {
object (Date )
}
} |
Fields |
termsOfService |
string
Required. The accepted termsOfService .
|
acceptedBy |
string
Required. The account where the acceptance was recorded. This can be the account itself or, in the case of subaccounts, the advanced account.
|
validUntil |
object (Date )
Optional. When set, it states that the accepted TermsOfService is only valid until the end of this date (in UTC). A new one must be accepted before then. The information of the required TermsOfService is found in the Required message.
|
Required
Describes the terms of service which are required to be accepted.
JSON representation |
{
"termsOfService": string,
"tosFileUri": string
} |
Fields |
termsOfService |
string
Required. The TermsOfService that need to be accepted.
|
tosFileUri |
string
Required. Full URL to the terms of service file. This field is the same as TermsOfService.file_uri , it is added here for convenience only.
|
Methods |
|
Returns the state of a terms of service agreement. |
|
Retrieves the state of the agreement for the application terms of service. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-03 UTC.
[null,null,["Last updated 2025-09-03 UTC."],[],[],null,["- [Resource: TermsOfServiceAgreementState](#TermsOfServiceAgreementState)\n - [JSON representation](#TermsOfServiceAgreementState.SCHEMA_REPRESENTATION)\n- [Accepted](#Accepted)\n - [JSON representation](#Accepted.SCHEMA_REPRESENTATION)\n- [Required](#Required)\n - [JSON representation](#Required.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: TermsOfServiceAgreementState This resource represents the agreement state for a given account and terms of service kind. The state is as follows:\n\n- If the business has accepted a terms of service, [`accepted`](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Accepted) will be populated, otherwise it will be empty\n- If the business must sign a terms of service, [`required`](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Required) will be populated, otherwise it will be empty.\n\nNote that both `required` and `accepted` can be present. In this case the `accepted` terms of services will have an expiration date set in the [`validUntil`](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Accepted.FIELDS.valid_until) field. The `required` terms of services need to be accepted before `validUntil` in order for the account to continue having a valid agreement. When accepting new terms of services we expect third-party providers to display the text associated with the given terms of service agreement (the url to the file containing the text is added in the Required message below as [`tosFileUri`](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Required.FIELDS.tos_file_uri)). The actual acceptance of the terms of service is done by calling accept on the [`TermsOfService`](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Accepted.FIELDS.terms_of_service) resource. `validUntil` field.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"regionCode\": string, \"termsOfServiceKind\": enum (/merchant/api/reference/rest/accounts_v1/TermsOfServiceKind), \"accepted\": { object (/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Accepted) }, \"required\": { object (/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Required) } } ``` |\n\n| Fields ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Identifier. The resource name of the terms of service version. Format: `accounts/{account}/termsOfServiceAgreementState/{identifier}` The identifier format is: `{[TermsOfServiceKind][google.shopping.merchant.accounts.v1.TermsOfServiceKind]}-{country}` For example, an identifier could be: `MERCHANT_CENTER-EU` or `MERCHANT_CENTER-US`. |\n| `regionCode` | `string` Required. Region code as defined by \u003chttps://cldr.unicode.org/\u003e. This is the country the current state applies to. |\n| `termsOfServiceKind` | `enum (`[TermsOfServiceKind](/merchant/api/reference/rest/accounts_v1/TermsOfServiceKind)`)` Required. Terms of Service kind associated with the particular version. |\n| `accepted` | `object (`[Accepted](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Accepted)`)` Optional. The accepted terms of service of this kind and for the associated regionCode |\n| `required` | `object (`[Required](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates#Required)`)` Optional. The required terms of service |\n\nAccepted Describes the [accepted terms of service](https://developers.google.com/merchant/api/guides/accounts/create-and-configure#accept_the_merchant_center_terms_of_service).\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"termsOfService\": string, \"acceptedBy\": string, \"validUntil\": { object (/merchant/api/reference/rest/Shared.Types/Date) } } ``` |\n\n| Fields ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `termsOfService` | `string` Required. The accepted [termsOfService](/merchant/api/reference/rest/accounts_v1/termsOfService#TermsOfService). |\n| `acceptedBy` | `string` Required. The account where the acceptance was recorded. This can be the account itself or, in the case of subaccounts, the advanced account. |\n| `validUntil` | `object (`[Date](/merchant/api/reference/rest/Shared.Types/Date)`)` Optional. When set, it states that the accepted `TermsOfService` is only valid until the end of this date (in UTC). A new one must be accepted before then. The information of the required `TermsOfService` is found in the `Required` message. |\n\nRequired Describes the terms of service which are required to be accepted.\n\n| JSON representation |\n|------------------------------------------------------------|\n| ``` { \"termsOfService\": string, \"tosFileUri\": string } ``` |\n\n| Fields ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `termsOfService` | `string` Required. The `TermsOfService` that need to be accepted. |\n| `tosFileUri` | `string` Required. Full URL to the terms of service file. This field is the same as `TermsOfService.file_uri`, it is added here for convenience only. |\n\n| Methods ||\n|----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|\n| [get](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates/get) | Returns the state of a terms of service agreement. |\n| [retrieveForApplication](/merchant/api/reference/rest/accounts_v1/accounts.termsOfServiceAgreementStates/retrieveForApplication) | Retrieves the state of the agreement for the application terms of service. |"]]