{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/qrflow-codes/json-schema/qrflow-codes-product-scans-schema.json",
  "title": "ProductScans",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/qrflow-codes-openapi.yml#/components/schemas/ProductScans",
  "type": "object",
  "properties": {
    "gtin": {
      "type": "string"
    },
    "days": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    },
    "went_nowhere": {
      "type": "integer",
      "description": "Scans that found no destination. Should be zero."
    },
    "by_country": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "scans": {
            "type": "integer"
          }
        }
      }
    },
    "by_device": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "scans": {
            "type": "integer"
          }
        }
      }
    },
    "by_link_type": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "scans": {
            "type": "integer"
          }
        }
      }
    },
    "by_batch": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "scans": {
            "type": "integer"
          }
        }
      }
    }
  }
}