Suppliers
This object represents one of your suppliers, it is mainly used for risk analysis and booking components.
Supplier Model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the object.
- Name
name- Type
- string
- Description
The name of the supplier.
- Name
created_at- Type
- datetime
- Description
The datetime at which the supplier object was created within our systems.
{
"id": "226009ab-ffe9-4c80-922b-982e8e7849f8",
"name": "XXX123789",
"created_at": "2022-01-28T10:57:32.456Z"
}
Fetch All
This endpoint retrieves all suppliers. Suppliers are sorted by name.
Parameters
- Name
organisationrequired- Type
- string
- Description
The 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.
- Name
keyword- Type
- string
- Description
A supplier name that you want to filter by.
- Name
skip- Type
- integer
- Description
See the pagination section for details.
- Name
take- Type
- integer
- Description
See the pagination section for details.
Returns
An array of Supplier Models
Request
import axios from 'axios';
const response = await axios.post(
'https://api.felloh.com/agent/suppliers',
{
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
}
}
Create One
This endpoint allows you to create a new supplier.
Parameters
- Name
organisationrequired- Type
- string
- Description
The organisation ID that you want to create the supplier in.
- Name
supplier_namerequired- Type
- string
- Description
The supplier name that you want to create.
Request
import axios from 'axios';
const response = await axios.put(
'https://api.felloh.com/agent/suppliers',
{
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"
}
}
