Improved

Larger batches, clearer errors and webhook delivery

Since October, integrations can send more in one call, understand a refused call from its message, and no longer lose webhook events.

Larger batches

RequestNow accepts
Bookkeeping status updates of payables, state updates of settlements50 per call
Supplier create, update, archive and unarchive100 per call
Account sync / account patch500 / 100 accounts per call
Payable update1,000 line items
Purchase order createmore than 11 line items
Payable search, creditor assignment, external referencesbodies 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 a 500;
  • a body with the wrong Content-Type is a 415 UNSUPPORTED_MEDIA_TYPE_ERROR;
  • a failed journal export is a 422 EXPORT_FAILED with the reason;
  • a 401 says when the access token has expired, and every 429 carries Retry-After;
  • the token endpoints answer invalid_request, invalid_client, invalid_grant or invalid_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>"]}'