{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-brand-product-response-schema.json",
  "title": "BrandProductResponse",
  "description": "Response model for brand product research results.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-products-api-openapi.yml#/components/schemas/BrandProductResponse",
  "properties": {
    "brand_url": {
      "type": "string",
      "title": "Brand Url",
      "description": "The brand's primary website URL"
    },
    "brand_name": {
      "type": "string",
      "title": "Brand Name",
      "description": "The resolved brand name"
    },
    "products": {
      "items": {
        "$ref": "#/$defs/ProductInfo"
      },
      "type": "array",
      "title": "Products",
      "description": "List of products found on the brand's website"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Pagination cursor for the next page of results (if available)."
    },
    "has_more": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Has More",
      "description": "Whether more pages of results are available."
    },
    "effort": {
      "$ref": "#/$defs/EffortLevel",
      "description": "Depth actually traveled to produce this page (resolved; never 'auto'). 'low' = served from the catalog/listing with no per-product detail lookups; 'mid'/'high' = a growing share of results needed a detail lookup.",
      "default": "low"
    }
  },
  "type": "object",
  "required": [
    "brand_url",
    "brand_name",
    "products"
  ],
  "$defs": {
    "EffortLevel": {
      "type": "string",
      "enum": [
        "auto",
        "low",
        "mid",
        "high"
      ],
      "title": "EffortLevel",
      "description": "Effort level for product research."
    },
    "ProductInfo": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "The name of the product"
        },
        "tier": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "primary",
                "secondary"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Tier",
          "description": "Relationship to the business: primary is its main goods or services; secondary is complementary or incidental offerings outside its main business. Omitted when website evidence is insufficient. Several or all products can be primary; this is not a popularity ranking."
        },
        "category": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Category",
          "description": "The category or type of the product"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "Description of the product"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Url",
          "description": "URL to the product page"
        },
        "image_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Image Url",
          "description": "URL of the product's primary image, if available."
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "ProductInfo",
      "description": "Product information from brand website."
    }
  }
}