Invoices
List invoices and credit notes for the authenticated customer account.
Shared conventions and base URLs live in Customer API Documentation.
API hosts: Production
https://valora.spotahome.com/(sandbox compatible); Staging / testinghttps://valora-testing.laravel.cloud/(sandbox compatible).
Endpoint (production): GET https://valora.spotahome.com/api/v1/c/invoices
Endpoint (sandbox): GET https://valora-testing.laravel.cloud/api/sandbox/v1/c/invoices
Authentication
| Requirement | Details |
|---|---|
| Type | Bearer token (long-lived API token, auth:api guard) |
| How to obtain a token | See Long-Lived API Token Authentication |
| Header | Authorization: Bearer {token} |
| Accept | Accept: application/json |
| Token class | Customer only. Non-customer users receive HTTP 403 with message Access denied. This resource is restricted to customers. from CheckCustomerApi middleware. |
| Rate limit | 120 requests per minute per authenticated customer. |
Connection test
GET https://valora.spotahome.com/api/v1/c/invoices?test=connection
Authorization: Bearer {token}
Accept: application/json
Response: 200 OK
{
"message": "You are connected!",
"accepted_params": {
"test": "Set to \"connection\" to test API connection",
"search": "string, optional (invoice holder, document type or original document)",
"issue_date_from": "date (YYYY-MM-DD), optional",
"issue_date_to": "date (YYYY-MM-DD), optional",
"amount_from": "decimal, optional (e.g., 100.50)",
"amount_to": "decimal, optional (e.g., 500.00)",
"doc_type": "string, optional (exact document type)",
"doc_number": "string, optional (exact document number)",
"booking_id": "string, optional (exact booking reference)",
"page": "integer, optional (page number, default = 1)",
"per_page": "integer, optional (items per page, default = 100, max = 500)"
}
}
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
test |
string | No | Set to connection to perform a connection test. |
search |
string | No | Search in booking_id, document_id, doc_type, invoice_to, original_doc. |
issue_date_from |
date (YYYY-MM-DD) | No | Include invoices issued on or after this date. |
issue_date_to |
date (YYYY-MM-DD) | No | Include invoices issued on or before this date. |
amount_from |
number | No | Minimum amount in major units (e.g. 100.50). Matched against amount_net or amount_gross. |
amount_to |
number | No | Maximum amount in major units. Matched against amount_net or amount_gross. |
doc_type |
string | No | Exact document type (e.g. Invoice, Credit note). |
doc_number |
string | No | Exact document number (matched against the document_id field). |
booking_id |
string | No | Exact booking reference. |
page |
integer | No | Page number. Default: 1. |
per_page |
integer | No | Items per page. Default: 100, max: 500. |
Success response
Status: 200 OK
{
"message": "Invoices retrieved successfully.",
"pagination": {
"total": 20,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"from": 1,
"to": 20
},
"data": [
{
"booking_id": "BK123456",
"document_id": "INV-2025-001",
"doc_type": "Invoice",
"invoice_to": "John Smith",
"issue_date": "2025-10-01",
"amount_net": 100000,
"amount_gross": 121000,
"currency": "EUR"
}
]
}
Invoice object
| Field | Type | Description |
|---|---|---|
booking_id |
string | Booking reference. |
document_id |
string | Document identifier. |
doc_type |
string | Document type (Invoice or Credit note). |
invoice_to |
string | Invoiced party name. |
original_doc |
string | null | Reference to the original document (credit notes only). |
issue_date |
date | Issue date. |
amount_net |
integer | Net amount in minor units (cents). |
amount_gross |
integer | Gross amount including taxes, in minor units (cents). |
currency |
string | Currency code. |
No results response
Status: 404 Not Found
Example response
{
"message": "No invoices found for the given filters.",
"pagination": {
"total": 0,
"per_page": 100,
"current_page": 1,
"last_page": 1,
"from": null,
"to": null
},
"data": []
}
Response notes
pagination.totalis0when no invoices match the filters.datais always an array.- The
404response still carries pagination metadata for consistent client handling.
Errors
| Status | Meaning |
|---|---|
404 Not Found |
No invoices matched the filters. |
{
"message": "No invoices found for the given filters.",
"data": []
}
Notes
amount_fromandamount_toaccept major units; all amounts in the response are in minor units (cents).- Results are ordered by
issue_datedescending (most recent first). doc_numberis the filter parameter name; the response field isdocument_id.