{
  "id": "MARKETED-PRODUCT-SEARCH",
  "title": "Search US products",
  "shortTitle": "Search products",
  "method": "GET",
  "path": "/v1/marketed-products/search",
  "queryPath": null,
  "group": "drugs",
  "unsupportedFields": [],
  "availability": "preview",
  "request": {
    "additionalProperties": false,
    "properties": {
      "q": {
        "maxLength": 500,
        "minLength": 1,
        "type": "string",
        "title": "Q"
      },
      "match_mode": {
        "default": "auto",
        "enum": [
          "auto",
          "exact",
          "prefix"
        ],
        "title": "Match Mode",
        "type": "string"
      },
      "drug_rxcui": {
        "anyOf": [
          {
            "pattern": "^[1-9][0-9]{0,15}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^[1-9][0-9]{0,15}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Drug Rxcui"
      },
      "drug_group": {
        "anyOf": [
          {
            "pattern": "^fg_[0-9a-f]{32}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^fg_[0-9a-f]{32}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Drug Group"
      },
      "contains_substance": {
        "anyOf": [
          {
            "pattern": "^[0-9A-Z]{10}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^[0-9A-Z]{10}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Contains Substance"
      },
      "dosage_form": {
        "anyOf": [
          {
            "pattern": "^C[0-9]{1,8}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^C[0-9]{1,8}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Dosage Form"
      },
      "route": {
        "anyOf": [
          {
            "pattern": "^C[0-9]{1,8}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^C[0-9]{1,8}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Route"
      },
      "labeler": {
        "anyOf": [
          {
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          },
          {
            "items": {
              "maxLength": 300,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Labeler"
      },
      "labeler_code": {
        "anyOf": [
          {
            "pattern": "^[0-9]{4,5}$",
            "type": "string"
          },
          {
            "items": {
              "pattern": "^[0-9]{4,5}$",
              "type": "string"
            },
            "maxItems": 20,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Labeler Code"
      },
      "brand_generic": {
        "enum": [
          "brand",
          "generic"
        ],
        "type": "string",
        "title": "Brand Generic"
      },
      "hide_repackagers": {
        "default": false,
        "title": "Hide Repackagers",
        "type": "boolean"
      },
      "listing_status": {
        "default": "current",
        "enum": [
          "active_listing",
          "all",
          "current"
        ],
        "title": "Listing Status",
        "type": "string"
      },
      "limit": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "title": "Limit",
        "type": "integer"
      },
      "cursor": {
        "type": "string",
        "title": "Cursor"
      }
    },
    "title": "ProductSearchRequest",
    "type": "object"
  },
  "response": {
    "$defs": {
      "CodedName": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "code": {
            "type": "string",
            "title": "Code"
          }
        },
        "title": "CodedName",
        "type": "object"
      },
      "MatchedName": {
        "additionalProperties": false,
        "properties": {
          "field": {
            "enum": [
              "generic_name",
              "ingredient_name",
              "product_name"
            ],
            "title": "Field",
            "type": "string"
          },
          "whole": {
            "title": "Whole",
            "type": "boolean"
          },
          "text": {
            "title": "Text",
            "type": "string"
          }
        },
        "required": [
          "field",
          "text",
          "whole"
        ],
        "title": "MatchedName",
        "type": "object"
      },
      "ProductIngredient": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "unii": {
            "type": "string",
            "title": "Unii"
          },
          "role": {
            "enum": [
              "active",
              "inactive",
              "other"
            ],
            "title": "Role",
            "type": "string"
          },
          "strength": {
            "$ref": "#/$defs/Strength"
          },
          "strength_basis": {
            "enum": [
              "active_ingredient",
              "active_moiety",
              "reference_substance"
            ],
            "type": "string",
            "title": "Strength Basis"
          }
        },
        "required": [
          "role"
        ],
        "title": "ProductIngredient",
        "type": "object"
      },
      "ProductSearchHit": {
        "additionalProperties": false,
        "properties": {
          "product_ndc": {
            "title": "Product Ndc",
            "type": "string"
          },
          "product_name": {
            "title": "Product Name",
            "type": "string"
          },
          "generic_name": {
            "type": "string",
            "title": "Generic Name"
          },
          "brand_generic": {
            "enum": [
              "brand",
              "generic"
            ],
            "type": "string",
            "title": "Brand Generic"
          },
          "labeler": {
            "type": "string",
            "title": "Labeler"
          },
          "dosage_form": {
            "$ref": "#/$defs/CodedName"
          },
          "routes": {
            "items": {
              "$ref": "#/$defs/CodedName"
            },
            "title": "Routes",
            "type": "array"
          },
          "strengths": {
            "items": {
              "$ref": "#/$defs/ProductIngredient"
            },
            "title": "Strengths",
            "type": "array"
          },
          "legal_status": {
            "enum": [
              "otc",
              "prescription"
            ],
            "type": "string",
            "title": "Legal Status"
          },
          "product_type": {
            "enum": [
              "allergenic",
              "cellular_therapy",
              "plasma_derivative",
              "vaccine"
            ],
            "type": "string",
            "title": "Product Type"
          },
          "dea_schedule": {
            "enum": [
              "CI",
              "CII",
              "CIII",
              "CIV",
              "CV"
            ],
            "type": "string",
            "title": "Dea Schedule"
          },
          "repackaged": {
            "type": "boolean",
            "title": "Repackaged"
          },
          "listing_status": {
            "enum": [
              "active_listing",
              "ended",
              "future",
              "not_fda_listed",
              "unknown"
            ],
            "title": "Listing Status",
            "type": "string"
          },
          "shortage_import": {
            "const": true,
            "type": "boolean",
            "title": "Shortage Import"
          },
          "set_ids": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "title": "Set Ids",
            "type": "array"
          },
          "matched_name": {
            "$ref": "#/$defs/MatchedName"
          }
        },
        "required": [
          "listing_status",
          "product_name",
          "product_ndc",
          "routes",
          "set_ids",
          "strengths"
        ],
        "title": "ProductSearchHit",
        "type": "object"
      },
      "Strength": {
        "additionalProperties": false,
        "properties": {
          "value": {
            "title": "Value",
            "type": "string"
          },
          "unit": {
            "type": "string",
            "title": "Unit"
          },
          "denominator_value": {
            "type": "string",
            "title": "Denominator Value"
          },
          "denominator_unit": {
            "type": "string",
            "title": "Denominator Unit"
          }
        },
        "required": [
          "value"
        ],
        "title": "Strength",
        "type": "object"
      }
    },
    "items": {
      "$ref": "#/$defs/ProductSearchHit"
    },
    "type": "array"
  }
}
