{
  "openapi": "3.1.0",
  "info": {
    "title": "CBP Carrier Pre-Departure Screening (PDS) API",
    "version": "1.4.0",
    "description": "Interactive sub-500ms REST/EDIFACT service for commercial air and sea carriers validating GCVWP and EVS-TAP travel authorization prior to boarding."
  },
  "servers": [
    { "url": "https://pds.cbp.dhs.gov/v1", "description": "Production PDS Gateway" },
    { "url": "https://pds-stg.cbp.dhs.gov/v1", "description": "Staging & Carrier Certification" }
  ],
  "paths": {
    "/traveler/verify-boarding": {
      "post": {
        "summary": "Check Passenger Boarding Authorization Status",
        "description": "Returns BOARD, NO_BOARD, or CONTACT_CARRIER_DESK within 500ms SLA.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["passportNumber", "issuingCountry", "carrierCode", "flightNumber", "departureDate"],
                "properties": {
                  "passportNumber": { "type": "string", "example": "PE10982344" },
                  "issuingCountry": { "type": "string", "example": "CHN" },
                  "carrierCode": { "type": "string", "example": "UA" },
                  "flightNumber": { "type": "string", "example": "UA-182" },
                  "pnrLocator": { "type": "string", "example": "K7W9LM" },
                  "assignedSeat": { "type": "string", "example": "14B" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Boarding directive issued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "boardingDirective": { "type": "string", "enum": ["BOARD", "NO_BOARD", "CONTACT_CARRIER_DESK"] },
                    "authorizationId": { "type": "string", "example": "EVS-2026-89104" },
                    "authorizationStatus": { "type": "string", "example": "ACTIVE_APPROVED" },
                    "responseLatencyMs": { "type": "integer", "example": 142 },
                    "offlineVerificationHash": { "type": "string", "description": "Cryptographic ECDSA signature for offline cached verification." }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
