Skip to main content
Automatically processing an invoice requires three steps: retrieving inbox documents, updating the invoice information, and booking it.
The document inbox holds invoice documents that have been uploaded or received but not yet validated and booked into accounting. Booking an invoice means marking it as validated and ready for accounting.
1

Retrieve inbox documents

Use the GET /cleemy-procurement/services/inbox endpoint to list documents in the inbox.Results are paginated with a maximum of 1000 items per page. To retrieve all documents, proceed in two passes:1. Get the total count by requesting only the count field along with your filters:
GET /cleemy-procurement/services/inbox?fields.root=count&{your_filters} HTTP/2
Host: example.ilucca.net
Authorization: lucca application={API_KEY}
Accept: application/json
The list of supported filters can be found in the API Reference.
2. Fetch all pages by looping from page 1 until the number of items retrieved matches the total count:
GET /cleemy-procurement/services/inbox?limit=100&page={pageNumber}&{your_filters} HTTP/2
Host: example.ilucca.net
Authorization: lucca application={API_KEY}
Accept: application/json
Use the same filters on both calls so the count matches the actual results.
For more details, see the Inbox-document resource page.
2

Update the invoice information

Before booking, you may need to update the invoice data (e.g., accounting fields, amounts, or supplier info). For this, use PUT /cleemy-procurement/services/inbox-documents/{id}:
PUT /cleemy-procurement/services/inbox-documents/{id} HTTP/2
Host: example.ilucca.net
Authorization: lucca application={API_KEY}
Content-Type: application/json
Accept: application/json

{
    "field": "updatedValue"
}
This is a PUT request — you must send the complete resource representation, not just the fields you want to change.
3

Book the invoice

Once the invoice information is complete, book it by calling POST /cleemy-procurement/services/inbox-documents/{id}/book. No request body is needed.
POST /cleemy-procurement/services/inbox-documents/{id}/book HTTP/2
Host: example.ilucca.net
Authorization: lucca application={API_KEY}
Accept: application/json
Content-Length: 0