Download a settlement PDF
Minimum role: ADMIN. Active workspace via the X-Workspace-Id header. Files live in a private bucket, so the response is a 302 to a signed URL valid for 5 minutes (the client must follow the redirect; the storage_path is never exposed). Only settlements visible to the organization (SENT, AWAITING_PAYMENT, PAID) and within the key’s event_scope.
/settlements/{id}/documentAuthorizationAPI key · headerrequiredAPI key prefixed with Bearer . Alternative: the x-api-key header with the raw key. Available scopes: read and write (see /.well-known/oauth-protected-resource).
x-api-keyAPI key · headerrequiredRaw API key (without Bearer ), alternative to Authorization.
idstringrequiredX-Workspace-IdstringActive workspace to operate on. Optional: when omitted, the default workspace of the user who owns the key is used (pickActiveOrg).
Redirect to the signed URL (5 min TTL) of the PDF, with Content-Disposition: attachment.
Invalid or missing credential.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyInsufficient role (< ADMIN).
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanySettlement does not exist, belongs to another organization, is out of scope, or has no document yet.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyCould not sign the storage URL.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsanyStorage is not configured.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredretryablebooleanrequireddetailsany
