Choose a language javascript

Suppliers

This object represents one of your suppliers, it is mainly used for risk analysis and booking components.

The Supplier Object

{
"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",
"name": "XXX123789",
"created_at": "2022-01-28T10:57:32.456Z"
}

idstring

Unique identifier for the object.

namestring

The name of the supplier

created_atdatetime

The datetime at which the supplier object was created within our systems


Fetch all

POST/agent/suppliers

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/agent/suppliers',
data: {
organisation: 'X9876',
keyword: 'virgin tours',
skip: 10,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
},
);

RESPONSE

{
"data": [
{
"id": "02c31636-e311-4694-a128-d83abae12e26",
"name": "Virgin Cruises",
"created_at": "2022-01-28T10:57:32.456Z"
},
{
"id": "54969d6f-2695-4314-97a1-63e5696b4807",
"name": "Virgin Holidays",
"created_at": "2022-01-28T10:57:32.456Z"
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

This endpoint retrieves all suppliers. Suppliers are sorted by name.

HTTP Method

POST

HTTP Endpoint

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

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

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch suppliers for. You can find the organisation that you have access to by using the List all organisations method.
keywordfalsestringA supplier name that you want to filter by.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details

Response

Returns an array of Supplier Objects


Create one

PUT/agent/suppliers/

import axios from 'axios';
const response = await axios(
{
method: 'put',
url: `https://api.felloh.com/agent/suppliers`,
data : JSON.stringify({
organisation: 'X9876',
supplier_name: 'Bicknell Cruises',
}),
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 create a new booking

HTTP Method

PUT

HTTP Endpoint

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

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

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to create the supplier in.
supplier_nametruestringThe supplier name that you want to create.