{
  "id": "RECALL-SEARCH",
  "title": "Search FDA recall events and affected products",
  "shortTitle": "Search recalls",
  "method": "GET",
  "path": "/v1/recalls/search",
  "queryPath": null,
  "group": "safety",
  "unsupportedFields": [],
  "availability": "preview",
  "request": {
    "additionalProperties": false,
    "properties": {
      "q": {
        "maxLength": 500,
        "minLength": 1,
        "type": "string",
        "title": "Q"
      },
      "classification": {
        "anyOf": [
          {
            "enum": [
              "Class I",
              "Class II",
              "Class III",
              "Not Yet Classified"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "Class I",
                "Class II",
                "Class III",
                "Not Yet Classified"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Classification"
      },
      "enforcement_status_as_published": {
        "anyOf": [
          {
            "enum": [
              "Completed",
              "Ongoing",
              "Pending",
              "Terminated"
            ],
            "type": "string"
          },
          {
            "items": {
              "enum": [
                "Completed",
                "Ongoing",
                "Pending",
                "Terminated"
              ],
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Enforcement Status As Published"
      },
      "recalling_firm": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Recalling Firm"
      },
      "initiated_from": {
        "type": "string",
        "title": "Initiated From"
      },
      "initiated_to": {
        "type": "string",
        "title": "Initiated To"
      },
      "report_from": {
        "type": "string",
        "title": "Report From"
      },
      "report_to": {
        "type": "string",
        "title": "Report To"
      },
      "ndc": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        ],
        "title": "Ndc"
      },
      "limit": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "title": "Limit",
        "type": "integer"
      },
      "cursor": {
        "type": "string",
        "title": "Cursor"
      }
    },
    "title": "RecallSearchRequest",
    "type": "object"
  },
  "response": {
    "$defs": {
      "PublicRecalledProductPreview": {
        "additionalProperties": false,
        "properties": {
          "recall_number": {
            "type": "string",
            "title": "Recall Number"
          },
          "product_description": {
            "type": "string",
            "title": "Product Description"
          },
          "product_description_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Product Description Truncated"
          },
          "classification": {
            "type": "string",
            "title": "Classification"
          },
          "enforcement_status_as_published": {
            "type": "string",
            "title": "Enforcement Status As Published"
          },
          "termination_date": {
            "type": "string",
            "title": "Termination Date"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "reason_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Reason Truncated"
          },
          "affected_ndcs": {
            "items": {
              "type": "string"
            },
            "title": "Affected Ndcs",
            "type": "array"
          }
        },
        "title": "PublicRecalledProductPreview",
        "type": "object"
      },
      "RecallCard": {
        "additionalProperties": false,
        "properties": {
          "recall_id": {
            "title": "Recall Id",
            "type": "string"
          },
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "recalling_firm": {
            "type": "string",
            "title": "Recalling Firm"
          },
          "classifications": {
            "items": {
              "type": "string"
            },
            "title": "Classifications",
            "type": "array"
          },
          "enforcement_status_as_published": {
            "type": "string",
            "title": "Enforcement Status As Published"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "report_date": {
            "type": "string",
            "title": "Report Date"
          },
          "initiated_date": {
            "type": "string",
            "title": "Initiated Date"
          },
          "recalled_product_count": {
            "minimum": 1,
            "title": "Recalled Product Count",
            "type": "integer"
          },
          "product_preview": {
            "items": {
              "$ref": "#/$defs/PublicRecalledProductPreview"
            },
            "title": "Product Preview",
            "type": "array"
          },
          "product_preview_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Product Preview Truncated"
          },
          "source_url": {
            "type": "string",
            "title": "Source Url"
          }
        },
        "required": [
          "recall_id",
          "recalled_product_count"
        ],
        "title": "RecallCard",
        "type": "object"
      }
    },
    "items": {
      "$ref": "#/$defs/RecallCard"
    },
    "type": "array"
  }
}
