Skip Navigation

Get Booking - Examples

Request

The Get Booking endpoint for accessing the RPC/JSON version is:

POST /v1/trip/orders/getBooking HTTP/1.1

The call to Get Booking via RPC/JSON must contain at least one value: confirmationId.

This will return a response with all data related to confirmationId. You can also filter the response using returnOnly, which is provided as an array of values. Refer to the Reference tab for a full list of accepted enumerators.

JSON Examples

Basic non-filtered request example:

{
    "confirmationId": "XXXX"
}

Example with simple filter:

{
    "confirmationId": "XXXX",
    "returnOnly":[
        "TRAVELERS"
    ]
}

Example with advanced filters (all possible filters to use):

{
    "confirmationId": "XXXX",
    "surname": "Smith",
    "returnOnly": [
            "FLIGHTS",
            "FLIGHT_PENALTY",
            "BAGGAGE_POLICY",
            "JOURNEYS",
            "HOTELS",
            "HOTEL_ADDRESS",
            "CARS",
            "CAR_RENTAL_ADDRESS",
            "CAR_RENTAL_PENALTY",
            "TRAINS",
            "CRUISES",
            "ALL_SEGMENTS",
            "TRAVELERS",
            "TICKETS",
            "PAYMENTS",
            "PENALTIES",
            "REMARKS",
            "IS_CANCELABLE",
            "IS_TICKETED",
            "CONTACT_INFO",
            "OTHER_SERVICES",
            "SPECIAL_SERVICES",
            "FARES",
            "CREATION_DETAILS",
            "ANCILLARIES",
            "FORMS_OF_PAYMENT",
            "RETENTION_DATE"
    ]
}

Example with refunded conjunctive tickets - request:

{
    "confirmationId": "XXXX",
    "returnOnly":[
        "TICKETS"
    ]
}

Example with refunded conjunctive tickets - response:

{
    "flightTickets": [
        {
            "number": "1609786952746",
            "date": "2023-03-20",
            "travelerIndex": 1,
            "flightCoupons": [
                {
                    "itemId": "7",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "8",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "9",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "10",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                }
            ],
            "payment": {
                "subtotal": "6626.00",
                "taxes": "2212.74",
                "total": "8838.74",
                "currencyCode": "PLN"
            },
            "ticketStatusName": "Refunded/Exchanged",
            "ticketStatusCode": "TR",
            "ticketingPcc": "U9PK"
        },
        {
            "number": "1609786952746/47",
            "date": "2023-03-20",
            "travelerIndex": 1,
            "flightCoupons": [
                {
                    "itemId": "7",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "8",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "9",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                },
                {
                    "itemId": "10",
                    "couponStatus": "Refunded",
                    "couponStatusCode": "RF"
                }
            ],
            "payment": {
                "subtotal": "6626.00",
                "taxes": "2212.74",
                "total": "8838.74",
                "currencyCode": "PLN"
            },
            "ticketStatusName": "Issued",
            "ticketStatusCode": "TE",
            "ticketingPcc": "XXXX"
        }
    ],
    "timestamp": "2023-03-20T12:37:51",
    "bookingSignature": "c137df6aadc891d725bbb6e23fa6bd41320de26e608815464563251da60024ef95befae6859415a555b4564f3812e871b7bd734ac40fe81e59345345e13558e35f4",
    "request": {
        "confirmationId": "XXXXXX",
        "returnOnly": [
            "TICKETS"
        ]
    }
}

Note: In general, GetBooking takes the latest ticket status into consideration and limits the number of ticket entries in the response. However, since the refund operation for conjunctive tickets generates a TR item (stored in the booking) with just the primary document, both the TR item ("number": "1609786952746") and the original TE item ("number": "1609786952746/47") are returned in the response.

GraphQL Examples (set for retirement)

Another way of calling the API is to use GraphQL. To use it, provide the full details of the query to be executed. The Get Booking endpoint for accessing the GraphQL version is:

POST /v1/trip/orders/getBooking/graphql HTTP/1.1

GraphQL request example for applying a customized view of the reservation:

{
    getBooking(id: "XXXX", surname: "Smith") {
        isCancelable
        endDate
        isTicketed
        cars {
            confirmationId
        }
    }
}

Note: Refer to Get Booking - GraphQL for additional details on GraphQL implementation and to access the required GraphQL schema file.