Skip to main content

Sales Report

Generate sales reports for bookings and tickets within a specified date range. This endpoint provides comprehensive ticket information including fare breakdowns, passenger details, and ticket status.


Endpoint

  • URL: /api/v1/flight/salesreport
  • 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

FieldTypeRequiredDescription
systemstringNoBooking system code (e.g., VN, VJ, 1A)
fromDatestringNoStart date (ddMMyyyy format, e.g., 31122024)
toDatestringNoEnd date (ddMMyyyy format, e.g., 31122024)

Example Request:

{
"system": "VN",
"fromDate": "01012024",
"toDate": "31012024"
}

Request Constraints & Business Rules

  • Date range should not exceed 90 days to ensure optimal performance.
  • The fromDate must be earlier than or equal to toDate.
  • If no date range is provided, the system may default to current month.
  • Only authorized users can access sales report data.
  • Reports include all ticket types: issued, voided, refunded, and exchanged.

Response Structure

FieldTypeNullableDescription
systemstringYesSystem name (e.g., VN, VJ, 1A)
statusbooleanNotrue if successful, false if failed
errorobjectYesError details (if any)
descriptionstringYesError description (if any)
trackingIdstringYesTracking ID for request logs
trackingTimestringYesTime for request tracking (ISO 8601 format)
ticketsarrayYesList of ticket reports (see SalesReportTicket)

SalesReportTicket Object

FieldTypeNullableDescription
indexintegerNoTicket sequence number
bookingCodestringYesBooking code (PNR)
ticketNumberstringYesTicket number
ticketTypestringYesTicket status: OPEN, VOID, USED, RFND, EXCH
serviceTypestringYesService type: FLIGHT, BAGGAGE, SEAT, SSR
serviceCodestringYesService code
relatedNumberstringYesRelated ticket number
relatedTypestringYesRelation type: EXCH (exchange), RFND (refund), ORGN
issueDatestringYesIssue date (ddmmyyyy)
paxIndexstringYesPassenger index in booking
fullNamestringYesFull passenger name
givenNamestringYesGiven name
surnamestringYesSurname
paxTypestringYesPassenger type: ADT, CHD, INF
totalFarenumberNoTotal fare amount
baseFarenumberNoBase fare amount
taxesnumberNoTotal tax amount
currencystringYesCurrency code
startPointstringYesDeparture airport code
endPointstringYesArrival airport code
infostringYesAdditional information
taxDetailsarrayYesTax breakdown details
couponInfosarrayYesCoupon information list
endorsementstringYesEndorsement information
ticketImagestringYesTicket image/face

Example Response:

{
"system": "VN",
"status": true,
"error": null,
"description": null,
"trackingId": "abc-123",
"trackingTime": "2024-06-01T12:00:00Z",
"tickets": [
{
"index": 1,
"bookingCode": "ABC123",
"ticketNumber": "738-1234567890",
"ticketType": "OPEN",
"serviceType": "FLIGHT",
"serviceCode": "Y",
"relatedNumber": null,
"relatedType": "ORGN",
"issueDate": "01012024",
"paxIndex": "1",
"fullName": "NGUYEN VAN A",
"givenName": "VAN A",
"surname": "NGUYEN",
"paxType": "ADT",
"totalFare": 2350000,
"baseFare": 2000000,
"taxes": 350000,
"currency": "VND",
"startPoint": "SGN",
"endPoint": "HAN",
"info": "VN123 02JAN24",
"taxDetails": [],
"couponInfos": [],
"endorsement": "NON-REF",
"ticketImage": null
}
]
}

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.
  • Date ranges are validated to prevent excessive data retrieval.
  • All report generation actions are logged and traceable.

Validation Questions

  • What is the maximum date range allowed for reports?
  • Are there different access levels for different types of sales data?
  • How are voided and refunded tickets handled in the totals?
  • Can reports be filtered by specific airlines or booking sources?

For integration support, see Contact Support.