Bookings
This object represents a customers booking with one of the organisations that you are partnered with. It allows you to see all bookings for a defined period, excluding any personally identifiable information.
An example of a Booking Object
{"booking": {"id": "226009ab-ffe9-4c80-922b-982e8e7849f8","agent_booking_reference": "XXX123789","departure_date": "2022-07-18","return_date": "2022-07-25","gross_amount": 1000000,"currency": "GBX","package_type": "ATOL","atol_receipt_number": "233234234"},"transactions": [{"id": "fe9afbbf-0854-48af-acec-1efd1bed229a","amount": 56300,"status": "COMPLETE","method": "ONLINE","type": "CARD","currency": "GBX","created_at": "2022-01-28T10:58:31.165Z","completed_at": "2022-01-28T10:58:31.165Z"}],"meta": {"created_at": "2022-06-23T16:05:30.100Z","updated_at": "2022-06-23T16:13:14.794Z"}}
booking.idstring
Unique identifier for the booking.
booking.agent_booking_referencestring
Your unique reference for the customers booking
booking.departure_datedate
The date that the booking commences
booking.return_datedate
The date that the booking ends
booking.gross_amountinteger
The total value of the booking (in pence).
booking.currencystring
The currency of the booking | see currency documentation
booking.package_typestring
The package type. A full list of package can be found by using the enums endpoint
booking.atol_receipt_numberstring
The ATOL receipt number for the booking.
transactionsarray
An array containing all transactions linked to the booking
transactions[].idstring
Unique identifier for the transaction.
transactions[].statusstring
The transaction status. A full list of transaction statuses can be found by using the enums endpoint
transactions[].methodstring
The transaction method. A full list of transaction methods can be found by using the enums endpoint
transactions[].typestring
The transaction type. A full list of transaction types can be found by using the enums endpoint
transactions[].amountinteger
The total value of the transaction (in pence).
transactions[].currencystring
The currency of the transaction | see currency documentation
transactions[].created_atdatetime
The datetime at which the transaction was created within our systems
transactions[].completed_atdatetime
The datetime at which the transaction was completed within our systems
meta.created_atdatetime
The datetime at which the booking was created within our systems
meta.updated_atdatetime
The datetime at which the booking was last updated within our systems
Fetch all
POST/partner/bookings
import axios from 'axios';const response = await axios({method: 'post',url: 'https://api.felloh.com/partner/bookings',data: {organisation: 'X9876',date_from: '2020-02-01',date_to: '2021-05-10',},headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"data": [{"booking": {"id": "226009ab-ffe9-4c80-922b-982e8e7849f8","agent_booking_reference": "XXX123789","departure_date": "2022-07-18","return_date": "2022-07-25","gross_amount": 1000000,"currency": "GBX","package_type": "ATOL","atol_receipt_number": "233234234"},"transactions": [{"id": "fe9afbbf-0854-48af-acec-1efd1bed229a","amount": 56300,"status": "COMPLETE","method": "ONLINE","type": "CARD","currency": "GBX","created_at": "2022-01-28T10:58:31.165Z","completed_at": "2022-01-28T10:58:31.165Z"}],"meta": {"created_at": "2022-06-23T16:05:30.100Z","updated_at": "2022-06-23T16:13:14.794Z"}}],"errors": {},"meta": {"code": 200,"reason": "OK","message": "The request was successful","request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6","count": 1}}
This endpoint retrieves all bookings. Bookings are sorted by creation date, with the most recent bookings coming first.
HTTP Method
POST
HTTP Endpoint
PRODhttps://api.felloh.com/partner/bookings
SANDBOXhttps://sandbox.felloh.com/partner/bookings
Payload
Parameter | Required | Type | Description |
---|---|---|---|
organisation | true | string | The organisation ID that you want to fetch bookings for. You can find the organisation that you have access to by using the List all organisations method. |
date_from | true | date | The booking departure date that you want to get bookings from, in ISO 8601 format |
date_to | true | date | The booking departure date that you want to get bookings to, in ISO 8601 format |
Response
Returns an array of Booking Objects
Fetch one
GET/partner/bookings/226009ab-ffe9-4c80-922b-982e8e7849f8
import axios from 'axios';const bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8';const response = await axios({method: 'get',url: `https://api.felloh.com/partner/bookings/${bookingID}`,headers: {'Content-Type': 'application/json',Authorization: `Bearer <YOUR TOKEN HERE>`,},});
RESPONSE
{"booking": {"id": "226009ab-ffe9-4c80-922b-982e8e7849f8","agent_booking_reference": "XXX123789","departure_date": "2022-07-18","return_date": "2022-07-25","gross_amount": 1000000,"currency": "GBX","package_type": "ATOL","atol_receipt_number": "233234234"},"transactions": [{"id": "fe9afbbf-0854-48af-acec-1efd1bed229a","amount": 56300,"status": "COMPLETE","method": "ONLINE","type": "CARD","currency": "GBX","created_at": "2022-01-28T10:58:31.165Z","completed_at": "2022-01-28T10:58:31.165Z"}],"meta": {"created_at": "2022-06-23T16:05:30.100Z","updated_at": "2022-06-23T16:13:14.794Z"}}
This endpoint allows you to retrieve a single booking
HTTP Method
GET
HTTP Endpoint
PRODhttps://api.felloh.com/partner/bookings/<BOOKING ID>
SANDBOXhttps://sandbox.felloh.com/partner/bookings/<BOOKING ID>
Path Parameters
Parameter | Required | Type | Description |
---|---|---|---|
booking_id | true | UUID | The booking id that you wish to retrieve |
Response
Returns a Booking Object