{
  "id": "LABEL-LOOKUP",
  "title": "Retrieve a current label and its sections",
  "shortTitle": "Retrieve a label",
  "method": "GET",
  "path": "/v1/labels/{set_id}",
  "queryPath": "/v1/labels/lookup",
  "group": "labels",
  "unsupportedFields": [],
  "availability": "preview",
  "request": {
    "additionalProperties": false,
    "properties": {
      "set_id": {
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
        "type": "string",
        "title": "Set Id"
      },
      "ndc": {
        "maxLength": 100,
        "minLength": 1,
        "type": "string",
        "title": "Ndc"
      },
      "section": {
        "anyOf": [
          {
            "maxLength": 300,
            "minLength": 1,
            "type": "string"
          },
          {
            "items": {
              "maxLength": 300,
              "minLength": 1,
              "type": "string"
            },
            "maxItems": 100,
            "minItems": 1,
            "type": "array"
          }
        ],
        "title": "Section"
      }
    },
    "title": "LabelLookupRequest",
    "type": "object"
  },
  "response": {
    "$defs": {
      "LabelProduct": {
        "additionalProperties": false,
        "properties": {
          "product_ndc": {
            "title": "Product Ndc",
            "type": "string"
          },
          "product_name": {
            "title": "Product Name",
            "type": "string"
          }
        },
        "required": [
          "product_name",
          "product_ndc"
        ],
        "title": "LabelProduct",
        "type": "object"
      },
      "LabelSection": {
        "additionalProperties": false,
        "properties": {
          "section_key": {
            "title": "Section Key",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "loinc_code": {
            "pattern": "^[0-9]{1,7}-[0-9]$",
            "type": "string",
            "title": "Loinc Code"
          },
          "text_length": {
            "minimum": 1,
            "title": "Text Length",
            "type": "integer"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "text_fidelity": {
            "const": "normalized_fallback",
            "type": "string",
            "title": "Text Fidelity"
          }
        },
        "required": [
          "section_key",
          "text_length",
          "title"
        ],
        "title": "LabelSection",
        "type": "object"
      }
    },
    "additionalProperties": false,
    "properties": {
      "set_id": {
        "title": "Set Id",
        "type": "string"
      },
      "version": {
        "maximum": 9999999999,
        "minimum": 1,
        "title": "Version",
        "type": "integer"
      },
      "document_id": {
        "type": "string",
        "title": "Document Id"
      },
      "title": {
        "title": "Title",
        "type": "string"
      },
      "document_type": {
        "enum": [
          "allergenic",
          "cellular_therapy",
          "otc",
          "plasma_derivative",
          "prescription",
          "vaccine"
        ],
        "type": "string",
        "title": "Document Type"
      },
      "effective_date": {
        "format": "date",
        "type": "string",
        "title": "Effective Date"
      },
      "published_date": {
        "format": "date",
        "type": "string",
        "title": "Published Date"
      },
      "labeler": {
        "type": "string",
        "title": "Labeler"
      },
      "repackaged": {
        "type": "boolean",
        "title": "Repackaged"
      },
      "boxed_warning": {
        "title": "Boxed Warning",
        "type": "boolean"
      },
      "dailymed_url": {
        "title": "Dailymed Url",
        "type": "string"
      },
      "products": {
        "items": {
          "$ref": "#/$defs/LabelProduct"
        },
        "title": "Products",
        "type": "array"
      },
      "product_count": {
        "minimum": 0,
        "title": "Product Count",
        "type": "integer"
      },
      "sections": {
        "items": {
          "$ref": "#/$defs/LabelSection"
        },
        "title": "Sections",
        "type": "array"
      },
      "absent_sections": {
        "items": {
          "type": "string"
        },
        "type": "array",
        "title": "Absent Sections"
      }
    },
    "required": [
      "boxed_warning",
      "dailymed_url",
      "product_count",
      "products",
      "sections",
      "set_id",
      "title",
      "version"
    ],
    "title": "Label",
    "type": "object"
  }
}
