get https://apiprod.fattlabs.com/invoice
Retrieves a list of invoices for the authenticated user, displayed in a grid format. This includes all invoices tied to customers and transactions.
The GET all Invoice call returns:
- All invoices linked to the user's merchant account.
- Supports filtering and sorting by attributes like status, customer, and date.
- Includes pagination for efficient data retrieval.
Usage Notes
Pagination
- Use
per_pageandpagequery parameters to customize pagination.
Filtering
- Use the
keywords[]parameter to search for specific invoices based on:- Customer name.
- Invoice ID.
- Invoice status (e.g., SENT, PAID, VIEWED).
Response Structure
| Code | Response | Reason |
|---|---|---|
| 200 | Success | A paginated list of invoices returned. |
| 401 | Unauthorized | Authentication failed. |
| 500 | Internal Server Error | Unexpected server error. |
Note: This function cannot fail. If the user has no invoices, it will just show zero invoices.
Important Considerations
- Empty Results: If no invoices match the query, the response will indicate zero invoices rather than fail.
- Invoice Lifecycle: Statuses like DRAFT, SENT, and PAID represent the invoice's current state.
- Customer Association: Ensure invoices are linked to customers for better tracking.
