Invoices
Get energy invoice data from the Fiskil API.
AI Actions
The Invoices endpoint provides access to energy bill/invoice data.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/invoices | Get invoices for an end user |
The Invoice Model
| Attribute | Type | Description |
|---|---|---|
id | string | Unique invoice identifier |
account_id | string | ID of the energy account |
invoice_number | string | Invoice reference number |
issue_date | string | Date the invoice was issued |
due_date | string | Payment due date |
period_start | string | Billing period start date |
period_end | string | Billing period end date |
total_amount | number | Total invoice amount |
currency | string | Currency code |
status | string | Invoice status (PAID, UNPAID, OVERDUE) |
Example Response
{
"id": "inv_123",
"account_id": "energy_acc_123",
"invoice_number": "INV-2023-001234",
"issue_date": "2023-01-01",
"due_date": "2023-01-15",
"period_start": "2022-12-01",
"period_end": "2022-12-31",
"total_amount": 185.50,
"currency": "AUD",
"status": "PAID"
}Get Invoices
Retrieve invoice data for an end user's energy accounts.
GET https://api.fiskil.com/v1/invoicesQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
end_user_id | string | Yes | The ID of the end user |
account_id | string | No | Filter by specific account ID |
status | string | No | Filter by status (PAID, UNPAID, OVERDUE) |
page[size] | integer | No | Number of results (max 1000) |
page[after] | string | No | Cursor for pagination |
Example Request
curl --request GET \
--url 'https://api.fiskil.com/v1/invoices?end_user_id=482c0e2b-5866-46b1-b795-220b7bba45b5' \
--header 'Authorization: Bearer {access_token}' \
--header 'accept: application/json; charset=UTF-8'const response = await fetch(
'https://api.fiskil.com/v1/invoices?end_user_id=482c0e2b-5866-46b1-b795-220b7bba45b5',
{
method: 'GET',
headers: {
'Authorization': 'Bearer {access_token}',
'accept': 'application/json; charset=UTF-8'
}
}
);
const invoices = await response.json();import requests
response = requests.get(
'https://api.fiskil.com/v1/invoices',
params={'end_user_id': '482c0e2b-5866-46b1-b795-220b7bba45b5'},
headers={
'Authorization': 'Bearer {access_token}',
'accept': 'application/json; charset=UTF-8'
}
)
invoices = response.json()Example Response
{
"data": [
{
"id": "inv_123",
"account_id": "energy_acc_123",
"invoice_number": "INV-2023-001234",
"issue_date": "2023-01-01",
"due_date": "2023-01-15",
"period_start": "2022-12-01",
"period_end": "2022-12-31",
"total_amount": 185.50,
"currency": "AUD",
"status": "PAID"
},
{
"id": "inv_124",
"account_id": "energy_acc_123",
"invoice_number": "INV-2023-001235",
"issue_date": "2023-02-01",
"due_date": "2023-02-15",
"period_start": "2023-01-01",
"period_end": "2023-01-31",
"total_amount": 198.75,
"currency": "AUD",
"status": "UNPAID"
}
]
}Invoice Statuses
| Status | Description |
|---|---|
PAID | Invoice has been fully paid |
UNPAID | Invoice is pending payment |
OVERDUE | Invoice is past due date |
PARTIAL | Invoice is partially paid |
Related Endpoints
- Billing - Get billing transactions
- Energy Balances - Get current balance
Was this page helpful?