Duffel API Adding Cancel For Any Reason

Number of APIs: 3

This collection is for the Adding Extra Bags guide.

What do you need to start?

This guide will go through the changes you need to make in the booking flow to be able to list and book services for any offer you want. It's important you know the basics of how to create a booking. If you are not familiar with how to create an order please heads over to our Quick Start Guide.

This guide will start from an offer so make sure you grab an offer ID for a British Airways flight before we start.

Overview

Baggages are a type of what we call availableservices. Available services are specific to an offer but not surfaced through the API by default. The changes we'll make to work with available services are: 1. Retrieve an offer along with its availableservices 2. Include services to order creation 3. See the services booked on an order

  1. Get services GET https://api.duffel.com/air/offers/{{OFFER_ID}}?return_available_services=true

  2. Create order with CFAR service POST https://api.duffel.com/air/orders

  3. Get order GET https://api.duffel.com/air/orders/{{ORDER_ID}}