Get Invoices
The Get invoices endpoint can be used to retrieve up to 100 invoice
objects from the Helcim system based on a range of query parameters. If no query parameter is passed, the Helcim system will return the 100 most recent invoices.
Get Invoices Requests
The Get invoice endpoint takes a range of query parameters, in order to return relevant invoice
objects in the Helcim system, that meet the query parameters.
The query parameters this endpoint will accept, include:
- The
invoiceNumber
parameter will return an array containing a single relevantinvoice
object if one exists. - The
dateStart
anddateEnd
parameters will return an array containing up to 100 of the most recent invoices created within the provided date range. ThedateStart
anddateEnd
values cannot be the same date. - The
withConvenienceFee
parameter will return an array containing up to 100 of the most recent invoices with or without Helcim Fee-Saver, based on the value passed.
Review Get Invoices API Reference
const options = {
method: 'GET',
headers: {
accept: 'application/json',
'api-token': 'YOUR_API_TOKEN'
}
};
fetch('https://api.helcim.com/v2/invoices/?invoiceNumber=INV001000&dateStart=2020-01-01&dateEnd=2021-01-01', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
Potential Responses
A request to the Get invoices endpoint will return either:
- An array containing up to 100 of the most recent
invoice
objects that meet the query parameters passed. All objects are returned in chronological order based on theirdateCreated
value. - A status 404 response containing an empty array, if no
invoice
objects meet the query parameters passed.
// Example of Get invoices array containing invoice objects
[
{
"invoiceId": 39549794,
"invoiceNumber": "INV1475",
"token": "b96702ed22b513bd96eff5",
"tipAmount": 10,
"depositAmount": 200,
"notes": "",
"dateCreated": "2024-07-15 15:00:01",
"dateUpdated": "2024-07-15 15:00:01",
"datePaid": "0000-00-00 00:00:00",
"dateIssued": "2024-07-15 15:00:01",
"status": "DUE",
"customerId": 0,
"amount": 70,
"currency": "CAD",
"type": "INVOICE",
"convenienceFee": 0
},
{
"invoiceId": 39549706,
"invoiceNumber": "INV1474",
"token": "4a288b0f6007e100538018",
"tipAmount": 10,
"depositAmount": 10,
"notes": "",
"dateCreated": "2024-07-15 14:57:52",
"dateUpdated": "2024-07-15 14:59:29",
"datePaid": "2024-07-15 14:59:29",
"dateIssued": "2024-07-15 14:57:52",
"status": "PAID",
"customerId": 18795532,
"amount": 70,
"currency": "CAD",
"type": "INVOICE",
"convenienceFee": 0
}
]
Updated about 2 months ago