Skip Navigation

 

Stay Connected and Keep Current

 

Keeping you informed with the latest and greatest.

 

 

six rows of people seated on a plane with an aisle down the middle

A Deep Dive into E2E NDC Reservation Management with the Booking Management API

API
Booking Management API

Lukasz Kuczynski | September 2021

Authored by: Pawel Dobrzanski, Malgorzata Slota, Lukasz Kuczynski, Mateusz Gawron, Heiner Preiss, Tomasz Drag, Krzysztof Sikora, Alexandre Meneghello, Ken Tabor, and Martyna Piskorz-Marciniak.

Why use it?

When IATA launched the NDC (New Distribution Capability) program, NDC-focused APIs started to be developed. To book and interact with NDC content, customers must be able to integrate this new type of services on top of traditional ones. As a consequence, the need to manage different kinds of services, switch between them in various scenarios, as well as to handle numerous errors resulted in additional costs and increased complexity for customers. The Booking Management API offers the opportunity to minimize integration efforts of NDC-based APIs while making it possible to continue using traditional booking services at the same time.

The Booking Management API allows you to manage your Sabre reservations and bookings in an efficient way. It provides a set of normalized services that process both traditional content (Sabre Passenger Name Records, or PNRs) and NDC content (Sabre Orders). Furthermore, there is no need to build your own API call orchestrations – Booking Management takes care of that for you.

With the Booking Management API, execution of all typical booking operations is made easy. It allows users to quickly create, read, or cancel reservations, and makes it possible to access ticket information, e.g., check the status or perform operations such as void or refund. Additionally, if you use Sabre Profiles, you may not have been able to effortlessly leverage the Profiles capabilities within NDC booking workflows. The good news is Booking Management can help you fix that issue as well – the API may be used to book traditional and NDC content for Sabre Profiles! Moreover, Booking Management is exposed in the RPC/JSON format, which means no more complex, troublesome to read XMLs. We prioritize designing simple, user-friendly requests that you can build intuitively. And regardless of the nature of the content you are managing, whether NDC or traditional, we provide normalized human-readable responses.

All the Booking Management services are based on the same API model, which ensures that no additional operations are required. No matter what service you wish to call, if you aim to create a reservation, get a complete set of data from your travel segments, and then delete them all, you may use the same model to save time and simplify integration efforts.

The Booking Management API gives you:

  • A set of normalized services that manage both traditional and NDC content.
  • The possibility to utilize Sabre Profiles or to add traveler data directly to a request.
  • A seamless integration process thanks to the RPC/JSON format.
  • User-friendly error handling with descriptive and meaningful error messages.

How does it work?

The diagram below gives a high-level overview of how Booking Management architecture fits into the overall Sabre platform. The API consists of three services (Create, Cancel, and Get Booking), which are available to agency systems, online travel agencies, as well as third-party developers through an inbound gateway. On the internal side, a separate gateway makes it possible to access information from many different sources: the Services Platform, TicketingT2, Order Management System, TPFC, Open Reservation Services, Sabre Web Services, and Profile Systems.

BMAPI Sabre platform

The Booking Management API currently comprises seven endpoints:

  • /createBooking
  • /getBooking
  • /cancelBooking
  • /modifyBooking
  • /checkFlightTickets
  • /voidFlightTickets
  • /refundFlightTickets

The first three endpoints listed above allow you to create a traditional or NDC booking, view your reservation, and cancel it. The four last endpoints currently work for ATPCO bookings only because of downline service limitations. In this article, we will guide you through createBooking, getBooking, and cancelBooking, with a special emphasis on bookings in the NDC context.

All endpoints are orchestrated services designed to simplify customer workflows. This is achieved by performing internal calls to other Sabre services and creating a consolidated, normalized response. The official Booking Management API documentation can be found on the dedicated Dev Studio page.

Integrate the model into your application

Integrate once, run anywhere! All Booking Management services use the same API model. The newest releases we expose to our users are available in Sabre Dev Studio under the Reference documentation tab.

bmapi dev studio

The API model needs to be imported into your application using the swagger codegen plugin. This is as easy as adding a single entry inside the build->plugins section of your POM.

An example of the simplest integration can be found below. Should you require any additional features, feel free read more on the swagger codegen plugin GitHub page and customize to suit your needs.

API model integration with swagger codegen plugin

