Improved
Invoices: stage replaces approvalStatus (experimental)
about 3 hours ago by ReadMe API
Invoices and credit notes now carry a stage: where they are in their lifecycle, from approval to payment. It is returned by List invoices and Get invoice, and all three invoice endpoints, the summary included, accept a stage filter.
stage | Meaning |
|---|---|
pendingApproval | Awaiting a decision in the approval workflow |
inReview | Approved, waiting for the controller review |
disputed | Approved, then put in dispute with the supplier (invoices only) |
toSettle | Reviewed: an invoice waiting for payment, fully or in part; a credit note partially allocated |
settled | An invoice fully paid; a credit note fully allocated or reimbursed |
rejected | Declined by an approver, rejected in controller review, or expired |
cancelled | Withdrawn by the company |
Without a stage filter, every stage except cancelled is returned.
Breaking change:approvalStatusis removed
approvalStatusis no longer returned on invoices, and no longer exists as a filter. Readstageinstead, and replace the filter:
approvalStatus=pending→stage=pendingApproval;approvalStatus=approved→stage=inReview&stage=toSettlefor approved invoices still to pay; adddisputedandsettledfor every approved invoice;approvalStatus=rejected→stage=rejected.A request that still sends
approvalStatusis not refused: the filter is ignored, so the list comes back unfiltered.
curl --request GET \
--url 'https://public-api.spendesk.com/v2/companies/7j6mvn11rqf7j5/invoices?stage=inReview&stage=toSettle&limit=50' \
--header 'accept: application/json' \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.masked'The recipes List the invoices due this week and Month-end close checklist use the new filter. These endpoints remain experimental (scope experimental:invoice:read).