Delete Document
Delete one or more identity documents from a booking.
Endpoint
- URL:
/api/v1/flight/deletedocument - Method:
POST - Auth Required: Yes (Bearer Token/X-API-KEY)
- Content-Type:
application/json
Authentication
This endpoint requires a valid JWT Bearer token in the Authorization header:
Authorization: Bearer <access_token>
Obtain tokens via /api/v1/sign-in (POST) with your credentials.
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code |
| bookingCode | string | No | Booking code (PNR) |
| documents | array | No | List of document IDs/numbers to delete |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"documents": ["C1234567"]
}
Request Constraints & Business Rules
- Only bookings that exist and are eligible for update can have documents deleted.
- The
bookingCodemust match an existing booking. - The
documentsarray must reference valid document IDs/numbers for the booking. - All changes are auditable via
trackingIdandtrackingTime.
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ) |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error code object |
| description | string | Yes | Error message or status description |
| trackingId | string | Yes | Request tracking ID |
| trackingTime | string | Yes | Request tracking timestamp |
Example Response:
{
"system": "VN",
"status": true,
"description": "Document deleted successfully",
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z"
}
Error Codes
See Error Codes for details on possible error responses.
Security & Validation
- All input is validated for type and required fields.
- Only authenticated users can access this endpoint.
- All actions are logged and traceable.
Validation Questions
- What are the allowed document types and formats for deletion?
- Are there restrictions on deleting documents for certain passenger types?
- What happens if the booking or document does not exist or is not eligible for update?
For integration support, see Contact Support.