<plugin>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-codegen-maven-plugin</artifactId>
    <version>2.3.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <inputSpec>${project.basedir}/src/main/resources/client.yaml</inputSpec>
                <language>java</language>
                <configOptions>
                   <sourceFolder>src/gen/java/main</sourceFolder>
                </configOptions>
            </configuration>
        </execution>
    </executions>
</plugin>

Start with an authentication token

You must provide an authentication token to all endpoints within the Booking Management API. Tokens can be generated in two ways:

  • Using the Create Access Token API for scenarios with a stateless token (ATK). Once you obtain a successful response from the API (TokenCreateRS), locate the BinarySecurityToken element, which contains an ATK token.
  • Using the Create Session service for scenarios with a stateful token (ATH). The response from this session generation service (SessionCreateRS) also contains the BinarySecurityToken element with an authorization token.
Example response with ATK token (TokenCreateRS)
<SOAP-ENV:Envelope>
      ...
      <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary">T1RLAQKv...UhrH6gQg**</wsse:BinarySecurityToken>
      ...
  </SOAP-ENV:Envelope>
Example response with ATH token (SessionCreateRS)
<SOAP-ENV:Envelope>
      ...
      <wsse:BinarySecurityToken valueType="String" EncodingType="wsse:Base64Binary"> Shared/IDL:IceSess...!380374!0</wsse:BinarySecurityToken>
      ...
  </SOAP-ENV:Envelope>
Authorization setup template

Authorization: Bearer <BinarySecurityToken>

Once the token has been generated, its value should be added in the bearer authorization header of your request to the Booking Management API.

Authorization setup with ATK token

Authorization: Bearer T1RLAQKv...UhrH6gQg**

For the example ATK token value shown earlier, the corresponding authorization header is presented above.

Authorization setup with ATH token

Authorization: Bearer Shared/IDL:IceSess...!380374!0

In case the ATH token is used, the authorization setup is shown in the example above.

Let’s practice!

Before we start our journey through the Booking Management API, we would like to encourage you to take a deep dive on your own first. We prepared a Postman collection of sample requests to all the endpoints that you can test out yourself.

postman collection

The collection is divided into five folders. Go ahead and try calling one request from each folder. For the create and cancel services we provided more than one sample, but please remember that each each of them requires you to go through the same process:

  1. Authorization: Create Access Token v2 or Create Session v2
  2. Bargain Finder Max v4
  3. Offers Price v1
  4. createBooking v1
  5. getBooking v1
  6. cancelBooking v1

Since some of these services are available in multiple versions, the proper versions to use are provided above and linked directly. Feel free to download the collection and take your Sabre experience to the next level. The link is also provided in the Resources section at the bottom of this article.

createBooking

createBooking creates an air booking for different content sources (NDC, ATPCO, CSL, LCC) in a single API call.

To create an NDC booking, you must prepare a valid data set returned by Bargain Finder Max v4 and price it using the Offer Price API (offerPriceResponseData). The set should include:

  • price_offer_id (from offerPriceResponseData.response.offers[].id),

  • price_offer_item_id (from offerPriceResponseData.response.offers[].offerItems[].id),

  • price_passenger_id (from offerPriceResponseData. response.offers[].offerItems[].passengers[].id).

Examples of JSON body requests are provided below. Each example matches a distinct NDC booking creation scenario.

NDC booking for single traveler

{
    "flightOffer":{
        "offerId":"{{price_offer_id}}",
        "selectedOfferItems":[
            "{{price_offer_item_id}}"
        ]
    },
    "travelers":[
        {
            "id":"{{price_passenger_id}}",
             "givenName":"John",
             "surname":"Kowalski",
            "birthDate":"1970-01-23"
        }
    ],
    "contactInfo":
    {
      "emails":[
        "travel@sabre.com"
      ],
      "phones":[
        "123456"
      ]
    }
}

Please remember to create your own profile before initiating the call. In the section titled "Extras - Create Profile" of the Postman collection we added a service flow which can help you with that.

extras postman

NDC booking using Sabre Profiles data by providing profile name

{
    "flightOffer": {
        "offerId": "{{price_offer_id}}",
        "selectedOfferItems": [
            "{{price_offer_item_id}}"
        ]
    },
    "profiles": [
        {
            "profileName": "{{profileName}}",
            "profileTypeCode": "TVL",
            "domainId": "{{pcc}}"
        }
    ],
    "travelers": [
        {
            "id": "{{price_passenger_id}}"
        }
    ],
    "contactInfo": {
        "emails": [
            "travel@sabre.com"
        ],
        "phones": [
            "123456"
        ]
    }
}

