Invoices
List invoices (paged)
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| page | query | integer | |
| limit | query | integer | |
| client_id | query | integer | |
| status | query | string |
Example request
curl "https://YOUR-HOST/api/v1/invoices" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/invoices",
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/invoices", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/invoices");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Paged invoice list
| Field | Type | Description |
|---|---|---|
| data | array of object | |
| data[].id | integer | |
| data[].number | string | |
| data[].date | string | |
| data[].due_date | string | |
| data[].status | string | |
| data[].total | number | |
| data[].client | string | |
| data[].guest_url | string | |
| total | integer |
Example response
json
{
"data": [
{
"id": 1,
"number": "string",
"date": "string",
"due_date": "string",
"status": "string",
"total": 1.5,
"client": "string",
"guest_url": "string"
}
],
"total": 1
}
403Authenticated but not permitted
| Field | Type | Description |
|---|---|---|
| error | string |
Invoice detail with line items
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| idrequired | path | integer |
Example request
curl "https://YOUR-HOST/api/v1/invoices/1" \
-H "Authorization: Bearer $TOKEN"
import requests
response = requests.get(
"https://YOUR-HOST/api/v1/invoices/1",
headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/invoices/1", {
method: "GET",
headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/invoices/1");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);
Responses
200Invoice detail
| Field | Type | Description |
|---|---|---|
| id | integer | |
| number | string | |
| date | string | |
| due_date | string | |
| status | string | |
| total | number | |
| client | string | |
| guest_url | string | |
| subtotal | number | |
| tax | number | |
| notes | string | |
| items | array of object | |
| items[].description | string | |
| items[].quantity | number | |
| items[].unit_price | number | |
| items[].total | number | |
| items[].taxable | boolean |
Example response
json
{
"id": 1,
"number": "string",
"date": "string",
"due_date": "string",
"status": "string",
"total": 1.5,
"client": "string",
"guest_url": "string",
"subtotal": 1.5,
"tax": 1.5,
"notes": "string",
"items": [
{
"description": "string",
"quantity": 1.5,
"unit_price": 1.5,
"total": 1.5,
"taxable": true
}
]
}
404Resource not found
| Field | Type | Description |
|---|---|---|
| error | string |