{
  "fullyEncodeReservedExpansion": true,
  "parameters": {
    "fields": {
      "location": "query",
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "upload_protocol": {
      "type": "string",
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "access_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth access token."
    },
    "prettyPrint": {
      "description": "Returns response with indentations and line breaks.",
      "type": "boolean",
      "default": "true",
      "location": "query"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "location": "query",
      "type": "string",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    },
    "alt": {
      "type": "string",
      "default": "json",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "description": "Data format for response.",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "location": "query"
    },
    "callback": {
      "type": "string",
      "location": "query",
      "description": "JSONP"
    },
    "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.",
      "type": "string",
      "location": "query"
    },
    "oauth_token": {
      "type": "string",
      "location": "query",
      "description": "OAuth 2.0 token for the current user."
    },
    "quotaUser": {
      "location": "query",
      "type": "string",
      "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."
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    }
  },
  "protocol": "rest",
  "version": "loyaltycustomers_v1alpha",
  "kind": "discovery#restDescription",
  "batchPath": "batch",
  "name": "merchantapi",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "documentationLink": "https://developers.google.com/merchant/api",
  "ownerName": "Google",
  "resources": {
    "accounts": {
      "resources": {
        "loyaltyCustomers": {
          "methods": {
            "manage": {
              "id": "merchantapi.accounts.loyaltyCustomers.manage",
              "parameters": {
                "parent": {
                  "description": "Required. The parent account where this loyalty customer will be handled. Format: `accounts/{account}`",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string"
                }
              },
              "response": {
                "$ref": "ManageLoyaltyCustomerMatchResponse"
              },
              "httpMethod": "POST",
              "flatPath": "loyaltyCustomers/v1alpha/accounts/{accountsId}/loyaltyCustomers:manage",
              "path": "loyaltyCustomers/v1alpha/{+parent}/loyaltyCustomers: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.",
              "parameterOrder": [
                "parent"
              ],
              "request": {
                "$ref": "ManageLoyaltyCustomerMatchRequest"
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ]
            }
          }
        }
      }
    }
  },
  "title": "Merchant API",
  "servicePath": "",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "discoveryVersion": "v1",
  "schemas": {
    "AddressInfo": {
      "type": "object",
      "id": "AddressInfo",
      "description": "Represents a customer’s physical address.",
      "properties": {
        "city": {
          "description": "Optional. The city of the customer.",
          "type": "string"
        },
        "state": {
          "description": "Optional. The state or province 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"
        },
        "givenName": {
          "description": "Optional. The given name of the customer.",
          "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"
        },
        "familyName": {
          "type": "string",
          "description": "Optional. The family name of the customer."
        }
      }
    },
    "LoyaltyCustomer": {
      "type": "object",
      "id": "LoyaltyCustomer",
      "description": "Represents a customer’s loyalty information. Represents loyalty customer data in `ManageLoyaltyCustomerMatch` API, but is not a resource that can be retrieved or listed by other methods.",
      "properties": {
        "pointBalance": {
          "description": "Optional. The point balance of the loyalty customer.",
          "format": "int64",
          "type": "string"
        },
        "userIdentifier": {
          "description": "Required. The identifiers for the customer.",
          "$ref": "UserIdentifier"
        },
        "loyaltyTier": {
          "description": "Required. The tier label of the loyalty tier the customer belongs to.",
          "type": "string",
          "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 “NON_MEMBER” when the intent is to remove the user association from Google organic loyalty customer match experience."
          ],
          "enum": [
            "LOYALTY_TIER_UNSPECIFIED",
            "TIER1",
            "TIER2",
            "TIER3",
            "TIER4",
            "TIER5",
            "TIER6",
            "TIER7",
            "NON_MEMBER"
          ]
        }
      }
    },
    "ManageLoyaltyCustomerMatchRequest": {
      "type": "object",
      "description": "Request message for the ManageLoyaltyCustomerMatch method.",
      "properties": {
        "loyaltyCustomer": {
          "description": "Required. The loyalty customer to insert, update, or remove.",
          "$ref": "LoyaltyCustomer"
        }
      },
      "id": "ManageLoyaltyCustomerMatchRequest"
    },
    "UserIdentifier": {
      "id": "UserIdentifier",
      "description": "The user identifiers associated with the customer. At least one of the fields within this message must be provided.",
      "properties": {
        "address": {
          "description": "Optional. The customer’s physical address.",
          "$ref": "AddressInfo"
        },
        "emailAddress": {
          "type": "string",
          "description": "Optional. The customer’s email address."
        },
        "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"
    },
    "ManageLoyaltyCustomerMatchResponse": {
      "description": "Response message for the ManageLoyaltyCustomerMatch method.",
      "properties": {
        "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.",
          "$ref": "LoyaltyCustomer"
        }
      },
      "id": "ManageLoyaltyCustomerMatchResponse",
      "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.",
      "properties": {
        "regionCode": {
          "type": "string",
          "description": "Countries that have the change (if applicable). Represented in the ISO 3166 format."
        },
        "oldValue": {
          "type": "string",
          "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`, ``)"
        },
        "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"
        },
        "reportingContext": {
          "type": "string",
          "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 ."
          ],
          "enumDeprecated": [
            false,
            false,
            true,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false
          ],
          "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"
          ],
          "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)"
        }
      },
      "id": "ProductChange",
      "type": "object"
    },
    "ProductStatusChangeMessage": {
      "id": "ProductStatusChangeMessage",
      "description": "The message that the merchant will receive to notify about product status change event",
      "properties": {
        "attribute": {
          "enum": [
            "ATTRIBUTE_UNSPECIFIED",
            "STATUS"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unspecified attribute",
            "Status of the changed entity"
          ],
          "description": "The attribute in the resource that changed, in this case it will be always `Status`."
        },
        "resource": {
          "type": "string",
          "description": "The product name. Format: `accounts/{account}/products/{product}`"
        },
        "account": {
          "type": "string",
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`"
        },
        "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"
        },
        "eventTime": {
          "format": "google-datetime",
          "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.",
          "type": "string"
        },
        "resourceType": {
          "description": "The resource that changed, in this case it will always be `Product`.",
          "type": "string",
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product",
            "Account service"
          ],
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT",
            "ACCOUNT_SERVICE"
          ]
        },
        "changes": {
          "description": "A message to describe the change that happened to the product",
          "type": "array",
          "items": {
            "$ref": "ProductChange"
          }
        },
        "expirationTime": {
          "format": "google-datetime",
          "description": "Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.",
          "type": "string"
        },
        "resourceId": {
          "description": "The product id.",
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "ownerDomain": "google.com",
  "id": "merchantapi:loyaltycustomers_v1alpha",
  "baseUrl": "https://merchantapi.googleapis.com/",
  "description": "Programmatically manage your Merchant Center Accounts.",
  "basePath": "",
  "revision": "20260814",
  "version_module": true,
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "canonicalName": "Merchant"
}