profileName contains a unique profile name used to move the profile into an Agent Assembly Area (AAA), a record used to store data temporarily.
profileTypeCode contains a unique profile type code.
domainId is usually equivalent to the user PCC but may be a specific customer code as well.

NDC booking using Sabre Profiles data by providing unique profile ID

{
    "flightOffer":{
        "offerId":"{{price_offer_id}}",
        "selectedOfferItems":[
            "{{price_offer_item_id}}"
        ]
    },
    "profiles":[
        {
            "uniqueId":"ABC123",
             "profileTypeCode":"TVL",
             "domainId":"AAAA"
        }
    ],
    "travelers":[
        {
            "id":"{{price_passenger_id}}"
        }
    ],
    "contactInfo":
    {
      "emails":[
        "travel@sabre.com"
      ],
      "phones":[
        "123456"
      ]
    }
}

uniqueId contains a unique profile ID used to move the profile into an AAA.

NDC booking for single traveler with identity documents

{
    "flightOffer": {
        "offerId": "{{price_offer_id}}",
        "selectedOfferItems": [
            "{{price_offer_item_id}}"
        ]
    },
    "travelers": [
        {
            "id": "{{price_passenger_id}}",
            "givenName": "John",
            "surname": "Kowalski",
            "birthDate": "1970-01-23",
            "identityDocuments": [
                {
                    "documentNumber": "0123456789",
                    "documentType": "PASSPORT",
                    "expiryDate": "2024-07-09",
                    "issuingCountryCode": "US",
                    "residenceCountryCode": "US",
                    "givenName": "John",
                    "surname": " Kowalski ",
                    "birthDate": "1970-01-23",
                    "gender": "MALE"
                },
                {
                    "documentNumber": "0123456789",
                    "documentType": "VISA",
                    "placeOfIssue": "FR",
                    "hostCountryCode": "US",
                    "issueDate": "2019-07-09",
                    "expiryDate": "2024-07-09",
                    "birthDate": "1970-01-23",
                    "gender": "MALE"
                }
            ]
        }
    ],
    "contactInfo": {
        "emails": [
            "travel@sabre.com"
        ],
        "phones": [
            "123456"
        ]
    }
}

For NDC content, createBooking supports the following types of identity documents:

- PASSPORT,
- VISA,
- KNOWN_TRAVELER_NUMBER,
- REDRESS_NUMBER,
- SECURE_FLIGHT_PASSENGER_DATA.

NDC booking for single traveler with frequent flyer information

{
    "flightOffer": {
        "offerId": "{{price_offer_id}}",
        "selectedOfferItems": [
            "{{price_offer_item_id}}"
        ]
    },
    "travelers": [
        {
            "id": "{{price_passenger_id}}",
            "givenName": "John",
            "surname": "Kowalski",
            "birthDate": "1970-01-23",
            "loyaltyPrograms": [
                {
                    "supplierCode": "LO",
                    "programNumber": "992001557133700",
                    "tierLevel": "1",
                    "receiverCode": "LO"
                }
            ]
        }
    ],
    "contactInfo":
    {
      "emails": [
        "travel@sabre.com"
      ],
      "phones": [
        "123456"
      ]
    }
}

getBooking

The getBooking service simplifies the booking retrieval process by removing the need to use individual or granular APIs to fetch a reservation. It retrieves a normalized reservation view regardless of content sources (PNR, NDC, or mixed per PNR). The result is achieved with fewer API calls.

getBooking also provides additional information relevant to travelers (e.g., fare rules) as well as data elements that are not stored in the Sabre PNR (e.g., ticket details, profiles, and more). It allows you to have a holistic view of your Sabre reservations and supports traveler-oriented use cases (“Can I change my ticket?”). Reservations are retrieved in a stateless way.

How it works

getBooking executes the following three steps to display a booking:

  1. Retrieves reservation data using the confirmationID (PNR locator or order ID).
  2. Calls proper downline services to retrieve additional data in an optimized way.
  3. Maps retrieved information to a normalized data model.

The service is ready to return your booking in a single API call, which can contain:

  • Traditional segments (air/hotel/car), CSL hotels (traditional and aggregators),
  • NDC orders (air), additional data elements outside of Sabre’s PNR.

