Bookings

This object represents a customers booking with you. It allows you to collect customer payments and group them into one entity.

An example of a Booking Object

{
"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",
"gross_amount": 1000000,
"currency": "GBX",
"email": "james.dean@gmail.com",
"atol_receipt_number": "233234234",
"user": {
"id": "e8c243ff-d000-4f81-ba57-94184d44dae2",
"email": "tom@felloh.com"
},
"components": [
{
"id": "8224bb6e-7d70-588b-82b8-316f2d71012e",
"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": "packages",
"created_at": "2023-02-15T16:00:18.886Z"
}
],
"transactions": [
{
"id": "fe9afbbf-0854-48af-acec-1efd1bed229a",
"amount": 56300,
"status": "COMPLETE",
"method": "ONLINE",
"type": "CARD",
"created_at": "2022-01-28T10:58:31.165Z",
"completed_at": "2022-01-28T10:58:31.165Z"
}
],
"payment_links": [
{
"id": "b5e1bd24-7379-4d27-b4d8-07120fefc25c",
"amount": 1000,
"description": "Deposit for Bali",
"expires_at": "2021-12-17T15:10:37.589Z",
"created_at": "2021-11-17T15:10:37.589Z",
"email": "tom@felloh.com",
"currency": "GBX",
"methods": {
"open_banking": true,
"card": true
}
}
],
"package_type": {
"id": "AGENT_OF_ATOL_HOLDER",
"created_at": "2023-04-04T09:41:12.021Z"
},
"customer_name": "James Dean",
"booking_reference": "XXX123789",
"departure_date": "2022-07-18",
"return_date": "2022-07-25",
"created_at": "2022-06-23T16:05:30.100Z",
"updated_at": "2022-06-23T16:13:14.794Z"
}

idstring

Unique identifier for the object.

gross_amountinteger

The total value of the booking (in pence).

currencystring

The currency of the booking | see currency documentation

emailstring

The email address of the customer

atol_receipt_numberstring

The ATOL receipt number for the booking.

userobject

The compact user object of the user that created the booking

componentsarray

An array of booking component objects attached to the booking

transactionsarray

An array containing all compact transaction objects linked to the booking

payment_linkobject

An array containing all companct payment link object that are associated with the booking.

customer_namestring

The name of the customer that the booking is for

booking_referencestring

Your unique reference for the customers booking

departure_datedate

The date that the booking commences

return_datedate

The date that the booking ends

package_typeobject

The package type of that booking.

created_atdatetime

The datetime at which the object was created within our systems

updated_atdatetime

The datetime at which the object was last updated within our systems


Fetch all

