{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qrflow-codes/json-schema/qrflow-codes-product-schema.json",
  "title": "Product",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qrflow-codes-openapi.yml#/components/schemas/Product",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "gtin": {
      "type": "string",
      "description": "Always 14 digits"
    },
    "name": {
      "type": "string"
    },
    "brand": {
      "type": [
        "string",
        "null"
      ]
    },
    "digital_link": {
      "type": "string",
      "description": "The address printed on the pack"
    },
    "page_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The product page we host, when one is built"
    },
    "default_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Where an ordinary scan of the pack ends up, worked out the way the resolver works it out. Null means the code answers 404."
    },
    "links": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "link_type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "batch": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}