Booking Component
This object represents a component of a booking.
An example of a Booking Object
{"id": "8224bb6e-1d70-588b-82b8-226f2d71012e","supplier": {"id": "6ab41ce7-36c8-5835-b997-492adb3d66e1","name": "Felloh Travel - Packages","created_at": "2022-06-28T17:27:59.616Z"},"amount": 56300,"currency": "GBX","booking_reference": "X1232JJ","destination_air": "AMS","type": "flight","created_at": "2023-02-15T16:00:18.886Z"}
idstring
Unique identifier for the object.
supplierobject
The supplier object that the booking component is booked with
amountinteger
The amount that the component is for, in the lowest denomination for the currency (for GBP, this would be pence)
currencystring
The currency of the component | see currency documentation
booking_referencestring
The supplier booking reference for the component
destination_airdate
If the component is a flight component, this represents the destination airport code
typedate
A reference type for component (flight, package, transfer, etc...)
created_atdatetime
The datetime at which the object was created within our systems
Create one
PUT/agent/booking/8224bb6e-1d70-588b-82b8-226f2d71012e/component
import axios from 'axios';const response = await axios({method: 'put',url: `https://api.felloh.com/agent/booking/8224bb6e-1d70-588b-82b8-226f2d71012e/component`,data : JSON.stringify({"supplier": "ab6f8eb9-1c07-4ca4-888b-ae1a11b4463c","amount": 56300,"currency": "GBX","booking_reference": "X1232JJ","destination_air": "AMS","type": "flight",}),headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"data": {"id": "226009ab-ffe9-4c80-922b-982e8e7849f8"},"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"}}
This endpoint allows you to create a new booking component
HTTP Method
PUT
HTTP Endpoint
PRODhttps://api.felloh.com/agent/booking/<BOOKING ID>/component
SANDBOXhttps://sandbox.felloh.com/agent/booking/<BOOKING ID>/component
Path Parameters
Parameter | Required | Type | Description |
---|---|---|---|
booking_ID | true | UUID | The booking id that you wish to add a component to |
Payload
Parameter | Required | Type | Description |
---|---|---|---|
supplier | true | uuid | The supplier object that the booking component is booked with |
amount | true | int | The amount that the component is for, in the lowest denomination for the currency (for GBP, this would be pence) |
currency | true | string | The currency of the component |
booking_reference | true | string | The supplier booking reference for the component |
destination_air | false | string | The date that the booking returns |
type | false | string | A reference type for component (flight, package, transfer, etc...) |
Response
Parameter | Type | Description |
---|---|---|
id | UUID | The ID of the component that you have created |
Delete one
DELETE/agent/bookings/226009ab-ffe9-4c80-922b-982e8e7849f8/component/226009ab-ffe9-4c80-922b-982e8e7849f8
import axios from 'axios';const bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8';const componentID = '226009ab-ffe9-4c80-922b-982e8e7849f8';const response = await axios({method: 'delete',url: `https://api.felloh.com/agent/bookings/${bookingID}/component/${componentID}`,headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"data": {},"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"}}
This endpoint allows you to delete a booking component
HTTP Method
DELETE
HTTP Endpoint
PRODhttps://api.felloh.com/agent/bookings/<BOOKING ID>/component/<COMPONENT ID>
SANDBOXhttps://sandbox.felloh.com/agent/bookings/<BOOKING ID>/component/<COMPONENT ID>
Path Parameters
Parameter | Required | Type | Description |
---|---|---|---|
booking_ID | true | UUID | The booking id that you wish to delete the component for |
component ID | true | UUID | The component id that you wish to delete |
Response
Returns an empty object