{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-request-schema.json",
  "title": "Request",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-claim-status-api-api-openapi.yml#/components/schemas/Request",
  "type": "object",
  "properties": {
    "controlNumber": {
      "type": "string",
      "description": "Header, Segment: ST02 (no loop), Notes: Transaction Set Control Number",
      "maxLength": 9,
      "minLength": 9
    },
    "tradingPartnerName": {
      "type": "string",
      "description": "Loop: 2100A, Segment: NM1, Element: NM103, Notes: organizational name"
    },
    "tradingPartnerServiceId": {
      "type": "string",
      "description": "Loop: 2100A Segment: NM1, Element: NM109, Notes: we send this as MN108 as PI = Payer Identification",
      "maxLength": 80,
      "minLength": 2
    },
    "providers": {
      "type": "array",
      "description": "Loop: 2100B, Loop: 2100C",
      "items": {
        "$ref": "#/$defs/Provider"
      },
      "maxItems": 2147483647,
      "minItems": 1
    },
    "subscriber": {
      "$ref": "#/$defs/Subscriber",
      "description": "Loop: 2000D"
    },
    "dependent": {
      "$ref": "#/$defs/Member",
      "description": "Loop: 2000E"
    },
    "encounter": {
      "$ref": "#/$defs/Encounter",
      "description": "Loop: 2200D or 2200E"
    },
    "serviceLineInformation": {
      "$ref": "#/$defs/ServiceLineInformation",
      "description": "Loop: 2220D or 2220E"
    }
  },
  "required": [
    "controlNumber",
    "providers",
    "subscriber"
  ],
  "$defs": {
    "Encounter": {
      "type": "object",
      "properties": {
        "beginningDateOfService": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: DTP, Element: DTP03, Notes: Date Time Period - Start Date"
        },
        "endDateOfService": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: DTP, Element: DTP03, Notes: Date Time Period - End Date"
        },
        "trackingNumber": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: TRN, Element: TRN02, Notes: This is the claim status tracking number assigned to the status query for the claim.",
          "maxLength": 50,
          "minLength": 1
        },
        "tradingPartnerClaimNumber": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: This is the payer assigned claim number. descriptions goes in REF02 where REF01=1K",
          "maxLength": 50,
          "minLength": 1
        },
        "locationIdentifier": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: Required if application or location system identifier is known. descriptions goes in REF02 where REF01=LU",
          "maxLength": 50,
          "minLength": 1
        },
        "billingType": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: Billing type reference ID. Example: billing type for inpatient services is 111. descriptions goes in REF02 where REF01=BLT",
          "maxLength": 50,
          "minLength": 1
        },
        "patientAccountNumber": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: Patient account number provided by service provider. description goes in REF02 where REF01=EJ",
          "maxLength": 50,
          "minLength": 1
        },
        "pharmacyPrescriptionNumber": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: Patient pharmacy prescription number. description goes in REF02 where REF01=XZ",
          "maxLength": 50,
          "minLength": 1
        },
        "clearingHouseClaimNumber": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: REF, Element: REF02, Notes: Claim number provided by clearing house. description goes in REF02 where REF01=D9",
          "maxLength": 50,
          "minLength": 1
        },
        "submittedAmount": {
          "type": "string",
          "description": "Loop: 2200D or 2200E, Segment: AMT, Element: AMT02, Notes: Submitted total charges. description goes in AMT02 where AMT01=T3",
          "maxLength": 18,
          "minLength": 1
        }
      }
    },
    "Member": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "Loop: 2100E, Segment: NM1, Element: NM104, Notes: The dependent's first name as specified on their policy.",
          "maxLength": 35,
          "minLength": 1
        },
        "lastName": {
          "type": "string",
          "description": "Loop: 2100E, Segment: NM1, Element: NM103, Notes: The dependent's last name as specified on their policy.",
          "maxLength": 60,
          "minLength": 1
        },
        "gender": {
          "type": "string",
          "description": "Loop: 2000E, Segment: DMG, Element: DMG03, Notes: dependent's gender as specified on their policy.",
          "enum": [
            "M",
            "F",
            "U"
          ],
          "pattern": "F|M|U"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "Loop: 2000E, Segment: DMG, Element: DMG02, Notes: The birth date as specified on the policy for the dependent."
        },
        "groupNumber": {
          "type": "string",
          "description": "Loop: 2200E, Segment: REF, Element: REF02 when REF01=6P, Notes: The group number associated with the subscriber and dependent. Maps to dependent groupNumber.",
          "maxLength": 50,
          "minLength": 1
        }
      },
      "required": [
        "firstName",
        "lastName"
      ]
    },
    "Provider": {
      "type": "object",
      "properties": {
        "organizationName": {
          "type": "string",
          "description": "Segment: NM1, Element: NM103, Notes: Provider’s organization name. Can use organization or last name.",
          "maxLength": 60,
          "minLength": 1
        },
        "firstName": {
          "type": "string",
          "description": "Segment: NM1, Element: NM104, Notes: Maps to providerName",
          "maxLength": 35,
          "minLength": 1
        },
        "lastName": {
          "type": "string",
          "description": "Segment: NM1, Element: NM103, Notes: Provider last name. Can use organization or last name.",
          "maxLength": 60,
          "minLength": 1
        },
        "npi": {
          "type": "string",
          "description": "Loop: 2100B, 2100C, Segment: NM1, Element: NM109, Notes: National Provider Identification. Maps to provider NPI. NM108=XX",
          "maxLength": 80,
          "minLength": 2
        },
        "spn": {
          "type": "string",
          "description": "Loop: 2100B, 2100C, Segment: NM1, Element: NM109, Notes: Service Provider Number. Maps to provider SPN. NM108=SV",
          "maxLength": 80,
          "minLength": 2
        },
        "tin": {
          "type": "string",
          "description": "Loop: 2100B, 2100C, Segment: NM1, Element: NM109, Notes: Taxpayer’s Identification Number. Maps to provider TIN. NM108=FI",
          "maxLength": 80,
          "minLength": 2
        },
        "taxId": {
          "type": "string",
          "description": "Loop: 2100B, Segment: NM1, Element: NM109, Notes: Taxpayer’s Identification Number used when ProviderType = BillingProvider",
          "maxLength": 80,
          "minLength": 2
        },
        "etin": {
          "type": "string",
          "description": "Loop: 2100B, Segment: NM1, Element: NM109, Notes: Electronic transmitter identification Number (ETIN) used when ProviderType = BillingProvider",
          "maxLength": 80,
          "minLength": 2
        },
        "providerType": {
          "type": "string",
          "description": "Segment: NM1, Notes: Code for entity (Billing or Service) Billing Provider: Loop 2100B, NM101=41 (required), Service Provider: Loop 2100C, NM101=1P if not present it is added and assigned tin = BillingProvider taxId",
          "enum": [
            "BillingProvider",
            "ServiceProvider"
          ],
          "pattern": "BillingProvider|ServiceProvider"
        }
      },
      "required": [
        "providerType"
      ]
    },
    "ServiceLineInformation": {
      "type": "object",
      "properties": {
        "productOrServiceIDQualifier": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC01-1, Notes: Allowed Values are 'AD' American Dental Association Codes, 'ER' Jurisdiction Specific Procedure and Supply Codes, 'HC' Health Care Financing Administration Common Procedural Coding System (HCPCS) Codes, 'HP' Health Insurance Prospective Payment System (HIPPS) Skilled Nursing Facility Rate Code, 'IV' Home Infusion EDI Coalition (HIEC) Product/Service Code, 'N4' National Drug Code in 5-4-2 Format, 'NU' National Uniform Billing Committee (NUBC) UB92 Codes, 'WK' Advanced Billing Concepts (ABC) Codes",
          "enum": [
            "AD",
            "ER",
            "HC",
            "HP",
            "IV",
            "N4",
            "NU",
            "WK"
          ]
        },
        "procedureCode": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC01-2, Notes: Procedure Code maps to Product/ServiceID"
        },
        "procedureModifiers": {
          "type": "array",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC01-3 to SVC01-6, Notes:  Procedure Modifier",
          "items": {
            "type": "string"
          },
          "maxItems": 4,
          "minItems": 0
        },
        "lineItemChargeAmount": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC02, Notes: Maps to Monetary Amount, This amount is the original submitted charge."
        },
        "revenueCode": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC04, Notes: Identifying number for a product or service"
        },
        "unitsOfServiceCount": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: SVC, Element: SVC07, Notes: Maps to Quantity, Numeric value of quantity accepted"
        },
        "lineItemControlNumber": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: REF, Element: REF02 when REF01 = FJ, Notes: Maps to  Reference Identification"
        },
        "serviceLineDate": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: DTP, Element: DTP03, Notes: When sent with serviceLineEndDate it will be used as the start date for Date Time period, if sent without serviceLineEndDate will use DTP02 = D8"
        },
        "serviceLineEndDate": {
          "type": "string",
          "description": "Loop: 2210D, 2210E, Segment: DTP, Element: DTP03, Notes: DTP03 enddate and DTP02=RD8"
        }
      }
    },
    "Subscriber": {
      "type": "object",
      "properties": {
        "memberId": {
          "type": "string",
          "description": "Loop: 2100D, Segment: NM1, Element: NM109, Notes: The subscriber's insurance member ID. Maps to subscriberId.",
          "maxLength": 80,
          "minLength": 2
        },
        "firstName": {
          "type": "string",
          "description": "Loop: 2100D, Segment: NM1, Element: NM104, Notes: The subscriber's first name as specified on their policy",
          "maxLength": 35,
          "minLength": 1
        },
        "lastName": {
          "type": "string",
          "description": "Loop: 2100D, Segment: NM1, Element: NM103, Notes: The subscriber's last name as specified on their policy.",
          "maxLength": 60,
          "minLength": 1
        },
        "gender": {
          "type": "string",
          "description": "Loop: 2000D, 2000E, Segment: DMG, Element: DMG03, Notes: The subscriber's gender as specified on their policy.",
          "enum": [
            "M",
            "F",
            "U"
          ],
          "pattern": "F|M|U"
        },
        "dateOfBirth": {
          "type": "string",
          "description": "Loop: 2000D, Segment: DMG, Element: DMG02, Notes: The birth date as specified on the policy for the subscriber. Maps to BirthDate"
        },
        "groupNumber": {
          "type": "string",
          "description": "Loop: 2200D, Segment: REF, Element: REF01, Notes: The group number associated with the subscriber.",
          "maxLength": 50,
          "minLength": 1
        }
      },
      "required": [
        "firstName",
        "lastName",
        "memberId"
      ]
    }
  }
}