{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/content": {
"description": "Manage your product listings and accounts for Google Shopping"
}
}
}
},
"basePath": "",
"baseUrl": "https://merchantapi.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Merchant",
"description": "Programmatically manage your Merchant Center Accounts.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/merchant/api",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "merchantapi:loyaltycustomers_v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
"name": "merchantapi",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"accounts": {
"resources": {
"loyaltyCustomers": {
"methods": {
"manage": {
"description": "Manages (inserts, updates, or removes) a customer's loyalty tier information. This method serves as a single interface for all changes to a customer's loyalty status. The specific action (insert, update, or remove) is determined by the current state of the merchant-to-customer association and the `loyalty_tier` value provided in the request. **Operation Logic:** * **Upsert (Insert/Update):** Providing any valid tier other than `NON_MEMBER` will associate the customer with that tier. If an association already exists, it will be updated; otherwise, a new one will be created. * **Removal:** Setting `loyalty_tier` to `NON_MEMBER` will remove any existing loyalty association for the customer. **Privacy Note:** To protect user privacy, this method consistently returns a `200 OK` status with a default `LoyaltyCustomer` response if the customer's identifier cannot be matched to a Google account or if the user has not opted into loyalty personalization.",
"flatPath": "loyaltyCustomers/v1/accounts/{accountsId}/loyaltyCustomers:manage",
"httpMethod": "POST",
"id": "merchantapi.accounts.loyaltyCustomers.manage",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The parent account where this loyalty customer will be handled. Format: `accounts/{account}`",
"location": "path",
"pattern": "^accounts/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "loyaltyCustomers/v1/{+parent}/loyaltyCustomers:manage",
"request": {
"$ref": "ManageLoyaltyCustomerMatchRequest"
},
"response": {
"$ref": "ManageLoyaltyCustomerMatchResponse"
},
"scopes": [
"https://www.googleapis.com/auth/content"
]
}
}
}
}
}
},
"revision": "20260805",
"rootUrl": "https://merchantapi.googleapis.com/",
"schemas": {
"AddressInfo": {
"description": "Represents a customer\u2019s physical address.",
"id": "AddressInfo",
"properties": {
"city": {
"description": "Optional. The city of the customer.",
"type": "string"
},
"familyName": {
"description": "Optional. The family name of the customer.",
"type": "string"
},
"givenName": {
"description": "Optional. The given name of the customer.",
"type": "string"
},
"postalCode": {
"description": "Optional. The postal code (zip code) of the customer. **Format Rules:** * **United States:** 5-digit zip codes (e.g., \"94108\").",
"type": "string"
},
"regionCode": {
"description": "Optional. The Unicode country/region code (CLDR) of the customer, such as \"US\" or \"CH\". This field is case-insensitive. For more information, see https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/latest/supplemental/territory_containment_un_m_49.html.",
"type": "string"
},
"state": {
"description": "Optional. The state or province of the customer.",
"type": "string"
}
},
"type": "object"
},
"LoyaltyCustomer": {
"description": "Represents a customer\u2019s loyalty information. Represents loyalty customer data in `ManageLoyaltyCustomerMatch` API, but is not a resource that can be retrieved or listed by other methods.",
"id": "LoyaltyCustomer",
"properties": {
"loyaltyTier": {
"description": "Required. The tier label of the loyalty tier the customer belongs to.",
"enum": [
"LOYALTY_TIER_UNSPECIFIED",
"TIER1",
"TIER2",
"TIER3",
"TIER4",
"TIER5",
"TIER6",
"TIER7",
"NON_MEMBER"
],
"enumDescriptions": [
"Loyalty tier unspecified.",
"Loyalty tier 1.",
"Loyalty tier 2.",
"Loyalty tier 3.",
"Loyalty tier 4.",
"Loyalty tier 5.",
"Loyalty tier 6.",
"Loyalty tier 7.",
"Disassociates the user from any loyalty tier. Only set to \u201cNON_MEMBER\u201d when the intent is to remove the user association from Google organic loyalty customer match experience."
],
"type": "string"
},
"pointBalance": {
"description": "Optional. The point balance of the loyalty customer.",
"format": "int64",
"type": "string"
},
"userIdentifier": {
"$ref": "UserIdentifier",
"description": "Required. The identifiers for the customer."
}
},
"type": "object"
},
"ManageLoyaltyCustomerMatchRequest": {
"description": "Request message for the ManageLoyaltyCustomerMatch method.",
"id": "ManageLoyaltyCustomerMatchRequest",
"properties": {
"loyaltyCustomer": {
"$ref": "LoyaltyCustomer",
"description": "Required. The loyalty customer to insert, update, or remove."
}
},
"type": "object"
},
"ManageLoyaltyCustomerMatchResponse": {
"description": "Response message for the ManageLoyaltyCustomerMatch method.",
"id": "ManageLoyaltyCustomerMatchResponse",
"properties": {
"loyaltyCustomer": {
"$ref": "LoyaltyCustomer",
"description": "The loyalty customer that was inserted, updated, or removed. If the customer's identifier cannot be matched to a Google account or if the user has not opted into loyalty personalization, this field will contain a default `LoyaltyCustomer` instance."
}
},
"type": "object"
},
"ProductChange": {
"description": "The change that happened to the product including old value, new value, country code as the region code and reporting context.",
"id": "ProductChange",
"properties": {
"newValue": {
"description": "The new value of the changed resource or attribute. If empty, it means that the product was deleted. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)",
"type": "string"
},
"oldValue": {
"description": "The old value of the changed resource or attribute. If empty, it means that the product was created. Will have one of these values : (`approved`, `pending`, `disapproved`, ``)",
"type": "string"
},
"regionCode": {
"description": "Countries that have the change (if applicable). Represented in the ISO 3166 format.",
"type": "string"
},
"reportingContext": {
"description": "Reporting contexts that have the change (if applicable). Currently this field supports only (`SHOPPING_ADS`, `LOCAL_INVENTORY_ADS`, `YOUTUBE_SHOPPING`, `YOUTUBE_CHECKOUT`, `YOUTUBE_AFFILIATE`) from the enum value [ReportingContextEnum](/merchant/api/reference/rest/Shared.Types/ReportingContextEnum)",
"enum": [
"REPORTING_CONTEXT_ENUM_UNSPECIFIED",
"SHOPPING_ADS",
"DISCOVERY_ADS",
"DEMAND_GEN_ADS",
"DEMAND_GEN_ADS_DISCOVER_SURFACE",
"VIDEO_ADS",
"DISPLAY_ADS",
"LOCAL_INVENTORY_ADS",
"VEHICLE_INVENTORY_ADS",
"FREE_LISTINGS",
"FREE_LISTINGS_UCP_CHECKOUT",
"FREE_LOCAL_LISTINGS",
"FREE_LOCAL_VEHICLE_LISTINGS",
"YOUTUBE_AFFILIATE",
"YOUTUBE_SHOPPING",
"CLOUD_RETAIL",
"LOCAL_CLOUD_RETAIL",
"PRODUCT_REVIEWS",
"MERCHANT_REVIEWS",
"YOUTUBE_CHECKOUT"
],
"enumDeprecated": [
false,
false,
true,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"enumDescriptions": [
"Not specified.",
"[Shopping ads](https://support.google.com/merchants/answer/6149970).",
"Deprecated: Use `DEMAND_GEN_ADS` instead. [Discovery and Demand Gen ads](https://support.google.com/merchants/answer/13389785).",
"[Demand Gen ads](https://support.google.com/merchants/answer/13389785).",
"[Demand Gen ads on Discover surface](https://support.google.com/merchants/answer/13389785).",
"[Video ads](https://support.google.com/google-ads/answer/6340491).",
"[Display ads](https://support.google.com/merchants/answer/6069387).",
"[Local inventory ads](https://support.google.com/merchants/answer/3271956).",
"[Vehicle inventory ads](https://support.google.com/merchants/answer/11544533).",
"[Free product listings](https://support.google.com/merchants/answer/9199328).",
"[Free product listings on UCP checkout](https://developers.google.com/merchant/ucp).",
"[Free local product listings](https://support.google.com/merchants/answer/9825611).",
"[Free local vehicle listings](https://support.google.com/merchants/answer/11544533).",
"[Youtube Affiliate](https://support.google.com/youtube/answer/13376398).",
"[YouTube Shopping](https://support.google.com/merchants/answer/13478370).",
"[Cloud retail](https://cloud.google.com/solutions/retail).",
"[Local cloud retail](https://cloud.google.com/solutions/retail).",
"[Product Reviews](https://support.google.com/merchants/answer/14620732).",
"[Merchant Reviews](https://developers.google.com/merchant-review-feeds).",
"YouTube Checkout ."
],
"type": "string"
}
},
"type": "object"
},
"ProductStatusChangeMessage": {
"description": "The message that the merchant will receive to notify about product status change event",
"id": "ProductStatusChangeMessage",
"properties": {
"account": {
"description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
"type": "string"
},
"attribute": {
"description": "The attribute in the resource that changed, in this case it will be always `Status`.",
"enum": [
"ATTRIBUTE_UNSPECIFIED",
"STATUS"
],
"enumDescriptions": [
"Unspecified attribute",
"Status of the changed entity"
],
"type": "string"
},
"changes": {
"description": "A message to describe the change that happened to the product",
"items": {
"$ref": "ProductChange"
},
"type": "array"
},
"eventTime": {
"description": "The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.",
"format": "google-datetime",
"type": "string"
},
"expirationTime": {
"description": "Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.",
"format": "google-datetime",
"type": "string"
},
"managingAccount": {
"description": "The account that manages the merchant's account. can be the same as merchant id if it is standalone account. Format : `accounts/{service_provider_id}`",
"type": "string"
},
"resource": {
"description": "The product name. Format: `accounts/{account}/products/{product}`",
"type": "string"
},
"resourceId": {
"description": "The product id.",
"type": "string"
},
"resourceType": {
"description": "The resource that changed, in this case it will always be `Product`.",
"enum": [
"RESOURCE_UNSPECIFIED",
"PRODUCT",
"ACCOUNT_SERVICE"
],
"enumDescriptions": [
"Unspecified resource",
"Resource type : product",
"Account service"
],
"type": "string"
}
},
"type": "object"
},
"UserIdentifier": {
"description": "The user identifiers associated with the customer. At least one of the fields within this message must be provided.",
"id": "UserIdentifier",
"properties": {
"address": {
"$ref": "AddressInfo",
"description": "Optional. The customer\u2019s physical address."
},
"emailAddress": {
"description": "Optional. The customer\u2019s email address.",
"type": "string"
},
"phoneNumber": {
"description": "Optional. The customer's phone number, in [E.164 format](https://support.google.com/google-ads/answer/16355235) (e.g., \"+16502530000\").",
"type": "string"
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Merchant API",
"version": "loyaltycustomers_v1",
"version_module": true
}