Credit Notes
The credit note object represents credit notes created against a booking. These notes provide a refundable amount to a customer, illustrated in a user-friendly format.
Credit Note Model
Properties
- Name
id- Type
- uuid
- Description
The unique id of the credit note.
- Name
short_id- Type
- string
- Description
A shorter user-friendly ID for customer sharing.
- Name
customer_name- Type
- string
- Description
The name of the customer to whom the credit note is issued.
- Name
amount- Type
- integer
- Description
The amount the credit note is for.
- Name
description- Type
- string
- Description
A description of what the credit note covers.
- Name
currency- Type
- string
- Description
The currency of the credit note. See currency documentation.
- Name
organisation- Type
- object
- Description
Compact organisation information representing the payment link's owner.
- Name
booking_applied_to- Type
- object
- Description
The booking model this credit note was applied to.
- Name
booking_created_from- Type
- object
- Description
The booking model from which this credit note was created.
{
"id": "59e904da-e2da-446b-867c-4403503b482f",
"short_id": "0BN07IX6VJ",
"customer_name": "Adam Clark",
"amount": 5000,
"description": "An example credit note",
"currency": "GBX",
"organisation": {
"id": "X1234",
"name": "Felloh",
"image": "organisation/x1234.png",
"legacy_id": "e4ebe1d6-d907-477c-a107-e26c74cf6034",
"created_at": "2022-01-15T00:48:41.255Z",
"updated_at": "2022-07-27T11:43:42.977Z"
},
"created_at": "2022-10-28T11:53:14.675Z",
"booking_applied_to": {
"id": "c25af1be-b643-4ef7-b66f-55124eaa224f",
"booking_reference": "testing321",
"created_at": "2022-10-20T08:39:15.843Z",
"customer_name": "Lorna",
"departure_date": "2022-11-11",
"return_date": "2022-12-31",
"email": "test@felloh.com",
"gross_amount": 10000
},
"booking_created_from": {
"id": "f5c48838-a45a-4c4e-b267-36c8c17b0551",
"booking_reference": "test-19126",
"created_at": "2022-08-05T14:58:20.458Z",
"customer_name": "Adam Clark",
"departure_date": null,
"return_date": null,
"email": "test@felloh.com",
"gross_amount": 120000
}
}
Fetch All
This endpoint retrieves all credit notes for an organisation.
Parameters
- Name
organisationrequired- Type
- string
- Description
The organisation ID to fetch credit notes for. Use the List all organisations method to retrieve accessible organisations.
- Name
skip- Type
- integer
- Description
Pagination offset. See the pagination section for details.
- Name
take- Type
- integer
- Description
Number of records to return. See the pagination section for details.
Returns
Returns an array of Credit Note Models
Request
import axios from 'axios';
const response = await axios.post(
'https://api.felloh.com/agent/credit-notes',
{
organisation: 'X9876',
skip: 10,
take: 20
},
{
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer <YOUR TOKEN HERE>` }
}
);
Response
{
"data": [
{
"id": "59e904da-e2da-446b-867c-4403503b482f",
"short_id": "0BN07IX6VJ",
"customer_name": "Adam Clark",
"amount": 5000,
"description": "An example credit note",
"currency": "GBX",
"organisation": {
"id": "X1234",
"name": "Felloh",
"image": "organisation/x1234.png",
"legacy_id": "e4ebe1d6-d907-477c-a107-e26c74cf6034",
"created_at": "2022-01-15T00:48:41.255Z",
"updated_at": "2022-07-27T11:43:42.977Z"
},
"created_at": "2022-10-28T11:53:14.675Z",
"booking_applied_to": {
"id": "c25af1be-b643-4ef7-b66f-55124eaa224f",
"booking_reference": "testing321",
"created_at": "2022-10-20T08:39:15.843Z",
"customer_name": "Lorna",
"departure_date": "2022-11-11",
"return_date": "2022-12-31",
"email": "test@felloh.com",
"gross_amount": 10000
},
"booking_created_from": {
"id": "f5c48838-a45a-4c4e-b267-36c8c17b0551",
"booking_reference": "test-19126",
"created_at": "2022-08-05T14:58:20.458Z",
"customer_name": "Adam Clark",
"departure_date": null,
"return_date": null,
"email": "test@felloh.com",
"gross_amount": 120000
}
}
],
"errors": [],
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "84901a6e-e78b-4d96-b657-d37ca6b445c4",
"count": 1
}
}
Fetch One
This endpoint allows you to retrieve a single credit note by its ID.
Path Parameters
- Name
credit_note_id- Type
- uuid
- Description
The credit note ID to retrieve.
Returns
Returns a Credit Note Model
Request
import axios from 'axios';
const creditNoteID = '59e904da-e2da-446b-867c-4403503b482f';
const response = await axios.get(
`https://api.felloh.com/agent/credit-notes/${creditNoteID}`,
{
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer <YOUR TOKEN HERE>` }
}
);
Response
{
"data": {
"id": "59e904da-e2da-446b-867c-4403503b482f",
"short_id": "0BN07IX6VJ",
"customer_name": "Adam Clark",
"amount": 5000,
"description": "An example credit note",
"currency": "GBX",
"organisation": {
"id": "X1234",
"name": "Felloh",
"image": "organisation/x1234.png",
"legacy_id": "e4ebe1d6-d907-477c-a107-e26c74cf6034",
"created_at": "2022-01-15T00:48:41.255Z",
"updated_at": "2022-07-27T11:43:42.977Z"
},
"created_at": "2022-10-28T11:53:14.675Z",
"booking_applied_to": {
"id": "c25af1be-b643-4ef7-b66f-55124eaa224f",
"booking_reference": "testing321",
"created_at": "2022-10-20T08:39:15.843Z",
"customer_name": "Lorna",
"departure_date": "2022-11-11",
"return_date": "2022-12-31",
"email": "lorna@felloh.com",
"gross_amount": 10000
},
"booking_created_from": {
"id": "f5c48838-a45a-4c4e-b267-36c8c17b0551",
"booking_reference": "test-19126",
"created_at": "2022-08-05T14:58:20.458Z",
"customer_name": "Adam Clark",
"departure_date": null,
"return_date": null,
"email": "ad@mclark.co",
"gross_amount": 120000
}
}
}
