Vendor Credits
Required scope: documents:write
Plannable: yes. An agent can use this operation as a step in a plan.
Error codes: DOCUMENT_NOT_FOUND, VALIDATION_FAILED, CREDIT_NOT_FULLY_APPLIED, CREDIT_HAS_ACTIVE_APPLICATIONS, LEGAL_ENTITY_MISMATCH, PARTY_MISMATCH, CURRENCY_MISMATCH, DOCUMENT_STATUS_FORBIDS_ACTION, LEGAL_ENTITY_NOT_IN_SCOPE, IDEMPOTENCY_KEY_REQUIRED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT
access-tokenAuthorizationBearer <token>id*stringIdempotency-Key*stringClient-chosen key that makes this mutation safe to retry. Required — a request without one is rejected with IDEMPOTENCY_KEY_REQUIRED. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.
^[A-Za-z0-9_-]{1,255}$length <= 255application/json- body
applications*array<>One row per target. Sum of amounts must equal the credit's remaining balance.
application/json- response
data*meta*curl -X POST 'https://api.acreum.io/v1/vendor-credits/string/apply' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "applications": [ { "amount": "100.00", "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6" } ]}'{ "data": { "applications": [ { "applied_amount": "100.00", "applied_at": "2019-08-24T14:15:22Z", "applied_document_id": "149f34b8-0f1d-4789-a113-13a4b4315226", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "payment_document_id": "c0e84883-37cf-4eff-ab7a-c5ce998065ab", "unapplied_at": "2019-08-24T14:15:22Z" } ], "balance_amount": "0.00", "document_type": "credit_memo", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "posted" }, "meta": { "api_version": "2026-04-23", "cursor": { "has_more": true, "next": "eyJpZCI6ICJhYmMifQ==" }, "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f", "total_count": 1234 }}Required scope: documents:write
Error codes: DOCUMENT_NOT_FOUND, VALIDATION_FAILED, DOCUMENT_STATUS_FORBIDS_ACTION, DOCUMENT_RECONCILED_CANNOT_CHANGE, DOCUMENT_REFUNDS_EXCEED_REMAINING_PAYMENTS, LEGAL_ENTITY_NOT_IN_SCOPE, IDEMPOTENCY_KEY_REQUIRED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT
access-tokenAuthorizationBearer <token>id*stringIdempotency-Key*stringClient-chosen key that makes this mutation safe to retry. Required — a request without one is rejected with IDEMPOTENCY_KEY_REQUIRED. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.
^[A-Za-z0-9_-]{1,255}$length <= 255application/json- response
data*meta*curl -X POST 'https://api.acreum.io/v1/vendor-credits/string/reverse-apply' \ -H 'Idempotency-Key: string'{ "data": { "applications": [ { "applied_amount": "100.00", "applied_at": "2019-08-24T14:15:22Z", "applied_document_id": "149f34b8-0f1d-4789-a113-13a4b4315226", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "payment_document_id": "c0e84883-37cf-4eff-ab7a-c5ce998065ab", "unapplied_at": "2019-08-24T14:15:22Z" } ], "balance_amount": "0.00", "document_type": "credit_memo", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "posted" }, "meta": { "api_version": "2026-04-23", "cursor": { "has_more": true, "next": "eyJpZCI6ICJhYmMifQ==" }, "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f", "total_count": 1234 }}