What is a document?
High-level definition
A Document represents a travel document (typically an airline ticket) tracked by the platform. It’s the core record used to derive Quote (refund assessments) and to track refund requests. Documents contain identifiers, itinerary details, pricing elements, and operational status.
Key concepts
- Identity:
id
,ticketNum
, optionalparentTicketNum
andconjunctionTicketNum
. - Itinerary:
segments
,pnr
,airlineInfo
,iataCode
,flightType
. - Financials:
farePaid
,taxes
,paidTaxes
,charges
,commissionPercent
. - Policy data:
rules
(fare rules),penalties
, endorsements. - Lifecycle:
issueDate
,refundLimitDate
,status
,createdAt
,updatedAt
,canBeCanceled
,isReissue
. - Relations:
quote(...)
: the pricing/refundability assessment associated with the ticket.request
: the refund request record linked to this ticket (if any).reservation
: reservation details for deeper itinerary context.
Typical queries
Fetch a single document by ticket number or ID:
query GetDocument($ticketNum: String, $ticketId: Int) {
document(ticketNum: $ticketNum, ticketId: $ticketId) {
id
ticketNum
pnr
status
farePaid { currencyCode amount }
}
}
List documents with filters and pagination:
query Documents($filter: DocumentFilter, $limit: Int = 25, $offset: Int = 0) {
documents(filter: $filter, limit: $limit, offset: $offset) {
pageInfo { total hasNextPage perPage totalPages }
edges { cursor node { id ticketNum pnr status } }
}
}
Example filter variables:
{
"filter": {
"ticketNum_contains": "123",
"createdAt_gte": "2024-01-01T00:00:00Z"
}
}
Updated about 2 months ago
What’s Next
- See “What is a Quote?” to understand how refund amounts and eligibility are computed.
- See “What is a Request?” to understand how customer refund actions are tracked.