{
  "icons": {
    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    "x32": "http://www.google.com/images/icons/product/search-32.gif"
  },
  "version": "productstudio_v1alpha",
  "revision": "20260507",
  "fullyEncodeReservedExpansion": true,
  "protocol": "rest",
  "title": "Merchant API",
  "id": "merchantapi:productstudio_v1alpha",
  "basePath": "",
  "parameters": {
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "prettyPrint": {
      "location": "query",
      "description": "Returns response with indentations and line breaks.",
      "default": "true",
      "type": "boolean"
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "alt": {
      "location": "query",
      "description": "Data format for response.",
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ],
      "type": "string",
      "enumDescriptions": [
        "Responses with Content-Type of application/json",
        "Media download with context-dependent Content-Type",
        "Responses with Content-Type of application/x-protobuf"
      ]
    },
    "fields": {
      "location": "query",
      "description": "Selector specifying which fields to include in a partial response.",
      "type": "string"
    },
    "upload_protocol": {
      "type": "string",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
      "location": "query"
    },
    "quotaUser": {
      "location": "query",
      "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.",
      "type": "string"
    },
    "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"
    },
    "access_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth access token."
    },
    "uploadType": {
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
      "location": "query"
    },
    "$.xgafv": {
      "location": "query",
      "description": "V1 error format.",
      "enum": [
        "1",
        "2"
      ],
      "type": "string",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ]
    }
  },
  "kind": "discovery#restDescription",
  "servicePath": "",
  "name": "merchantapi",
  "version_module": true,
  "description": "Programmatically manage your Merchant Center Accounts.",
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "baseUrl": "https://merchantapi.googleapis.com/",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "discoveryVersion": "v1",
  "batchPath": "batch",
  "resources": {
    "accounts": {
      "resources": {
        "generatedImages": {
          "methods": {
            "upscaleProductImage": {
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:upscaleProductImage",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "description": "Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "description": "UpscaleProductImage generates a new image where the resolution of the original image is enhanced.",
              "request": {
                "$ref": "UpscaleProductImageRequest"
              },
              "response": {
                "$ref": "UpscaleProductImageResponse"
              },
              "id": "merchantapi.accounts.generatedImages.upscaleProductImage",
              "path": "productstudio/v1alpha/{+name}/generatedImages:upscaleProductImage"
            },
            "generateProductImageBackground": {
              "path": "productstudio/v1alpha/{+name}/generatedImages:generateProductImageBackground",
              "id": "merchantapi.accounts.generatedImages.generateProductImageBackground",
              "request": {
                "$ref": "GenerateProductImageBackgroundRequest"
              },
              "response": {
                "$ref": "GenerateProductImageBackgroundResponse"
              },
              "description": "GenerateProductImageBackground generates a new image where the background of the original image is replaced by an AI generated scene based on provided product information and a text prompt.",
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "description": "Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:generateProductImageBackground"
            },
            "removeProductImageBackground": {
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:removeProductImageBackground",
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "type": "string",
                  "required": true,
                  "description": "Required. The account for which to generate an image. This acts as a container for the request and does not affect the generation itself. Format: accounts/{account}",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "description": "RemoveProductImageBackground generates a new image where the background of the original image is removed.",
              "id": "merchantapi.accounts.generatedImages.removeProductImageBackground",
              "request": {
                "$ref": "RemoveProductImageBackgroundRequest"
              },
              "response": {
                "$ref": "RemoveProductImageBackgroundResponse"
              },
              "path": "productstudio/v1alpha/{+name}/generatedImages:removeProductImageBackground"
            }
          }
        },
        "textSuggestions": {
          "methods": {
            "generateProductTextSuggestions": {
              "httpMethod": "POST",
              "parameters": {
                "name": {
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "description": "Required. The name of the account to generate text suggestions for. This acts as a container for the request and does not affect the generation itself, as this is a stateless API. Format: accounts/{account}"
                }
              },
              "parameterOrder": [
                "name"
              ],
              "description": "GenerateProductTextSuggestions generates a set of candidate text completions (e.g., product titles, descriptions) based on provided product information. This endpoint leverages GenAI models to create suggestions for improving existing product text or generating new content.",
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}:generateProductTextSuggestions",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "request": {
                "$ref": "GenerateProductTextSuggestionsRequest"
              },
              "response": {
                "$ref": "GenerateProductTextSuggestionsResponse"
              },
              "id": "merchantapi.accounts.textSuggestions.generateProductTextSuggestions",
              "path": "productstudio/v1alpha/{+name}:generateProductTextSuggestions"
            }
          }
        }
      }
    }
  },
  "documentationLink": "https://developers.google.com/merchant/api",
  "canonicalName": "Merchant",
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "ownerName": "Google",
  "schemas": {
    "ProductTextGenerationMetadata": {
      "id": "ProductTextGenerationMetadata",
      "description": "Wrapper data type for any metadata associated with text generation.",
      "properties": {
        "metadata": {
          "type": "object",
          "description": "Metadata is a pretty loose concept. The data is modeled as a map here to indicate that there is no guaranteed structure to the output past a simple K:V association. The first use-case is to track words added/removed/changed in generations.",
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          }
        }
      },
      "type": "object"
    },
    "GenerateProductTextSuggestionsResponse": {
      "id": "GenerateProductTextSuggestionsResponse",
      "type": "object",
      "description": "Response message for the GenerateProductTextSuggestions method.",
      "properties": {
        "attributes": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Any other generated attributes.",
          "type": "object"
        },
        "title": {
          "description": "Generated title suggestion.",
          "$ref": "ProductTextGenerationSuggestion"
        },
        "description": {
          "description": "Generated description suggestion.",
          "$ref": "ProductTextGenerationSuggestion"
        },
        "metadata": {
          "description": "Additional info that clients may want to audit surrounding the generation.",
          "$ref": "ProductTextGenerationMetadata"
        }
      }
    },
    "GenerateProductTextSuggestionsRequest": {
      "id": "GenerateProductTextSuggestionsRequest",
      "type": "object",
      "description": "Request message for the GenerateProductTextSuggestions method.",
      "properties": {
        "outputSpec": {
          "description": "Optional. Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.",
          "$ref": "OutputSpec"
        },
        "productInfo": {
          "description": "Required. Available information about the product. Used to inform the genAI models.",
          "$ref": "ProductInfo"
        },
        "titleExamples": {
          "type": "array",
          "description": "Optional. Provide some hand-crafted examples of title improvements that are unique to your use case. This is a general tool that handles multiple product categories, but your brand identity may require custom functionality. Feel free to specify that here.",
          "items": {
            "$ref": "TitleExample"
          }
        }
      }
    },
    "Image": {
      "id": "Image",
      "type": "object",
      "description": "Product image represented as bytes directly or a URI.",
      "properties": {
        "data": {
          "description": "Raw bytes for the image.",
          "type": "string",
          "format": "byte"
        },
        "uri": {
          "description": "Generally web-requestable URI.",
          "type": "string"
        }
      }
    },
    "RgbColor": {
      "description": "Represents a color in RGB format.",
      "properties": {
        "green": {
          "description": "Optional. Values in [0, 255].",
          "type": "integer",
          "format": "int32"
        },
        "blue": {
          "type": "integer",
          "description": "Optional. Values in [0, 255].",
          "format": "int32"
        },
        "red": {
          "description": "Optional. Values in [0, 255].",
          "type": "integer",
          "format": "int32"
        }
      },
      "type": "object",
      "id": "RgbColor"
    },
    "GeneratedImage": {
      "description": "Represents a generated image object.",
      "properties": {
        "generationTime": {
          "format": "google-datetime",
          "description": "The timestamp when the image was generated.",
          "type": "string"
        },
        "uri": {
          "type": "string",
          "description": "Generally web-requestable URI of the generated image. This is a temporary URI and will expire after 29 days. A URI may not be populated immediately after generation. Use get or list api using image_id to get the URI."
        },
        "imageBytes": {
          "format": "byte",
          "description": "Raw bytes for the image.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Identifier. The unique key for the image."
        }
      },
      "type": "object",
      "id": "GeneratedImage"
    },
    "ProductTextGenerationSuggestion": {
      "description": "Text generated for a product, optionally including its quality score.",
      "properties": {
        "text": {
          "description": "The text generated",
          "type": "string"
        },
        "score": {
          "format": "float",
          "description": "The quality score associated with the generation. Heuristic implemented according to the feedgen team's implementation styles.",
          "type": "number"
        },
        "changeSummary": {
          "type": "string",
          "description": "A brief summarization of all the changes that have been made."
        }
      },
      "type": "object",
      "id": "ProductTextGenerationSuggestion"
    },
    "InputImage": {
      "description": "Represents an input image.",
      "properties": {
        "imageBytes": {
          "description": "Raw image bytes.",
          "type": "string",
          "format": "byte"
        },
        "imageUri": {
          "type": "string",
          "description": "Public uri of the image."
        }
      },
      "type": "object",
      "id": "InputImage"
    },
    "RemoveProductImageBackgroundRequest": {
      "id": "RemoveProductImageBackgroundRequest",
      "type": "object",
      "description": "Request message for the RemoveProductImageBackground method.",
      "properties": {
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "inputImage": {
          "description": "Required. The input image.",
          "$ref": "InputImage"
        },
        "config": {
          "description": "Optional. Configuration parameters for the removal of the background.",
          "$ref": "RemoveImageBackgroundConfig"
        }
      }
    },
    "GenerateImageBackgroundConfig": {
      "id": "GenerateImageBackgroundConfig",
      "description": "Client provided input configuration for generating the background.",
      "properties": {
        "productDescription": {
          "description": "Required. Example: \"Hat on a baseball field\" \"Hat\" = product description Description of product.",
          "type": "string"
        },
        "backgroundDescription": {
          "type": "string",
          "description": "Required. Example: \"Hat on a baseball field\" \"on a baseball field\" = background description Description of wanted background."
        }
      },
      "type": "object"
    },
    "UpscaleProductImageResponse": {
      "description": "Response message for the UpscaleProductImage method.",
      "properties": {
        "generatedImage": {
          "description": "The generated output image.",
          "$ref": "GeneratedImage"
        }
      },
      "type": "object",
      "id": "UpscaleProductImageResponse"
    },
    "GenerateProductImageBackgroundRequest": {
      "id": "GenerateProductImageBackgroundRequest",
      "description": "Request message for the GenerateProductImageBackground method.",
      "properties": {
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "inputImage": {
          "description": "Required. The input image.",
          "$ref": "InputImage"
        },
        "config": {
          "description": "Required. Configuration parameters for the generation of the background.",
          "$ref": "GenerateImageBackgroundConfig"
        }
      },
      "type": "object"
    },
    "RemoveImageBackgroundConfig": {
      "id": "RemoveImageBackgroundConfig",
      "description": "Client provided input configuration for removing the background.",
      "properties": {
        "backgroundColor": {
          "description": "Optional. If set, the result of background removal will be an RGB image with this given color as the background, instead of an RGBA 4-channel transparent image.",
          "$ref": "RgbColor"
        }
      },
      "type": "object"
    },
    "UpscaleProductImageRequest": {
      "id": "UpscaleProductImageRequest",
      "type": "object",
      "description": "Request message for the UpscaleProductImage method.",
      "properties": {
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "inputImage": {
          "description": "Required. The input image.",
          "$ref": "InputImage"
        }
      }
    },
    "TitleExample": {
      "id": "TitleExample",
      "description": "A hand-crafted example of a product title improvement. These examples are provided to the AI to improve its quality and guide it towards required outputs.",
      "properties": {
        "productInfo": {
          "description": "Required. A map containing all existing product information. For example: {\"title\": \"dress\", \"description\": \"A red dress\", \"brand\": \"Dresses4All\"} Any information that you might use to populate your product feed.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "finalProductInfo": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Required. A map in the same format as product_info but with all improvements included. For example, {\"brand\": \"Dresses4All\", \"product\": \"dress\", \"color\": \"red\", ...}. The order of attributes in this map may be used to guide the order in which they appear in the final generated title. For instance, the above will become: Dresses4All dress | red"
        },
        "category": {
          "description": "Required. The product's category. This helps the AI understand when certain examples are more relevant than others.",
          "type": "string"
        },
        "titleFormat": {
          "type": "string",
          "description": "Required. The attributes or approximate attributes that make up the title. For example, title \"Google GShoe M\" title_format can be \"brand | product | size\"."
        }
      },
      "type": "object"
    },
    "OutputImageConfig": {
      "id": "OutputImageConfig",
      "description": "Configuration for how the output image should be returned.",
      "properties": {
        "returnImageUri": {
          "type": "boolean",
          "description": "Optional. If true, returns the output images as serving uris instead of bytes."
        }
      },
      "type": "object"
    },
    "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
          ],
          "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 ."
          ],
          "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)"
        },
        "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"
        },
        "regionCode": {
          "type": "string",
          "description": "Countries that have the change (if applicable). Represented in the ISO 3166 format."
        }
      },
      "id": "ProductChange"
    },
    "ProductInfo": {
      "id": "ProductInfo",
      "description": "Available information about the product. Used to inform the genAI models.",
      "properties": {
        "productAttributes": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.",
          "type": "object"
        },
        "productImage": {
          "description": "Optional. Image associated with the product.",
          "$ref": "Image"
        }
      },
      "type": "object"
    },
    "ProductStatusChangeMessage": {
      "type": "object",
      "description": "The message that the merchant will receive to notify about product status change event",
      "properties": {
        "account": {
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
          "type": "string"
        },
        "resourceType": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product"
          ],
          "description": "The resource that changed, in this case it will always be `Product`.",
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT"
          ]
        },
        "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}`"
        },
        "expirationTime": {
          "type": "string",
          "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"
        },
        "resource": {
          "description": "The product name. Format: `accounts/{account}/products/{product}`",
          "type": "string"
        },
        "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`."
        },
        "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"
        },
        "resourceId": {
          "description": "The product id.",
          "type": "string"
        },
        "changes": {
          "type": "array",
          "description": "A message to describe the change that happened to the product",
          "items": {
            "$ref": "ProductChange"
          }
        }
      },
      "id": "ProductStatusChangeMessage"
    },
    "RemoveProductImageBackgroundResponse": {
      "id": "RemoveProductImageBackgroundResponse",
      "type": "object",
      "description": "Response message for the RemoveProductImageBackground method.",
      "properties": {
        "generatedImage": {
          "description": "The generated output image.",
          "$ref": "GeneratedImage"
        }
      }
    },
    "OutputSpec": {
      "id": "OutputSpec",
      "type": "object",
      "description": "Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.",
      "properties": {
        "workflowId": {
          "description": "Optional. The workflow to execute for the provided product data. Workflows may populate the response's title, description, or both. Currently supported workflow_ids are: \"title\", \"description\", and \"tide\"",
          "type": "string"
        },
        "attributeOrder": {
          "description": "Optional. The order that generated attributes should be placed in the generated title. Eg., if the attribute order is [\"brand\", \"product\", \"size\"], the generated title will have brand first, followed by the product name, and then size information after that.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "targetLanguage": {
          "type": "string",
          "description": "Optional. The language for output titles/descriptions. For example. 'German', 'es', 'FR'. Default is 'en'."
        },
        "editorialChanges": {
          "type": "string",
          "description": "Optional. Any editorial changes for the generated product data. For example, replace Small with \"S\", do not modify color if already present."
        },
        "attributeSeparator": {
          "type": "string",
          "description": "Optional. Character used to separate attributes in the generated title. For example, '|', '-', ','."
        },
        "tone": {
          "type": "string",
          "description": "Optional. The tone of the output generated text. Supported tones are: \"playful\", \"formal\", \"persuasive\", and \"conversational\""
        }
      }
    },
    "GenerateProductImageBackgroundResponse": {
      "id": "GenerateProductImageBackgroundResponse",
      "type": "object",
      "description": "Response message for the GenerateProductImageBackground method.",
      "properties": {
        "generatedImage": {
          "description": "The generated output image.",
          "$ref": "GeneratedImage"
        }
      }
    }
  },
  "ownerDomain": "google.com"
}
