Issue EMD
Issue an Electronic Miscellaneous Document (EMD) for ancillary services associated with a flight booking. This endpoint is used to generate EMDs for services such as baggage, seats, or other add-ons.
Endpoint
- URL:
/api/v1/flight/issueEMD - 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>
Request
Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
| system | string | No | Booking system code |
| bookingCode | string | No | Booking code |
| bookerCode | string | No | DTC Addons |
| tourcode | string | No | DTC Addons |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| system | string | System name (e.g., VN, VJ, 1A) |
| status | boolean | Success status |
| error | object | Error code object (see ErrorCode) |
| description | string | Error description (if any) |
| trackingId | string | Tracking log ID |
| trackingTime | string | Tracking timestamp (ISO 8601) |
| tickets | array | List of issued tickets (see Ticket) |
BookingTicket Object
| Field | Type | Nullable | Description |
|---|---|---|---|
| index | integer | No | Sequence number |
| passengerId | string | Yes | Passenger ID |
| passengerType | string | Yes | Passenger type (ADT, CHD, INF) |
| surname | string | Yes | Passenger surname |
| givenName | string | Yes | Passenger given name |
| bookingCode | string | Yes | Booking code (PNR) |
| ticketNumber | string | Yes | Ticket number |
| ticketType | string | Yes | Ticket type (TKT - Flight, EMD - EMD) |
| ticketStatus | string | Yes | Ticket status (OPEN, VOID, USED, RFND, EXCH, TORFND) |
| serviceType | string | Yes | Service type (FLIGHT, BAGGAGE, SEAT, SSR) |
| serviceCode | string | Yes | Service code |
| issueDate | datetime | Yes | Issue date |
| ticketInfo | string | Yes | Full ticket information string |
| baseFare | number | No | Base fare |
| taxes | number | No | Total taxes |
| totalFare | number | No | Total fare |
| currency | string | Yes | Currency |
| taxDetails | array | Yes | Tax details (see TaxDetail) |
| couponInfos | array | Yes | Coupon info (see CouponInfo) |
| relatedNumber | string | Yes | Related ticket number |
| relatedType | string | Yes | Related type (EXCH, RFND, ORGN) |
| endorsement | string | Yes | Endorsement info |
| faceTicket | string | Yes | Face ticket string |
ErrorCode
| Field | Type | Description |
|---|---|---|
| id | integer | Error code ID |
| message | string | Error message |
Business Rules
- EMD can only be issued for eligible ancillary services.
- All required booking and passenger information must be provided.
- Duplicate or invalid booking codes will result in an error.
Example Request
{
"system": "VN",
"bookingCode": "ABC123",
"bookerCode": "BOOKER001",
"tourcode": "TOUR001"
}
Example Response
{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "track-003",
"trackingTime": "2024-07-01T13:00:00Z",
"tickets": [
{
"index": 1,
"passengerId": "PAX001",
"passengerType": "ADT",
"surname": "NGUYEN",
"givenName": "MINH",
"bookingCode": "ABC123",
"ticketNumber": "1234567890",
"ticketType": "EMD",
"ticketStatus": "OPEN",
"serviceType": "BAGGAGE",
"serviceCode": "BG15",
"issueDate": "2024-07-01T13:00:00",
"ticketInfo": "EMD 1234567890",
"baseFare": 500000,
"taxes": 0,
"totalFare": 500000,
"currency": "VND",
"taxDetails": [],
"couponInfos": [],
"relatedNumber": null,
"relatedType": null,
"endorsement": null,
"faceTicket": null
}
]
}
Error Codes
See Error Codes for details.
Validation Questions
- What types of services are eligible for EMD issuance?
- Are there restrictions on issuing multiple EMDs per booking?
- What happens if the booking is not eligible for EMD?
Compliance
- GDPR
- PCI-DSS
Traceability
- Requirement:
EMD-001,EMD-002