POST/agent/bookings

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/agent/bookings',
data: {
organisation: 'X9876',
keyword: 'james.dean@gmail.com',
date_from: '2020-02-01',
date_to: '2021-05-10',
skip: 10,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function searchBookings($token, $searchParams) {
$url = 'https://api.felloh.com/agent/bookings';
$client = new Client();
$response = $client->post($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'json' => $searchParams,
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$searchParams = [
'organisation' => 'X9876',
'keyword' => 'james.dean@gmail.com',
'date_from' => '2020-02-01',
'date_to' => '2021-05-10',
'skip' => 10,
'take' => 20,
];
$response = searchBookings($token, $searchParams);
import requests
import json
def post_agent_bookings(organisation, keyword, date_from, date_to, skip, take, access_token):
api_url = 'https://api.felloh.com/agent/bookings'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'organisation': organisation,
'keyword': keyword,
'date_from': date_from,
'date_to': date_to,
'skip': skip,
'take': take
}
response = requests.post(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
response_data = post_agent_bookings('X9876', 'james.dean@gmail.com', '2020-02-01', '2021-05-10', 10, 20, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await PostAgentBookings("X9876", "james.dean@gmail.com", "2020-02-01", "2021-05-10", 10, 20, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostAgentBookings(string organisation, string keyword, string dateFrom, string dateTo, int skip, int take, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/agent/bookings";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
organisation = organisation,
keyword = keyword,
date_from = dateFrom,
date_to = dateTo,
skip = skip,
take = take
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

JSON RESPONSE Defined by type parameter being NULL or 'json'

{
"data": [
{
"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",
"gross_amount": 1000000,
"currency": "GBX",
"email": "james.dean@gmail.com",
"atol_receipt_number": "233234234",
"user": {
"id": "e8c243ff-d000-4f81-ba57-94184d44dae2",
"email": "tom@felloh.com"
},
"transactions": [
{
"id": "fe9afbbf-0854-48af-acec-1efd1bed229a",
"amount": 56300,
"status": "COMPLETE",
"method": "ONLINE",
"type": "CARD",
"created_at": "2022-01-28T10:58:31.165Z",
"completed_at": "2022-01-28T10:58:31.165Z"
}
],
"payment_links": [
{
"id": "b5e1bd24-7379-4d27-b4d8-07120fefc25c",
"amount": 1000,
"description": "Deposit for Bali",
"expires_at": "2021-12-17T15:10:37.589Z",
"created_at": "2021-11-17T15:10:37.589Z",
"email": "tom@felloh.com",
"currency": "GBX",
"methods": {
"open_banking": true,
"card": true
}
}
],
"package_type": {
"id": "AGENT_OF_ATOL_HOLDER",
"created_at": "2023-04-04T09:41:12.021Z"
},
"customer_name": "James Dean",
"booking_reference": "XXX123789",
"departure_date": "2022-07-18",
"return_date": "2022-07-25",
"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
}
}

CSV RESPONSE Defined by type parameter being 'csv'

{
"data": {
"url": "https://agent-data-production-reports.s3.eu-west-2.amazonaws.com/02803bec-dddf-4f3e-902d-ef0e42a856af.csv"
},
"errors": [],
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "02803bec-dddf-4f3e-902d-ef0e42a856af",
"count": 184
}
}

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/agent/bookings

SANDBOXhttps://sandbox.felloh.com/agent/bookings

Payload

ParameterRequiredTypeDescription
organisationtruestringThe 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.
keywordfalsestringA customer name, booking reference or email address that you want to filter by.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details
show-child-organisationsfasleBooleanWhether to also show booking for any of the requested organisations child organisations
typefaslestringCan be 'csv' or 'json', defaults to json
date_fromfalsedateThe booking departure date that you want to get bookings from, in ISO 8601 format
date_tofalsedateThe booking departure date that you want to get bookings to, in ISO 8601 format
booking_referencefaslestringAllows you to find a booking by exact booking reference (not case sensitive)

Response

Returns an array of Booking Objects


Fetch one

GET/agent/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/agent/bookings/${bookingID}`,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function getBooking($token, $bookingID) {
$url = 'https://api.felloh.com/agent/bookings/' . $bookingID;
$client = new Client();
$response = $client->get($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8'; // Replace with the actual booking ID
$response = getBooking($token, $bookingID);
import requests
def get_agent_booking(booking_id, access_token):
api_url = f'https://api.felloh.com/agent/bookings/{booking_id}'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
response = requests.get(api_url, headers=headers)
response.raise_for_status()
return response.text
booking_id = '226009ab-ffe9-4c80-922b-982e8e7849f8'
response_data = get_agent_booking(booking_id, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string bookingId = "226009ab-ffe9-4c80-922b-982e8e7849f8";
var response = await GetAgentBooking(bookingId, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> GetAgentBooking(string bookingId, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/agent/bookings/{bookingId}";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var httpResponse = await client.GetAsync(apiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": {
"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",
"gross_amount": 1000000,
"currency": "GBX",
"email": "james.dean@gmail.com",
"atol_receipt_number": "233234234",
"user": {
"id": "e8c243ff-d000-4f81-ba57-94184d44dae2",
"email": "tom@felloh.com"
},
"components": [
{
"id": "8224bb6e-7d70-588b-82b8-316f2d71012e",
"supplier": {
"id": "6ab41ce7-36c8-5835-b997-492adb3d66e1",
"name": "Felloh Travel - Packages",
"created_at": "2022-06-28T17:27:59.616Z"
},
"amount": 56300,
"booking_reference": "X1232JJ",
"destination_air": "AMS",
"type": "packages",
"created_at": "2023-02-15T16:00:18.886Z"
}
],
"transactions": [
{
"id": "fe9afbbf-0854-48af-acec-1efd1bed229a",
"amount": 56300,
"status": "COMPLETE",
"method": "ONLINE",
"type": "CARD",
"created_at": "2022-01-28T10:58:31.165Z",
"completed_at": "2022-01-28T10:58:31.165Z"
}
],
"package_type": {
"id": "AGENT_OF_ATOL_HOLDER",
"created_at": "2023-04-04T09:41:12.021Z"
},
"customer_name": "James Dean",
"booking_reference": "XXX123789",
"departure_date": "2022-07-18",
"return_date": "2022-07-25",
"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"
}
}

This endpoint allows you to retrieve a single booking

HTTP Method

GET

HTTP Endpoint

PRODhttps://api.felloh.com/agent/bookings/<BOOKING ID>

SANDBOXhttps://sandbox.felloh.com/agent/bookings/<BOOKING ID>

Path Parameters

ParameterRequiredTypeDescription
booking_IDtrueUUIDThe booking id that you wish to retrieve

Response

Returns a Booking Object


Create one

PUT/agent/bookings/

import axios from 'axios';
const response = await axios(
{
method: 'put',
url: `https://api.felloh.com/agent/bookings`,
data : JSON.stringify({
organisation: 'X9876',
customer_name: 'James Dean',
email: 'james@felloh.org',
booking_reference: 'XXX123789',
departure_date: '2022-07-18',
return_date: '2022-07-25',
gross_amount: 1000000,
currency: 'GBX',
atol_receipt_number: '233234234',
package_type: "AGENT_OF_ATOL_HOLDER",
}),
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function createBooking($token, $bookingData) {
$url = 'https://api.felloh.com/agent/bookings';
$client = new Client();
$response = $client->put($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'json' => $bookingData,
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$bookingData = [
'organisation' => 'X9876',
'currency' => 'GBX',
'customer_name' => 'James Dean',
'email' => 'james@felloh.org',
'booking_reference' => 'XXX123789',
'departure_date' => '2022-07-18',
'return_date' => '2022-07-25',
'gross_amount' => 1000000,
'atol_receipt_number' => '233234234',
'package_type' => 'AGENT_OF_ATOL_HOLDER',
];
$response = createBooking($token, $bookingData);
import requests
import json
def put_agent_bookings(access_token):
api_url = 'https://api.felloh.com/agent/bookings'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'organisation': 'X9876',
'customer_name': 'James Dean',
'email': 'james@felloh.org',
'booking_reference': 'XXX123789',
'departure_date': '2022-07-18',
'return_date': '2022-07-25',
'gross_amount': 1000000,
'currency': 'GBX',
'atol_receipt_number': '233234234',
'package_type': 'AGENT_OF_ATOL_HOLDER'
}
response = requests.put(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
response_data = put_agent_bookings('<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await PutAgentBookings("<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PutAgentBookings(string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/agent/bookings";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
organisation = "X9876",
customer_name = "James Dean",
email = "james@felloh.org",
booking_reference = "XXX123789",
departure_date = "2022-07-18",
return_date = "2022-07-25",
gross_amount = 1000000,
currency = "GBX",
atol_receipt_number = "233234234",
package_type = "AGENT_OF_ATOL_HOLDER"
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PutAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

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

HTTP Method

PUT

HTTP Endpoint

PRODhttps://api.felloh.com/agent/bookings

SANDBOXhttps://sandbox.felloh.com/agent/bookings

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to create the booking in.
customer_nametruestringThe customers full name.
emailtruestringThe customers email address
departure_datefalsedateThe date that the booking departs
return_datefalsedateThe date that the booking returns
gross_amountfalseIntegerThe total value of the booking
currencyfalsestringThe currency that booking is in, defaults to GBX, see currency documentation for more information.
atol_receipt_numberfalseIntegerThe ATOL receipt number for the booking
package_typefalseStringThe package type ID that you want to create the booking in.

Response

ParameterTypeDescription
idUUIDThe ID of the booking that you have created

Delete one

DELETE/agent/bookings/226009ab-ffe9-4c80-922b-982e8e7849f8

import axios from 'axios';
const bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8';
const response = await axios(
{
method: 'delete',
url: `https://api.felloh.com/agent/bookings/${bookingID}`,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function deleteBooking($token, $bookingID) {
$url = 'https://api.felloh.com/agent/bookings/' . $bookingID;
$client = new Client();
$response = $client->delete($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8'; // Replace with the actual booking ID
$response = deleteBooking($token, $bookingID);
import requests
def delete_agent_booking(booking_id, access_token):
api_url = f'https://api.felloh.com/agent/bookings/{booking_id}'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
response = requests.delete(api_url, headers=headers)
response.raise_for_status()
return response.text
booking_id = '226009ab-ffe9-4c80-922b-982e8e7849f8'
response_data = delete_agent_booking(booking_id, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string bookingId = "226009ab-ffe9-4c80-922b-982e8e7849f8";
var response = await DeleteAgentBooking(bookingId, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> DeleteAgentBooking(string bookingId, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/agent/bookings/{bookingId}";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var httpResponse = await client.DeleteAsync(apiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

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 if it has no transactions on it.

HTTP Method

DELETE

HTTP Endpoint

PRODhttps://api.felloh.com/agent/bookings/<BOOKING ID>

SANDBOXhttps://sandbox.felloh.com/agent/bookings/<BOOKING ID>

Path Parameters

ParameterRequiredTypeDescription
booking_IDtrueUUIDThe booking id that you wish to delete

Response

Returns an empty object


Update booking

POST/agent/bookings/226009ab-ffe9-4c80-922b-982e8e7849f8

import axios from 'axios';
const bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8';
const response = await axios(
{
method: 'post',
url: `https://api.felloh.com/agent/bookings/${bookingID}`,
data: {
gross_amount: '2500',
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function updateBookingReference($token, $bookingID, $grossAmount) {
$url = 'https://api.felloh.com/agent/bookings/' . $bookingID;
$client = new Client();
$response = $client->post($url, [
'json' => [
'gross_amount' => $grossAmount,
],
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8'; // Replace with the actual booking ID
$grossAmount = '2500'; // Replace with the new booking reference
$response = updateBookingReference($token, $bookingID, $grossAmount);
import requests
import json
def post_agent_booking_update(booking_id, gross_amount, access_token):
api_url = f'https://api.felloh.com/agent/bookings/{booking_id}'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'gross_amount': gross_amount
}
response = requests.post(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
booking_id = '226009ab-ffe9-4c80-922b-982e8e7849f8'
response_data = post_agent_booking_update(booking_id, 2500, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string bookingId = "226009ab-ffe9-4c80-922b-982e8e7849f8";
var response = await PostAgentBookingUpdate(bookingId, 2500, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostAgentBookingUpdate(string bookingId, int grossAmount, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/agent/bookings/{bookingId}";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
gross_amount = grossAmount
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

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 update booking details

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/agent/bookings/<BOOKING ID>

SANDBOXhttps://sandbox.felloh.com/agent/bookings/<BOOKING ID>

Path Parameters

ParameterRequiredTypeDescription
booking_IDtrueUUIDThe booking id that you wish to update

Payload

ParameterRequiredTypeDescription
gross_amountfalsestringThe gross amount of the booking
departure_datefalsestringThe departure date of the booking
return_datefalsestringThe return date of the booking
customer_namefalsestringThe customer name for the booking
emailfalsestringThe customer's email address for the booking
package_typefalsestringThe package type of the booking
atol_receipt_numberfalsestringThe atol receipt number of the booking

Response

Returns an empty object


Update booking reference

POST/agent/bookings/226009ab-ffe9-4c80-922b-982e8e7849f8/update-reference

import axios from 'axios';
const bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8';
const response = await axios(
{
method: 'post',
url: `https://api.felloh.com/agent/bookings/${bookingID}/update-reference`,
data: {
booking_reference: 'test-1234',
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function updateBookingReference($token, $bookingID, $newReference) {
$url = 'https://api.felloh.com/agent/bookings/' . $bookingID . '/update-reference';
$client = new Client();
$response = $client->post($url, [
'json' => [
'booking_reference' => $newReference,
],
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$bookingID = '226009ab-ffe9-4c80-922b-982e8e7849f8'; // Replace with the actual booking ID
$newReference = 'test-1234'; // Replace with the new booking reference
$response = updateBookingReference($token, $bookingID, $newReference);
import requests
import json
def post_agent_booking_update_reference(booking_id, new_booking_reference, access_token):
api_url = f'https://api.felloh.com/agent/bookings/{booking_id}/update-reference'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'booking_reference': new_booking_reference
}
response = requests.post(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
booking_id = '226009ab-ffe9-4c80-922b-982e8e7849f8'
new_booking_reference = 'test-1234'
response_data = post_agent_booking_update
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string bookingId = "226009ab-ffe9-4c80-922b-982e8e7849f8";
var response = await PostAgentBookingUpdateReference(bookingId, "test-1234", "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostAgentBookingUpdateReference(string bookingId, string newBookingReference, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/agent/bookings/{bookingId}/update-reference";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
booking_reference = newBookingReference
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

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 update the booking reference for a booking

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/agent/bookings/<BOOKING ID>/update-reference

SANDBOXhttps://sandbox.felloh.com/agent/bookings/<BOOKING ID>/update-reference

Path Parameters

ParameterRequiredTypeDescription
booking_IDtrueUUIDThe booking id that you wish to update

Payload

ParameterRequiredTypeDescription
booking_referencetruestringThe new booking reference for the booking

Response

Returns an empty object