{
  "id": "INVENTORY-CHECK",
  "title": "Check a batch of NDCs or barcodes for recalls and shortages",
  "shortTitle": "Check inventory",
  "method": "POST",
  "path": "/v1/inventory/check",
  "queryPath": null,
  "group": "safety",
  "unsupportedFields": [],
  "availability": "preview",
  "request": {
    "$defs": {
      "InventoryItemInput": {
        "additionalProperties": false,
        "properties": {
          "ndc": {
            "title": "Ndc",
            "type": "string"
          },
          "lot": {
            "maxLength": 64,
            "type": "string",
            "title": "Lot"
          },
          "expiry": {
            "type": "string",
            "title": "Expiry"
          }
        },
        "required": [
          "ndc"
        ],
        "title": "InventoryItemInput",
        "type": "object"
      }
    },
    "additionalProperties": false,
    "properties": {
      "items": {
        "items": {
          "$ref": "#/$defs/InventoryItemInput"
        },
        "maxItems": 100,
        "minItems": 1,
        "title": "Items",
        "type": "array"
      },
      "include": {
        "items": {
          "const": "reason",
          "type": "string"
        },
        "title": "Include",
        "type": "array"
      }
    },
    "required": [
      "items"
    ],
    "title": "InventoryCheckRequest",
    "type": "object"
  },
  "response": {
    "$defs": {
      "InventoryItem": {
        "additionalProperties": false,
        "properties": {
          "ndc": {
            "title": "Ndc",
            "type": "string"
          },
          "lot": {
            "type": "string",
            "title": "Lot"
          },
          "lot_source": {
            "enum": [
              "request",
              "scan"
            ],
            "type": "string",
            "title": "Lot Source"
          },
          "expiry": {
            "type": "string",
            "title": "Expiry"
          },
          "expiry_source": {
            "enum": [
              "request",
              "scan"
            ],
            "type": "string",
            "title": "Expiry Source"
          },
          "normalization_status": {
            "enum": [
              "ambiguous",
              "invalid",
              "normalized",
              "source_representation_only",
              "unchanged"
            ],
            "title": "Normalization Status",
            "type": "string"
          },
          "normalized_ndcs": {
            "items": {
              "type": "string"
            },
            "title": "Normalized Ndcs",
            "type": "array"
          },
          "recalls": {
            "items": {
              "$ref": "#/$defs/InventoryRecall"
            },
            "type": "array",
            "title": "Recalls"
          },
          "recalls_more": {
            "const": true,
            "type": "boolean",
            "title": "Recalls More"
          },
          "shortages": {
            "items": {
              "$ref": "#/$defs/InventoryShortage"
            },
            "type": "array",
            "title": "Shortages"
          },
          "shortages_more": {
            "const": true,
            "type": "boolean",
            "title": "Shortages More"
          }
        },
        "required": [
          "ndc",
          "normalization_status"
        ],
        "title": "InventoryItem",
        "type": "object"
      },
      "InventoryRecall": {
        "additionalProperties": false,
        "properties": {
          "recall_id": {
            "title": "Recall Id",
            "type": "string"
          },
          "recall_number": {
            "type": "string",
            "title": "Recall Number"
          },
          "classification": {
            "type": "string",
            "title": "Classification"
          },
          "enforcement_status_as_published": {
            "type": "string",
            "title": "Enforcement Status As Published"
          },
          "report_date": {
            "type": "string",
            "title": "Report Date"
          },
          "termination_date": {
            "type": "string",
            "title": "Termination Date"
          },
          "match_level": {
            "enum": [
              "package",
              "product"
            ],
            "title": "Match Level",
            "type": "string"
          },
          "matched_ndcs": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Matched Ndcs",
            "type": "array"
          },
          "product_description": {
            "type": "string",
            "title": "Product Description"
          },
          "product_description_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Product Description Truncated"
          },
          "code_information": {
            "type": "string",
            "title": "Code Information"
          },
          "code_information_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Code Information Truncated"
          },
          "lot_match": {
            "enum": [
              "all_lots",
              "indeterminate",
              "matched",
              "not_found"
            ],
            "type": "string",
            "title": "Lot Match"
          },
          "expiry_match": {
            "enum": [
              "in_window",
              "no_window",
              "not_evaluated",
              "outside_window"
            ],
            "type": "string",
            "title": "Expiry Match"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "reason_truncated": {
            "const": true,
            "type": "boolean",
            "title": "Reason Truncated"
          }
        },
        "required": [
          "match_level",
          "matched_ndcs",
          "recall_id"
        ],
        "title": "InventoryRecall",
        "type": "object"
      },
      "InventoryShortage": {
        "additionalProperties": false,
        "properties": {
          "shortage_id": {
            "title": "Shortage Id",
            "type": "string"
          },
          "package_ndc": {
            "type": "string",
            "title": "Package Ndc"
          },
          "generic_name": {
            "type": "string",
            "title": "Generic Name"
          },
          "company": {
            "type": "string",
            "title": "Company"
          },
          "national_shortage_status": {
            "title": "National Shortage Status",
            "type": "string"
          },
          "manufacturer_availability_text": {
            "type": "string",
            "title": "Manufacturer Availability Text"
          },
          "first_posted_date": {
            "type": "string",
            "title": "First Posted Date"
          },
          "updated_date": {
            "type": "string",
            "title": "Updated Date"
          },
          "match_level": {
            "enum": [
              "package",
              "product"
            ],
            "title": "Match Level",
            "type": "string"
          }
        },
        "required": [
          "match_level",
          "national_shortage_status",
          "shortage_id"
        ],
        "title": "InventoryShortage",
        "type": "object"
      }
    },
    "items": {
      "$ref": "#/$defs/InventoryItem"
    },
    "type": "array"
  }
}
