{
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "revision": "20260624",
  "discoveryVersion": "v1",
  "ownerName": "Google",
  "id": "merchantapi:youtube_v1alpha",
  "canonicalName": "Merchant",
  "protocol": "rest",
  "version": "youtube_v1alpha",
  "fullyEncodeReservedExpansion": true,
  "schemas": {
    "ProductChange": {
      "id": "ProductChange",
      "type": "object",
      "description": "The change that happened to the product including old value, new value, country code as the region code and reporting context.",
      "properties": {
        "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"
        },
        "reportingContext": {
          "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 ."
          ],
          "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)",
          "type": "string"
        },
        "regionCode": {
          "type": "string",
          "description": "Countries that have the change (if applicable). Represented in the ISO 3166 format."
        },
        "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"
        }
      }
    },
    "CommissionRate": {
      "properties": {
        "ratedCommissionBasisPoints": {
          "format": "int32",
          "description": "Rated commission in basis points. For example: - 0.01% = 1 basis point. - 1% = 100 basis points. - 100% = 10000 basis points.",
          "type": "integer"
        }
      },
      "id": "CommissionRate",
      "type": "object",
      "description": "Commission that will be paid for conversions that match a given commission group."
    },
    "ListCommissionGroupsResponse": {
      "id": "ListCommissionGroupsResponse",
      "type": "object",
      "description": "Response message for the `ListCommissionGroups` method.",
      "properties": {
        "commissionGroups": {
          "items": {
            "$ref": "CommissionGroup"
          },
          "description": "The commission groups for the specified contract.",
          "type": "array"
        },
        "nextPageToken": {
          "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": "string"
        }
      }
    },
    "ProductSelector": {
      "description": "Selects which products a commission group applies to. At least one of the selectors must be set.",
      "id": "ProductSelector",
      "type": "object",
      "properties": {
        "categorySelector": {
          "description": "Optional. Selects products by category.",
          "$ref": "CategorySelector"
        }
      }
    },
    "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); }",
      "id": "Empty",
      "type": "object",
      "properties": {}
    },
    "ProductStatusChangeMessage": {
      "properties": {
        "account": {
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
          "type": "string"
        },
        "managingAccount": {
          "type": "string",
          "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}`"
        },
        "resourceId": {
          "description": "The product id.",
          "type": "string"
        },
        "resource": {
          "type": "string",
          "description": "The product name. Format: `accounts/{account}/products/{product}`"
        },
        "changes": {
          "items": {
            "$ref": "ProductChange"
          },
          "type": "array",
          "description": "A message to describe the change that happened to the product"
        },
        "expirationTime": {
          "format": "google-datetime",
          "type": "string",
          "description": "Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event."
        },
        "attribute": {
          "description": "The attribute in the resource that changed, in this case it will be always `Status`.",
          "type": "string",
          "enumDescriptions": [
            "Unspecified attribute",
            "Status of the changed entity"
          ],
          "enum": [
            "ATTRIBUTE_UNSPECIFIED",
            "STATUS"
          ]
        },
        "resourceType": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product",
            "Account service"
          ],
          "description": "The resource that changed, in this case it will always be `Product`.",
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT",
            "ACCOUNT_SERVICE"
          ]
        },
        "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.",
          "type": "string",
          "format": "google-datetime"
        }
      },
      "description": "The message that the merchant will receive to notify about product status change event",
      "id": "ProductStatusChangeMessage",
      "type": "object"
    },
    "ListContractsResponse": {
      "id": "ListContractsResponse",
      "type": "object",
      "description": "Response message for the `ListContracts` method.",
      "properties": {
        "contracts": {
          "description": "The contracts for the specified account.",
          "type": "array",
          "items": {
            "$ref": "Contract"
          }
        },
        "nextPageToken": {
          "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": "string"
        }
      }
    },
    "CategorySelector": {
      "id": "CategorySelector",
      "type": "object",
      "description": "Category selector.",
      "properties": {
        "categories": {
          "type": "array",
          "description": "Required. The list of categories targeted by this selector. A maximum of 100 is allowed.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Contract": {
      "id": "Contract",
      "type": "object",
      "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": {
          "description": "Required. The default commission rate for the contract.",
          "$ref": "CommissionRate"
        }
      }
    },
    "CommissionGroup": {
      "properties": {
        "name": {
          "type": "string",
          "description": "Identifier. The name of the `CommissionGroup` resource. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`"
        },
        "commissionRate": {
          "description": "Required. Commission that will be paid for conversions that match this commission group.",
          "$ref": "CommissionRate"
        },
        "productSelector": {
          "description": "Required. Selects the products that this commission group applies to.",
          "$ref": "ProductSelector"
        }
      },
      "id": "CommissionGroup",
      "type": "object",
      "description": "Youtube Affiliate Program commission group. A commission group defines a commission rate and the set of products it applies to."
    }
  },
  "documentationLink": "https://developers.google.com/merchant/api",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "ownerDomain": "google.com",
  "description": "Programmatically manage your Merchant Center Accounts.",
  "basePath": "",
  "resources": {
    "accounts": {
      "resources": {
        "contracts": {
          "methods": {
            "list": {
              "path": "youtube/v1alpha/{+parent}/contracts",
              "id": "merchantapi.accounts.contracts.list",
              "httpMethod": "GET",
              "parameterOrder": [
                "parent"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts",
              "response": {
                "$ref": "ListContractsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "parameters": {
                "pageToken": {
                  "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",
                  "type": "string"
                },
                "pageSize": {
                  "type": "integer",
                  "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.",
                  "location": "query",
                  "format": "int32"
                },
                "parent": {
                  "type": "string",
                  "description": "Required. The account to list contracts for. Format: `accounts/{account}`",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "required": true
                }
              },
              "description": "Lists the contracts for a given account."
            },
            "patch": {
              "description": "Updates a given contract.",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "parameters": {
                "name": {
                  "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "description": "Identifier. The name of the `Contract` resource. Format: `accounts/{account}/contracts/{contract}`",
                  "type": "string"
                },
                "updateMask": {
                  "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 contract. If update mask is set to `*`, all fields will be updated.",
                  "location": "query",
                  "format": "google-fieldmask"
                }
              },
              "id": "merchantapi.accounts.contracts.patch",
              "httpMethod": "PATCH",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}",
              "response": {
                "$ref": "Contract"
              },
              "request": {
                "$ref": "Contract"
              },
              "path": "youtube/v1alpha/{+name}"
            },
            "get": {
              "id": "merchantapi.accounts.contracts.get",
              "httpMethod": "GET",
              "parameterOrder": [
                "name"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}",
              "response": {
                "$ref": "Contract"
              },
              "path": "youtube/v1alpha/{+name}",
              "description": "Retrieves the specified contract.",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "parameters": {
                "name": {
                  "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "description": "Required. The name of the contract to retrieve. Format: `accounts/{account}/contracts/{contract}`",
                  "type": "string"
                }
              }
            },
            "create": {
              "id": "merchantapi.accounts.contracts.create",
              "httpMethod": "POST",
              "parameterOrder": [
                "parent"
              ],
              "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts",
              "response": {
                "$ref": "Contract"
              },
              "request": {
                "$ref": "Contract"
              },
              "path": "youtube/v1alpha/{+parent}/contracts",
              "description": "Creates a new contract.",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "parameters": {
                "parent": {
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "description": "Required. The parent account where this contract will be created. Format: `accounts/{account}`",
                  "type": "string"
                }
              }
            }
          },
          "resources": {
            "commissionGroups": {
              "methods": {
                "list": {
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "parameters": {
                    "pageToken": {
                      "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.",
                      "location": "query",
                      "type": "string"
                    },
                    "pageSize": {
                      "type": "integer",
                      "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"
                    },
                    "parent": {
                      "type": "string",
                      "description": "Required. The contract to list commission groups for. Format: `accounts/{account}/contracts/{contract}`",
                      "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                      "location": "path",
                      "required": true
                    }
                  },
                  "description": "Lists the commission groups for a given contract.",
                  "path": "youtube/v1alpha/{+parent}/commissionGroups",
                  "id": "merchantapi.accounts.contracts.commissionGroups.list",
                  "httpMethod": "GET",
                  "parameterOrder": [
                    "parent"
                  ],
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups",
                  "response": {
                    "$ref": "ListCommissionGroupsResponse"
                  }
                },
                "create": {
                  "description": "Creates a new commission group.",
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "parameters": {
                    "parent": {
                      "pattern": "^accounts/[^/]+/contracts/[^/]+$",
                      "location": "path",
                      "required": true,
                      "type": "string",
                      "description": "Required. The parent contract where this commission group will be created. Format: `accounts/{account}/contracts/{contract}`"
                    }
                  },
                  "id": "merchantapi.accounts.contracts.commissionGroups.create",
                  "httpMethod": "POST",
                  "parameterOrder": [
                    "parent"
                  ],
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups",
                  "response": {
                    "$ref": "CommissionGroup"
                  },
                  "request": {
                    "$ref": "CommissionGroup"
                  },
                  "path": "youtube/v1alpha/{+parent}/commissionGroups"
                },
                "delete": {
                  "description": "Deletes a given commission group.",
                  "parameters": {
                    "name": {
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "location": "path",
                      "required": true,
                      "description": "Required. The name of the commission group to delete. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`",
                      "type": "string"
                    }
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "response": {
                    "$ref": "Empty"
                  },
                  "id": "merchantapi.accounts.contracts.commissionGroups.delete",
                  "httpMethod": "DELETE",
                  "parameterOrder": [
                    "name"
                  ],
                  "path": "youtube/v1alpha/{+name}"
                },
                "patch": {
                  "path": "youtube/v1alpha/{+name}",
                  "request": {
                    "$ref": "CommissionGroup"
                  },
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "response": {
                    "$ref": "CommissionGroup"
                  },
                  "id": "merchantapi.accounts.contracts.commissionGroups.patch",
                  "httpMethod": "PATCH",
                  "parameterOrder": [
                    "name"
                  ],
                  "parameters": {
                    "updateMask": {
                      "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",
                      "format": "google-fieldmask"
                    },
                    "name": {
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "location": "path",
                      "required": true,
                      "description": "Identifier. The name of the `CommissionGroup` resource. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`",
                      "type": "string"
                    }
                  },
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "description": "Updates a given commission group."
                },
                "get": {
                  "scopes": [
                    "https://www.googleapis.com/auth/content"
                  ],
                  "parameters": {
                    "name": {
                      "pattern": "^accounts/[^/]+/contracts/[^/]+/commissionGroups/[^/]+$",
                      "location": "path",
                      "required": true,
                      "description": "Required. The name of the commission group to retrieve. Format: `accounts/{account}/contracts/{contract}/commissionGroups/{commission_group}`",
                      "type": "string"
                    }
                  },
                  "description": "Retrieves the specified commission group.",
                  "path": "youtube/v1alpha/{+name}",
                  "id": "merchantapi.accounts.contracts.commissionGroups.get",
                  "httpMethod": "GET",
                  "parameterOrder": [
                    "name"
                  ],
                  "flatPath": "youtube/v1alpha/accounts/{accountsId}/contracts/{contractsId}/commissionGroups/{commissionGroupsId}",
                  "response": {
                    "$ref": "CommissionGroup"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "name": "merchantapi",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "title": "Merchant API",
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "kind": "discovery#restDescription",
  "parameters": {
    "prettyPrint": {
      "type": "boolean",
      "description": "Returns response with indentations and line breaks.",
      "location": "query",
      "default": "true"
    },
    "access_token": {
      "description": "OAuth access token.",
      "location": "query",
      "type": "string"
    },
    "quotaUser": {
      "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.",
      "location": "query"
    },
    "fields": {
      "type": "string",
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query"
    },
    "key": {
      "type": "string",
      "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"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "$.xgafv": {
      "description": "V1 error format.",
      "type": "string",
      "location": "query",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "enum": [
        "1",
        "2"
      ]
    },
    "callback": {
      "description": "JSONP",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "type": "string",
      "description": "Data format for response.",
      "default": "json",
      "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"
    },
    "oauth_token": {
      "description": "OAuth 2.0 token for the current user.",
      "location": "query",
      "type": "string"
    }
  },
  "version_module": true,
  "servicePath": "",
  "baseUrl": "https://merchantapi.googleapis.com/",
  "batchPath": "batch"
}
