{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/noozra/json-schema/noozra-recall-schema.json",
  "title": "Recall",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/noozra-openapi.json#/components/schemas/Recall",
  "properties": {
    "agency": {
      "enum": [
        "CPSC",
        "FDA"
      ],
      "type": "string"
    },
    "category": {
      "enum": [
        "consumer",
        "food",
        "drug",
        "device"
      ],
      "type": "string"
    },
    "classification": {
      "description": "FDA's Class I, II or III.",
      "type": [
        "string",
        "null"
      ]
    },
    "codes": {
      "description": "Lot and code information (FDA).",
      "type": [
        "string",
        "null"
      ]
    },
    "date": {
      "description": "YYYY-MM-DD: the day the recall was announced (CPSC) or reported (FDA).",
      "format": "date",
      "type": "string"
    },
    "description": {
      "description": "The source's own text, at most 1000 characters.",
      "type": [
        "string",
        "null"
      ]
    },
    "distribution": {
      "description": "Where the product was sold or distributed.",
      "type": [
        "string",
        "null"
      ]
    },
    "event_id": {
      "description": "FDA's recall event, shared by the reports of one recall.",
      "type": [
        "string",
        "null"
      ]
    },
    "firm": {
      "description": "The recalling firm (FDA), or the manufacturers, importers and distributors (CPSC).",
      "type": [
        "string",
        "null"
      ]
    },
    "firm_country": {
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "initiated_date": {
      "format": "date",
      "type": [
        "string",
        "null"
      ]
    },
    "made_in": {
      "description": "Where the product was made (CPSC).",
      "type": [
        "string",
        "null"
      ]
    },
    "place": {
      "$ref": "#/$defs/Place"
    },
    "product": {
      "type": [
        "string",
        "null"
      ]
    },
    "quantity": {
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "description": "Why the product was recalled (CPSC: the hazard).",
      "type": [
        "string",
        "null"
      ]
    },
    "reference": {
      "description": "The record's own number at its source.",
      "type": "string"
    },
    "remedy": {
      "description": "What consumers should do (CPSC).",
      "type": [
        "string",
        "null"
      ]
    },
    "source": {
      "description": "Who published the record. Name it when you show the record.",
      "type": "string"
    },
    "status": {
      "type": [
        "string",
        "null"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "url": {
      "description": "The record at its source; for a city record without a page of its own, the city's dataset.",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "agency",
    "category",
    "classification",
    "codes",
    "date",
    "description",
    "distribution",
    "event_id",
    "firm",
    "firm_country",
    "id",
    "initiated_date",
    "made_in",
    "place",
    "product",
    "quantity",
    "reason",
    "reference",
    "remedy",
    "source",
    "status",
    "title",
    "url"
  ],
  "type": "object",
  "$defs": {
    "Place": {
      "properties": {
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "country": {
          "description": "ISO 3166-1 alpha-3, such as USA.",
          "type": [
            "string",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "state": {
          "description": "Two-letter state.",
          "type": [
            "string",
            "null"
          ]
        },
        "zip": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "address",
        "city",
        "state",
        "zip",
        "country",
        "latitude",
        "longitude"
      ],
      "type": "object"
    }
  }
}