API

Sections

Theme switcher

Getting Started

On this page
  • Getting Started

Basic Integration

On this page
  • Basic Integration

Enterprise Features

On this page
  • Enterprise Features

Other Concepts

On this page
  • Other Concepts

API Endpoints

Was this section helpful?

What made this section unhelpful for you?

On this page
  • API Endpoints

Connections

On this page
  • Connections

Reservations

On this page
  • Reservations

Bookings

On this page
  • Bookings

Cancellations

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Cancellations

/cancellations/conditions

Description

Retrieve cancellation conditions for a certain booking.

To enable the cancellation of tickets through your system, you can use this endpoint to display the conditions for the cancellation of a specific booking.

Displaying pre-book cancellation policies

In the booking flow, it is highly recommended to display the carrier’s cancellation policy for the chosen trip and fare class to the user. Cancellation policies are defined on a fare class level in the Distribusion API and communicated through fare_features that are provided in the /marketing_carriers/{marketing_carrier_id} endpoint.

Distribusion uses three standardised fare feature codes to communicate cancellation policies and provide the relevant information to be displayed to users:

  • REFU (Fully refundable): The ticket can be fully refunded according to the carrier’s policy.
  • PREF (Partially refundable): The ticket can be partially refunded according to the carrier’s policy.
  • NREF (Non-refundable): The ticket cannot be refunded.

Each cancellation fare feature provides a carrier-specific description within the attributes array of the response, detailing the conditions whereby a customer can cancel a ticket.

For example: The ticket can be cancelled and fully refunded before 00:00 on the departure date.

Displaying cancellation conditions for an existing booking

Once a customer has booked a ticket, Distribusion enables customer facing platforms to display the cancellation conditions that apply to the user’s booking.

The /cancellations/conditions endpoint requires only the booking_id to be specified and returns three parameters from which the cancellation conditions can be identified and clearly displayed:

  • allowed - Boolean, specifies whether the booking is cancellable or not.
  • fee - The charge that will apply to the cancellation of the booking and must be deducted from the booking price to compute the refund value. The value is provided in the carrier’s currency (fractional unit), which is also specified in the response.
  • cutoff - The latest time at which the booking can be cancelled at this fee, e.g. 2021-06-15T06:05.

Note

The /cancellations/conditions endpoint is a live call to the carrier’s system and returns the conditions that are valid at the time of the request. These conditions can change over time if the carrier has dynamic cancellation conditions and should thus be retrieved whenever the user opens a page on which the cancellation conditions are displayed.

Next step

Once the cancellation conditions are presented and confirmed by the user, a cancellation request can be sent using the /cancelations/create endpoint.

More Info

Was this section helpful?

What made this section unhelpful for you?

On this page
  • /cancellations/conditions

/cancellations/create

Description

Create cancellation for specific booking

If the customer wishes to and the conditions permit, this endpoint enables you to execute the cancellation of a booking.

Conducting a cancellation

After presenting the cancellation conditions to the user using the data from the /cancellations/conditions endpoint, the /cancellations/create endpoint enables the execution of the cancellation and requires only the booking_id to be specified.

The response provides the information that can be displayed to the user to confirm the cancellation:

  • total_price - The total price of the original booking.
  • fee - The amount that has been charged for the cancellation.
  • total_refund - The amount that can be refunded to the customer, calculated as total price - fee.
  • created_at - Time stamp of execution of cancellation.

The booking will be cancelled in the carrier’s system and accordingly accounted for in the following clearing cycle between the retail platform and Distribusion.

More Info

Was this section helpful?

What made this section unhelpful for you?

On this page
  • /cancellations/create

Amendments

On this page
  • Amendments

Cards

On this page
  • Cards

Stations, Areas & Cities

On this page
  • Stations, Areas & Cities

Marketing Carriers

On this page
  • Marketing Carriers

Advanced Pricing Insights

On this page
  • Advanced Pricing Insights

Post-Sales AI Bot

On this page
  • Post-Sales AI Bot

📣 What's New

Was this section helpful?

What made this section unhelpful for you?

On this page
  • 📣 What's New

Errors

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Errors

Intro

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Intro

Integration Types

On this page
  • Integration Types

Search SDK

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Search SDK

Examples of Booking Engines

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Examples of Booking Engines

Custom Domain

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Custom Domain

Analytics

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Analytics

Languages

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Languages

Agent Counter

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Agent Counter

Connectivity Services

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Connectivity Services

Invoicing and Payments

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Invoicing and Payments

Dictionary

Was this section helpful?

What made this section unhelpful for you?

On this page
  • Dictionary
View as Markdown

Ask an AI

Open in ChatGPTOpen in ClaudeOpen in Perplexity

Code with AI

Open in Copilot