The service does not expose every data element present in the PNR and order because Sabre downline services contain plenty of data that is not necessary in most standard use cases. Receiving a full set of details could cost time and reduce efficiency. We guarantee careful data selection and lack of redundant information in the API response. However, should you require us to handle specific business scenarios, we are always happy to discuss extending the schema.

The API can be profitably integrated as a self-service tool to retrieve traveler-oriented reservation data in a human-readable format. We recommend using getBooking for mid- and back-office tasks. With complete PNR, ticketing and accounting data obtained in a single call, work with clients becomes efficient and effective.

How to display an entire booking

getBooking is simple and convenient to use. To ensure a successful booking retrieval, the request must contain the confirmationId (PNR locator or order ID). The service verifies the data that has been stored in your PNR and returns it.

{
    "confirmationId": "GLEBNY"
}

The booking content is returned as a response. An example containing the majority of possible fields and structures can be found under the “Response 200” section of the documentation. We encourage you to have a look and identify the data your system could use. An excerpt is also presented below.

response 200

Response data types

The response from the getBooking service includes many data types grouped by functionality. Both simple fields like isCancelable or isTicketed and advanced structures full of booking information (such as contactInfo, flights, fares, and many more) can be found in the reference documentation. A complete list of the response data types is also published:

getbookingresponse

Choose a data type and read its description along with a list of available fields.

nested object fields

As our model contains plenty of booking data, it is most beneficial to present it following the current format directly from the reference documentation on Sabre Dev Studio. Feel free to refer to it as needed to verify how the getBooking service can help your organization deliver results.

cancelBooking

The cancelBooking service provides a unified method of cancelling reservations from different sources (ATPCO, NDC). It is possible to either cancel all items from a booking (such as flights, hotels, etc.) or remove only select segments and leave all the others active.

Using cancelBooking, you may perform operations such as void and refund on tickets referenced by ticket numbers or booking identifiers. Moreover, the service exposes a check operation which returns information about whether it is possible to void or refund a given ticket. You can also combine segment cancellation with void or refund operations on tickets in a single request. This allows you to save time and automate the process.

As for NDC content, only the cancel operation is currently available. Voiding, checking and refunding are not NDC-compliant yet since their respective flows are now under construction. Stay tuned!

To help you put knowledge into practice, we prepared some examples. Let’s have a look and learn how to use the cancelBooking service with NDC features.

cancelBooking request to remove all segments

{
  "confirmationId": "ABCDEF",
  "cancelAll": true
}

The first example demonstrates how to cancel all segments within a booking – you may do it by setting cancelAll to true within the request. The request contains the confirmationId parameter as well, which is mandatory for booking cancellation. Simple and concise, nothing more necessary.

cancelBooking request with booking source

{
  "confirmationId": "1SXXXABCD1EF23",
  "cancelAll": true,
  "bookingSource": "SABRE_ORDER"
}

When cancelling a reservation, an additional property specifying the booking source can be included. The possible values are SABRE_ORDER (for NDC) and SABRE (for ATPCO).

cancelBooking request with booking retrieval

{
  "confirmationId": "ABCDEF",
  "cancelAll": true,
  "retrieveBooking": true
}

Optionally, the cancelBooking service can return booking data after cancellation has been finished. If the retrieveBooking property is set to true in the request, the current state of the booking is provided in the response.

Is it worth using?

We would like to invite you to begin your journey with the Booking Management API today. Once integrated, you will reap the benefits of numerous downline Sabre capabilities. Create both NDC and ATPCO bookings using a single, concise service – createBooking. Retrieve data fast via the getBooking service. Various travel information is always at your fingertips: flights, hotels, cars, cruises, reservations, passenger data, tickets, taxes, fares, baggage, and many more. If needed, any of these items can be easily cancelled using cancelBooking.

The common API data model, service speed, performance optimization, and possibility to customize every request with more advanced parameters will elevate your experience. Developer satisfaction guaranteed!

Try out the Booking Management API yourself. Take some time to test the samples provided in the article, which show end-to-end capabilities our API. More advanced examples for both NDC and ATPCO flows can be found on the Sabre Dev Studio’s Github page.

In the words of Lao Tzu, “A journey of a thousand miles must begin with a single step.”
Within the With Booking Management world, all the steps you take are simple and fun.

Resources