Credit Notes
The credit note object represents credit notes created against a booking.
An example of the credit note object
{"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}}
iduuid
The unique uuid of the credit note
short_idstring
A shorter more user friendly ID that you can share with your customers
customer_namestring
The name of the customer that the credit note is for
amountinteger
The amount that the credit note is for
descriptionstring
A description of what the credit note was for
currencystring
The currency that the credit note is in | see currency documentation for more information
organisationobject
A compact organisation object representing the organisation owner of the payment link.
booking_applied_toobject
The booking object that the credit note was applied to
booking_created_fromobject
The booking object that the credit note was created from
Fetch all
POST/agent/credit-notes
import axios from 'axios';const response = await axios({method: 'post',url: 'https://api.felloh.com/agent/credit-notes',data: {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}}
This endpoint retrieves all credit notes for an organisation.
HTTP Method
POST
HTTP Endpoint
PRODhttps://api.felloh.com/agent/credit-notes
SANDBOXhttps://sandbox.felloh.com/agent/credit-notes
Payload
Parameter | Required | Type | Description |
---|---|---|---|
organisation | true | string | The organisation ID that you want to fetch credit notes for. You can find the organisation that you have access to by using the List all organisations method. |
skip | false | Integer | See pagination section for details |
take | false | Integer | See pagination section for details |
Response
Returns an array of Credit Notes Objects
Fetch one
GET/agent/credit-notes/226009ab-ffe9-4c80-922b-982e8e7849f8
import axios from 'axios';const creditNoteID = '59e904da-e2da-446b-867c-4403503b482f';const response = await axios({method: 'get',url: `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}}}
This endpoint allows you to retrieve a single credit note based on its ID.
HTTP Method
GET
HTTP Endpoint
PRODhttps://api.felloh.com/agent/credit-notes/<CREDIT NOTE ID>
SANDBOXhttps://sandbox.felloh.com/agent/credit-notes/<CREDIT NOTE ID>
Path Parameters
Parameter | Required | Type | Description |
---|---|---|---|
id | true | UUID | The credit note id that you wish to retrieve |
Response
Returns a Credit Note Object