Improved
Larger batches, clearer errors and webhook delivery
about 14 hours ago by ReadMe API
Since October, integrations can send more in one call, understand a refused call from its message, and no longer lose webhook events.
Larger batches
| Request | Now accepts |
|---|---|
| Bookkeeping status updates of payables, state updates of settlements | 50 per call |
| Supplier create, update, archive and unarchive | 100 per call |
| Account sync / account patch | 500 / 100 accounts per call |
| Payable update | 1,000 line items |
| Purchase order create | more than 11 line items |
| Payable search, creditor assignment, external references | bodies above the former 2 KiB limit |
Clearer errors — see Error handling:
- validation errors list the allowed values; refusals from accounting, suppliers and purchase orders give the reason;
- an answer too large to send is a
400 RESPONSE_TOO_LARGE(narrow the request) instead of a500; - a body with the wrong
Content-Typeis a415 UNSUPPORTED_MEDIA_TYPE_ERROR; - a failed journal export is a
422 EXPORT_FAILEDwith the reason; - a
401says when the access token has expired, and every429carriesRetry-After; - the token endpoints answer
invalid_request,invalid_client,invalid_grantorinvalid_scope— see How to authenticate.
Webhooks — when a company has several webhooks on the same event and one is down, the others still receive it; only the failing ones are retried and disabled. See Using webhooks.
curl --request PATCH \
--url https://public-api.spendesk.com/v1/experimental/suppliers/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{"isArchived":true,"supplierIds":["<id 1>","<id 2>"]}'