{
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "ownerName": "Google",
  "parameters": {
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    },
    "fields": {
      "type": "string",
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response."
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "location": "query",
      "description": "V1 error format.",
      "type": "string",
      "enum": [
        "1",
        "2"
      ]
    },
    "alt": {
      "default": "json",
      "location": "query",
      "description": "Data format for response.",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ],
      "type": "string",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    },
    "uploadType": {
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "prettyPrint": {
      "default": "true",
      "description": "Returns response with indentations and line breaks.",
      "type": "boolean",
      "location": "query"
    },
    "key": {
      "type": "string",
      "location": "query",
      "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."
    },
    "upload_protocol": {
      "location": "query",
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "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"
    }
  },
  "protocol": "rest",
  "description": "Programmatically manage your Merchant Center Accounts.",
  "batchPath": "batch",
  "basePath": "",
  "canonicalName": "Merchant",
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "baseUrl": "https://merchantapi.googleapis.com/",
  "resources": {
    "accounts": {
      "resources": {
        "contracts": {
          "resources": {
            "commissionGroups": {
              "methods": {
                "create": {
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups",
                  "id": "merchantapi.accounts.contracts.commissionGroups.create",
                  "parameterOrder": [
                    "parent"
                  ],
                  "request": {
                    "$ref": "CommissionGroup"
                  },
                  "httpMethod": "POST",
                  "path": "youtube/v1alpha/{+parent}/commissionGroups",
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "response": {
                    "$ref": "CommissionGroup"
                  },
                  "parameters": {
                    "parent": {
                      "location": "path",
                      "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                      "required": true,
                      "description": "Required. The parent contract where this commission group will be created. Format: `accounts/{account}/contracts/{contract}`",
                      "type": "string"
                    }
                  },
                  "description": "Creates a new commission group."
                },
                "list": {
                  "httpMethod": "GET",
                  "path": "youtube/v1alpha/{+parent}/commissionGroups",
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups",
                  "parameters": {
                    "pageSize": {
                      "description": "Optional. The maximum number of commission groups to return. The service may return fewer than this value. If unspecified, at most 100 commission groups will be returned. The maximum value is 100; values above 100 will be coerced to 100.",
                      "location": "query",
                      "format": "int32",
                      "type": "integer"
                    },
                    "pageToken": {
                      "location": "query",
                      "type": "string",
                      "description": "Optional. A page token, received from a previous `ListCommissionGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCommissionGroups` must match the call that provided the page token."
                    },
                    "parent": {
                      "required": true,
                      "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                      "description": "Required. The contract to list commission groups for. Format: `accounts/{account}/contracts/{contract}`",
                      "location": "path",
                      "type": "string"
                    }
                  },
                  "description": "Lists the commission groups for a given contract.",
                  "parameterOrder": [
                    "parent"
                  ],
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "response": {
                    "$ref": "ListCommissionGroupsResponse"
                  },
                  "id": "merchantapi.accounts.contracts.commissionGroups.list"
                },
                "patch": {
                  "parameters": {
                    "updateMask": {
                      "format": "google-fieldmask",
                      "type": "string",
                      "description": "Required. The list of fields to update. Fields specified in the update mask without a value specified in the body will be deleted from the commission group. If update mask is set to `*`, all fields will be updated.",
                      "location": "query"
                    },
                    "name": {
                      "required": true,
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "location": "path",
                      "type": "string",
                      "description": "Identifier. The name of the `CommissionGroup` resource. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`"
                    }
                  },
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "request": {
                    "$ref": "CommissionGroup"
                  },
                  "response": {
                    "$ref": "CommissionGroup"
                  },
                  "httpMethod": "PATCH",
                  "parameterOrder": [
                    "name"
                  ],
                  "id": "merchantapi.accounts.contracts.commissionGroups.patch",
                  "path": "youtube/v1alpha/{+name}",
                  "description": "Updates a given commission group.",
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ]
                },
                "get": {
                  "parameters": {
                    "name": {
                      "required": true,
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "type": "string",
                      "location": "path",
                      "description": "Required. The name of the commission group to retrieve. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`"
                    }
                  },
                  "description": "Retrieves the specified commission group.",
                  "response": {
                    "$ref": "CommissionGroup"
                  },
                  "path": "youtube/v1alpha/{+name}",
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "id": "merchantapi.accounts.contracts.commissionGroups.get",
                  "parameterOrder": [
                    "name"
                  ],
                  "httpMethod": "GET"
                },
                "delete": {
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "httpMethod": "DELETE",
                  "path": "youtube/v1alpha/{+name}",
                  "response": {
                    "$ref": "Empty"
                  },
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "description": "Deletes a given commission group.",
                  "parameterOrder": [
                    "name"
                  ],
                  "parameters": {
                    "name": {
                      "required": true,
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "location": "path",
                      "type": "string",
                      "description": "Required. The name of the commission group to delete. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`"
                    }
                  },
                  "id": "merchantapi.accounts.contracts.commissionGroups.delete"
                }
              }
            }
          },
          "methods": {
            "create": {
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "id": "merchantapi.accounts.contracts.create",
              "parameters": {
                "parent": {
                  "type": "string",
                  "pattern": "^accounts/[^/]+$",
                  "required": true,
                  "description": "Required. The parent account where this contract will be created. Format: `accounts/{account}`",
                  "location": "path"
                }
              },
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts",
              "description": "Creates a new contract.",
              "path": "youtube/v1alpha/{+parent}/contracts",
              "httpMethod": "POST",
              "request": {
                "$ref": "Contract"
              },
              "response": {
                "$ref": "Contract"
              },
              "parameterOrder": [
                "parent"
              ]
            },
            "patch": {
              "parameterOrder": [
                "name"
              ],
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                  "location": "path",
                  "description": "Identifier. The name of the `Contract` resource. Format: `accounts/{account}/contracts/{contract}`"
                },
                "updateMask": {
                  "type": "string",
                  "location": "query",
                  "description": "Required. The list of fields to update. Fields specified in the update mask without a value specified in the body will be deleted from the contract. If update mask is set to `*`, all fields will be updated.",
                  "format": "google-fieldmask"
                }
              },
              "id": "merchantapi.accounts.contracts.patch",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}",
              "description": "Updates a given contract.",
              "request": {
                "$ref": "Contract"
              },
              "httpMethod": "PATCH",
              "response": {
                "$ref": "Contract"
              },
              "path": "youtube/v1alpha/{+name}"
            },
            "list": {
              "parameters": {
                "pageSize": {
                  "description": "Optional. The maximum number of contracts to return. The service may return fewer than this value. If unspecified, at most 100 contracts will be returned. The maximum value is 100; values above 100 will be coerced to 100.",
                  "format": "int32",
                  "type": "integer",
                  "location": "query"
                },
                "parent": {
                  "description": "Required. The account to list contracts for. Format: `accounts/{account}`",
                  "required": true,
                  "type": "string",
                  "location": "path",
                  "pattern": "^accounts/[^/]+$"
                },
                "pageToken": {
                  "type": "string",
                  "description": "Optional. A page token, received from a previous `ListContracts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListContracts` must match the call that provided the page token.",
                  "location": "query"
                }
              },
              "description": "Lists the contracts for a given account.",
              "response": {
                "$ref": "ListContractsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "id": "merchantapi.accounts.contracts.list",
              "parameterOrder": [
                "parent"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts",
              "httpMethod": "GET",
              "path": "youtube/v1alpha/{+parent}/contracts"
            },
            "get": {
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}",
              "path": "youtube/v1alpha/{+name}",
              "parameters": {
                "name": {
                  "required": true,
                  "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                  "type": "string",
                  "description": "Required. The name of the contract to retrieve. Format: `accounts/{account}/contracts/{contract}`",
                  "location": "path"
                }
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "httpMethod": "GET",
              "response": {
                "$ref": "Contract"
              },
              "parameterOrder": [
                "name"
              ],
              "id": "merchantapi.accounts.contracts.get",
              "description": "Retrieves the specified contract."
            }
          }
        }
      }
    }
  },
  "version_module": true,
  "schemas": {
    "ProductStatusChangeMessage": {
      "id": "ProductStatusChangeMessage",
      "description": "The message that the merchant will receive to notify about product status change event",
      "type": "object",
      "properties": {
        "attribute": {
          "enumDescriptions": [
            "Unspecified attribute",
            "Status of the changed entity"
          ],
          "type": "string",
          "enum": [
            "ATTRIBUTE_UNSPECIFIED",
            "STATUS"
          ],
          "description": "The attribute in the resource that changed, in this case it will be always `Status`."
        },
        "changes": {
          "type": "array",
          "items": {
            "$ref": "ProductChange"
          },
          "description": "A message to describe the change that happened to the product"
        },
        "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": {
          "type": "string",
          "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"
        },
        "resource": {
          "description": "The product name. Format: `accounts/{account}/products/{product}`",
          "type": "string"
        },
        "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"
        },
        "account": {
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
          "type": "string"
        },
        "resourceType": {
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product",
            "Account service"
          ],
          "description": "The resource that changed, in this case it will always be `Product`.",
          "type": "string",
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT",
            "ACCOUNT_SERVICE"
          ]
        },
        "resourceId": {
          "description": "The product id.",
          "type": "string"
        }
      }
    },
    "CategorySelector": {
      "type": "object",
      "description": "Category selector.",
      "id": "CategorySelector",
      "properties": {
        "categories": {
          "description": "Required. The list of categories targeted by this selector. A maximum of 100 is allowed.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      }
    },
    "ListCommissionGroupsResponse": {
      "type": "object",
      "description": "Response message for the `ListCommissionGroups` method.",
      "id": "ListCommissionGroupsResponse",
      "properties": {
        "nextPageToken": {
          "type": "string",
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        },
        "commissionGroups": {
          "description": "The commission groups for the specified contract.",
          "items": {
            "$ref": "CommissionGroup"
          },
          "type": "array"
        }
      }
    },
    "ProductChange": {
      "type": "object",
      "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"
        },
        "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)",
          "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 .",
            "Real Estate Rental Ads. ."
          ],
          "type": "string",
          "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",
            "RENTAL_ADS"
          ],
          "enumDeprecated": [
            false,
            false,
            true,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false
          ]
        },
        "regionCode": {
          "description": "Countries that have the change (if applicable). Represented in the ISO 3166 format.",
          "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"
        }
      },
      "description": "The change that happened to the product including old value, new value, country code as the region code and reporting context."
    },
    "CommissionRate": {
      "properties": {
        "ratedCommissionBasisPoints": {
          "type": "integer",
          "format": "int32",
          "description": "Rated commission in basis points. For example: - 0.01% = 1 basis point. - 1% = 100 basis points. - 100% = 10000 basis points."
        }
      },
      "type": "object",
      "id": "CommissionRate",
      "description": "Commission that will be paid for conversions that match a given commission group."
    },
    "ListContractsResponse": {
      "id": "ListContractsResponse",
      "properties": {
        "contracts": {
          "items": {
            "$ref": "Contract"
          },
          "description": "The contracts for the specified account.",
          "type": "array"
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages."
        }
      },
      "type": "object",
      "description": "Response message for the `ListContracts` method."
    },
    "Contract": {
      "description": "Youtube Affiliate Program contract. Contains information about the commission rates applied to creators in the program.",
      "properties": {
        "name": {
          "description": "Identifier. The name of the `Contract` resource. Format: `accounts/{account}/contracts/{contract}`",
          "type": "string"
        },
        "defaultCommission": {
          "$ref": "CommissionRate",
          "description": "Required. The default commission rate for the contract."
        }
      },
      "id": "Contract",
      "type": "object"
    },
    "ProductSelector": {
      "id": "ProductSelector",
      "type": "object",
      "properties": {
        "categorySelector": {
          "description": "Optional. Selects products by category.",
          "$ref": "CategorySelector"
        }
      },
      "description": "Selects which products a commission group applies to. At least one of the selectors must be set. Multiple selectors may be set, though note combining a SkuSelector together with another selector type is not very meaningful as the SkuSelector can already be used to select the exact set of products."
    },
    "Empty": {
      "id": "Empty",
      "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
      "properties": {},
      "type": "object"
    },
    "CommissionGroup": {
      "type": "object",
      "properties": {
        "productSelector": {
          "description": "Required. Selects the products that this commission group applies to.",
          "$ref": "ProductSelector"
        },
        "commissionRate": {
          "$ref": "CommissionRate",
          "description": "Required. Commission that will be paid for conversions that match this commission group."
        },
        "name": {
          "type": "string",
          "description": "Identifier. The name of the `CommissionGroup` resource. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`"
        }
      },
      "description": "YouTube Affiliate Program commission group. A commission group defines a commission rate and the set of products it applies to.",
      "id": "CommissionGroup"
    }
  },
  "name": "merchantapi",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "servicePath": "",
  "fullyEncodeReservedExpansion": true,
  "ownerDomain": "google.com",
  "revision": "20260924",
  "documentationLink": "https://developers.google.com/merchant/api",
  "id": "merchantapi:youtube_v1alpha",
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "kind": "discovery#restDescription",
  "title": "Merchant API",
  "version": "youtube_v1alpha",
  "discoveryVersion": "v1"
}
