Send Email
Send booking confirmation and travel details via email to passengers. This endpoint handles automated email delivery of booking information, tickets, and travel documents.
Endpoint
- URL:
/api/v1/flight/sendemail - 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 (e.g., VN, VJ, 1A) |
| bookingCode | string | No | Booking code (PNR) |
| string | No | Recipient email address | |
| paymentDisplayType | string | No | Payment display type (S: Summary, D: Detail, F: No financial |
) |
Example Request:
{
"system": "VN",
"bookingCode": "ABC123",
"email": "passenger@example.com"
}
Request Constraints & Business Rules
- The booking must exist and be in a valid state.
- Email address must be valid and properly formatted.
- Email content is automatically generated based on booking details.
- Some airlines may have restrictions on email frequency per booking.
- Email templates are predefined and cannot be customized through this endpoint.
- Booking status affects the type of email content sent (confirmed, pending, etc.).
Response Structure
| Field | Type | Nullable | Description |
|---|---|---|---|
| system | string | Yes | System name (e.g., VN, VJ, 1A) |
| status | boolean | No | true if successful, false if failed |
| error | object | Yes | Error details (if any) |
| description | string | Yes | Error description (if any) |
| trackingId | string | Yes | Tracking ID for request logs |
| trackingTime | string | Yes | Time for request tracking (ISO 8601 format) |
Error Object
| Field | Type | Nullable | Description |
|---|---|---|---|
| id | integer | No | Error code ID |
| message | string | Yes | Error message |
Example Response:
{
"system": "VN",
"status": true,
"error": null,
"description": null,
"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.
- Email addresses are validated for proper format.
- Booking codes are verified against existing bookings.
- All email sending actions are logged and traceable.
- Personal data handling complies with privacy regulations.
Validation Questions
- What types of email templates are available for different booking statuses?
- Are there limitations on how many emails can be sent per booking?
- How are email delivery failures handled and reported?
- Can custom email content or templates be specified?
For integration support, see Contact Support.