{
  "version_module": true,
  "discoveryVersion": "v1",
  "protocol": "rest",
  "mtlsRootUrl": "https://merchantapi.mtls.googleapis.com/",
  "ownerName": "Google",
  "rootUrl": "https://merchantapi.googleapis.com/",
  "description": "Programmatically manage your Merchant Center Accounts.",
  "documentationLink": "https://developers.google.com/merchant/api",
  "fullyEncodeReservedExpansion": true,
  "auth": {
    "oauth2": {
      "scopes": {
        "https://www.googleapis.com/auth/content": {
          "description": "Manage your product listings and accounts for Google Shopping"
        }
      }
    }
  },
  "title": "Merchant API",
  "baseUrl": "https://merchantapi.googleapis.com/",
  "version": "productstudio_v1alpha",
  "revision": "20260715",
  "icons": {
    "x32": "http://www.google.com/images/icons/product/search-32.gif",
    "x16": "http://www.google.com/images/icons/product/search-16.gif"
  },
  "kind": "discovery#restDescription",
  "parameters": {
    "uploadType": {
      "location": "query",
      "type": "string",
      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\")."
    },
    "key": {
      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
      "location": "query",
      "type": "string"
    },
    "$.xgafv": {
      "type": "string",
      "location": "query",
      "description": "V1 error format.",
      "enumDescriptions": [
        "v1 error format",
        "v2 error format"
      ],
      "enum": [
        "1",
        "2"
      ]
    },
    "oauth_token": {
      "location": "query",
      "type": "string",
      "description": "OAuth 2.0 token for the current user."
    },
    "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.",
      "type": "string",
      "location": "query"
    },
    "access_token": {
      "description": "OAuth access token.",
      "type": "string",
      "location": "query"
    },
    "prettyPrint": {
      "description": "Returns response with indentations and line breaks.",
      "type": "boolean",
      "default": "true",
      "location": "query"
    },
    "upload_protocol": {
      "type": "string",
      "location": "query",
      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
    },
    "callback": {
      "description": "JSONP",
      "type": "string",
      "location": "query"
    },
    "fields": {
      "description": "Selector specifying which fields to include in a partial response.",
      "location": "query",
      "type": "string"
    },
    "alt": {
      "type": "string",
      "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"
      ],
      "default": "json",
      "enum": [
        "json",
        "media",
        "proto"
      ]
    }
  },
  "id": "merchantapi:productstudio_v1alpha",
  "canonicalName": "Merchant",
  "ownerDomain": "google.com",
  "basePath": "",
  "resources": {
    "accounts": {
      "resources": {
        "generatedImages": {
          "methods": {
            "upscaleProductImage": {
              "path": "productstudio/v1alpha/{+name}/generatedImages:upscaleProductImage",
              "parameters": {
                "name": {
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "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"
              ],
              "httpMethod": "POST",
              "id": "merchantapi.accounts.generatedImages.upscaleProductImage",
              "request": {
                "$ref": "UpscaleProductImageRequest"
              },
              "description": "UpscaleProductImage generates a new image where the resolution of the original image is enhanced.",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:upscaleProductImage",
              "response": {
                "$ref": "UpscaleProductImageResponse"
              }
            },
            "removeProductImageBackground": {
              "parameterOrder": [
                "name"
              ],
              "path": "productstudio/v1alpha/{+name}/generatedImages:removeProductImageBackground",
              "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}"
                }
              },
              "httpMethod": "POST",
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "description": "RemoveProductImageBackground generates a new image where the background of the original image is removed.",
              "id": "merchantapi.accounts.generatedImages.removeProductImageBackground",
              "request": {
                "$ref": "RemoveProductImageBackgroundRequest"
              },
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:removeProductImageBackground",
              "response": {
                "$ref": "RemoveProductImageBackgroundResponse"
              }
            },
            "generateProductImageBackground": {
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}/generatedImages:generateProductImageBackground",
              "response": {
                "$ref": "GenerateProductImageBackgroundResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "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.",
              "id": "merchantapi.accounts.generatedImages.generateProductImageBackground",
              "request": {
                "$ref": "GenerateProductImageBackgroundRequest"
              },
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "path": "productstudio/v1alpha/{+name}/generatedImages:generateProductImageBackground",
              "parameters": {
                "name": {
                  "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}",
                  "required": true,
                  "type": "string",
                  "pattern": "^accounts/[^/]+$",
                  "location": "path"
                }
              }
            }
          }
        },
        "textSuggestions": {
          "methods": {
            "generateProductTextSuggestions": {
              "flatPath": "productstudio/v1alpha/accounts/{accountsId}:generateProductTextSuggestions",
              "response": {
                "$ref": "GenerateProductTextSuggestionsResponse"
              },
              "scopes": [
                "https://www.googleapis.com/auth/content"
              ],
              "id": "merchantapi.accounts.textSuggestions.generateProductTextSuggestions",
              "request": {
                "$ref": "GenerateProductTextSuggestionsRequest"
              },
              "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.",
              "httpMethod": "POST",
              "parameterOrder": [
                "name"
              ],
              "path": "productstudio/v1alpha/{+name}:generateProductTextSuggestions",
              "parameters": {
                "name": {
                  "pattern": "^accounts/[^/]+$",
                  "location": "path",
                  "required": true,
                  "type": "string",
                  "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}"
                }
              }
            }
          }
        }
      }
    }
  },
  "schemas": {
    "UpscaleProductImageResponse": {
      "type": "object",
      "id": "UpscaleProductImageResponse",
      "description": "Response message for the UpscaleProductImage method.",
      "properties": {
        "generatedImage": {
          "description": "The generated output image.",
          "$ref": "GeneratedImage"
        }
      }
    },
    "GenerateProductImageBackgroundResponse": {
      "id": "GenerateProductImageBackgroundResponse",
      "description": "Response message for the GenerateProductImageBackground method.",
      "properties": {
        "generatedImage": {
          "description": "The generated output image.",
          "$ref": "GeneratedImage"
        }
      },
      "type": "object"
    },
    "ProductTextGenerationMetadata": {
      "description": "Wrapper data type for any metadata associated with text generation.",
      "properties": {
        "metadata": {
          "additionalProperties": {
            "type": "any",
            "description": "Properties of the object."
          },
          "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."
        }
      },
      "id": "ProductTextGenerationMetadata",
      "type": "object"
    },
    "RemoveProductImageBackgroundRequest": {
      "id": "RemoveProductImageBackgroundRequest",
      "description": "Request message for the RemoveProductImageBackground method.",
      "properties": {
        "inputImage": {
          "$ref": "InputImage",
          "description": "Required. The input image."
        },
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "config": {
          "$ref": "RemoveImageBackgroundConfig",
          "description": "Optional. Configuration parameters for the removal of the background."
        }
      },
      "type": "object"
    },
    "ProductInfo": {
      "id": "ProductInfo",
      "description": "Available information about the product. Used to inform the genAI models.",
      "properties": {
        "productAttributes": {
          "description": "Required. A mapping of all available product attributes. This may include title, description, brand, gender, color, size, etc.",
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "productImage": {
          "description": "Optional. Image associated with the product.",
          "$ref": "Image"
        }
      },
      "type": "object"
    },
    "TitleExample": {
      "type": "object",
      "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.",
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "titleFormat": {
          "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": "string"
        },
        "category": {
          "description": "Required. The product's category. This helps the AI understand when certain examples are more relevant than others.",
          "type": "string"
        },
        "finalProductInfo": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "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"
        }
      },
      "id": "TitleExample"
    },
    "GenerateProductImageBackgroundRequest": {
      "type": "object",
      "id": "GenerateProductImageBackgroundRequest",
      "description": "Request message for the GenerateProductImageBackground method.",
      "properties": {
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "config": {
          "$ref": "GenerateImageBackgroundConfig",
          "description": "Required. Configuration parameters for the generation of the background."
        },
        "inputImage": {
          "$ref": "InputImage",
          "description": "Required. The input image."
        }
      }
    },
    "UpscaleProductImageRequest": {
      "id": "UpscaleProductImageRequest",
      "description": "Request message for the UpscaleProductImage method.",
      "properties": {
        "outputConfig": {
          "description": "Optional. Configuration for how the output image should be returned.",
          "$ref": "OutputImageConfig"
        },
        "inputImage": {
          "$ref": "InputImage",
          "description": "Required. The input image."
        }
      },
      "type": "object"
    },
    "InputImage": {
      "id": "InputImage",
      "description": "Represents an input image.",
      "properties": {
        "imageBytes": {
          "type": "string",
          "description": "Raw image bytes.",
          "format": "byte"
        },
        "imageUri": {
          "description": "Public uri of the image.",
          "type": "string"
        }
      },
      "type": "object"
    },
    "GenerateProductTextSuggestionsResponse": {
      "id": "GenerateProductTextSuggestionsResponse",
      "description": "Response message for the GenerateProductTextSuggestions method.",
      "properties": {
        "title": {
          "$ref": "ProductTextGenerationSuggestion",
          "description": "Generated title suggestion."
        },
        "attributes": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object",
          "description": "Any other generated attributes."
        },
        "description": {
          "description": "Generated description suggestion.",
          "$ref": "ProductTextGenerationSuggestion"
        },
        "metadata": {
          "description": "Additional info that clients may want to audit surrounding the generation.",
          "$ref": "ProductTextGenerationMetadata"
        }
      },
      "type": "object"
    },
    "OutputSpec": {
      "id": "OutputSpec",
      "description": "Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.",
      "properties": {
        "targetLanguage": {
          "description": "Optional. The language for output titles/descriptions. For example. 'German', 'es', 'FR'. Default is 'en'.",
          "type": "string"
        },
        "tone": {
          "description": "Optional. The tone of the output generated text. Supported tones are: \"playful\", \"formal\", \"persuasive\", and \"conversational\"",
          "type": "string"
        },
        "editorialChanges": {
          "description": "Optional. Any editorial changes for the generated product data. For example, replace Small with \"S\", do not modify color if already present.",
          "type": "string"
        },
        "attributeSeparator": {
          "description": "Optional. Character used to separate attributes in the generated title. For example, '|', '-', ','.",
          "type": "string"
        },
        "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"
        }
      },
      "type": "object"
    },
    "Image": {
      "type": "object",
      "description": "Product image represented as bytes directly or a URI.",
      "properties": {
        "data": {
          "format": "byte",
          "description": "Raw bytes for the image.",
          "type": "string"
        },
        "uri": {
          "description": "Generally web-requestable URI.",
          "type": "string"
        }
      },
      "id": "Image"
    },
    "RemoveProductImageBackgroundResponse": {
      "type": "object",
      "description": "Response message for the RemoveProductImageBackground method.",
      "properties": {
        "generatedImage": {
          "$ref": "GeneratedImage",
          "description": "The generated output image."
        }
      },
      "id": "RemoveProductImageBackgroundResponse"
    },
    "GeneratedImage": {
      "type": "object",
      "description": "Represents a generated image object.",
      "properties": {
        "imageBytes": {
          "type": "string",
          "description": "Raw bytes for the image.",
          "format": "byte"
        },
        "name": {
          "description": "Identifier. The unique key for the image.",
          "type": "string"
        },
        "generationTime": {
          "description": "The timestamp when the image was generated.",
          "format": "google-datetime",
          "type": "string"
        },
        "uri": {
          "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.",
          "type": "string"
        }
      },
      "id": "GeneratedImage"
    },
    "ProductTextGenerationSuggestion": {
      "type": "object",
      "description": "Text generated for a product, optionally including its quality score.",
      "properties": {
        "text": {
          "description": "The text generated",
          "type": "string"
        },
        "changeSummary": {
          "description": "A brief summarization of all the changes that have been made.",
          "type": "string"
        },
        "score": {
          "type": "number",
          "format": "float",
          "description": "The quality score associated with the generation. Heuristic implemented according to the feedgen team's implementation styles."
        }
      },
      "id": "ProductTextGenerationSuggestion"
    },
    "ProductStatusChangeMessage": {
      "description": "The message that the merchant will receive to notify about product status change event",
      "properties": {
        "resourceId": {
          "description": "The product id.",
          "type": "string"
        },
        "eventTime": {
          "description": "The time at which the event was generated. If you want to order the notification messages you receive you should rely on this field not on the order of receiving the notifications.",
          "format": "google-datetime",
          "type": "string"
        },
        "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"
        },
        "resourceType": {
          "enum": [
            "RESOURCE_UNSPECIFIED",
            "PRODUCT",
            "ACCOUNT_SERVICE"
          ],
          "type": "string",
          "enumDescriptions": [
            "Unspecified resource",
            "Resource type : product",
            "Account service"
          ],
          "description": "The resource that changed, in this case it will always be `Product`."
        },
        "changes": {
          "description": "A message to describe the change that happened to the product",
          "items": {
            "$ref": "ProductChange"
          },
          "type": "array"
        },
        "account": {
          "description": "The target account that owns the entity that changed. Format : `accounts/{merchant_id}`",
          "type": "string"
        },
        "attribute": {
          "type": "string",
          "enumDescriptions": [
            "Unspecified attribute",
            "Status of the changed entity"
          ],
          "enum": [
            "ATTRIBUTE_UNSPECIFIED",
            "STATUS"
          ],
          "description": "The attribute in the resource that changed, in this case it will be always `Status`."
        },
        "resource": {
          "description": "The product name. Format: `accounts/{account}/products/{product}`",
          "type": "string"
        },
        "expirationTime": {
          "description": "Optional. The product expiration time. This field will not be set if the notification is sent for a product deletion event.",
          "format": "google-datetime",
          "type": "string"
        }
      },
      "id": "ProductStatusChangeMessage",
      "type": "object"
    },
    "GenerateImageBackgroundConfig": {
      "type": "object",
      "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": {
          "description": "Required. Example: \"Hat on a baseball field\" \"on a baseball field\" = background description Description of wanted background.",
          "type": "string"
        }
      }
    },
    "OutputImageConfig": {
      "type": "object",
      "id": "OutputImageConfig",
      "description": "Configuration for how the output image should be returned.",
      "properties": {
        "returnImageUri": {
          "description": "Optional. If true, returns the output images as serving uris instead of bytes.",
          "type": "boolean"
        }
      }
    },
    "GenerateProductTextSuggestionsRequest": {
      "type": "object",
      "description": "Request message for the GenerateProductTextSuggestions method.",
      "properties": {
        "productInfo": {
          "description": "Required. Available information about the product. Used to inform the genAI models.",
          "$ref": "ProductInfo"
        },
        "outputSpec": {
          "description": "Optional. Configuration parameters that directly influence what content is generated, and how that content is rendered in the final response.",
          "$ref": "OutputSpec"
        },
        "titleExamples": {
          "items": {
            "$ref": "TitleExample"
          },
          "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."
        }
      },
      "id": "GenerateProductTextSuggestionsRequest"
    },
    "ProductChange": {
      "description": "The change that happened to the product including old value, new value, country code as the region code and reporting context.",
      "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"
        },
        "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"
        },
        "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)",
          "enumDeprecated": [
            false,
            false,
            true,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false,
            false
          ],
          "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"
          ],
          "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 ."
          ]
        }
      },
      "id": "ProductChange",
      "type": "object"
    },
    "RgbColor": {
      "id": "RgbColor",
      "description": "Represents a color in RGB format.",
      "properties": {
        "red": {
          "description": "Optional. Values in [0, 255].",
          "format": "int32",
          "type": "integer"
        },
        "blue": {
          "description": "Optional. Values in [0, 255].",
          "format": "int32",
          "type": "integer"
        },
        "green": {
          "type": "integer",
          "format": "int32",
          "description": "Optional. Values in [0, 255]."
        }
      },
      "type": "object"
    },
    "RemoveImageBackgroundConfig": {
      "type": "object",
      "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"
        }
      },
      "id": "RemoveImageBackgroundConfig"
    }
  },
  "name": "merchantapi",
  "servicePath": "",
  "batchPath": "batch"
}
