AP Credit Memos

Prev Next
Patch
/public/v1/accounting/accounts-payable/credit-memos

Updates one or more AP credit memos. Currently supports updating the approval status to Approved.

Returns 207 for every processed request, whether all items succeeded, some succeeded, or none did. Check the status field of each entry in results[] rather than the HTTP status code. Failures are isolated — a failed item does not prevent the others from being applied.

Security

The requesting user must have the following permission to approve AP credit memos:

  • Accounts Payable → AP Credit Memos → Approve AP Credit Memos

Approve and create are separate permissions — this permission does not grant create rights.

Security
HTTP
Type Bearer
Header parameters
x-r365-context-tenant-id
stringRequired

Identifies the R365 tenant the request applies to. Required on every request.

Body parameters
Expand All
object
creditMemos
Array of object (PatchCreditMemoItem) Required
Min items1
object
id
string (uuid) Required

Identifier of the credit memo to update.

approvalStatus
string Required

The approval status to set on the credit memo.

Valid values[ "Approved" ]
Responses
207

Per-item outcomes. This endpoint returns 207 for every processed request — including when every item succeeded and when every item failed — so the HTTP status is not a success indicator. Inspect each entry in results[] and check its status field.

Expand All
object

Per-item outcomes for the submitted batch.

results
Array of object (CreditMemoPatchResult)

One entry per submitted credit memo, in request order.

object

Outcome for one credit memo in the batch.

requestIndex
integer (int32)

Zero-based position of this item in the submitted creditMemos array.

creditMemoId
string (uuid)

Identifier of the credit memo this result refers to. Echoed back even when the id was not found.

status
string

Outcome for this item.

Valid values[ "Succeeded", "Failed" ]
errorCode
string | null

Machine-readable failure reason when status is Failed; null on success. Observed values: ENTITY_NOT_FOUND, APPROVE_FAILED, INVALID_FIELD_VALUE.

errorMessage
string | null

Human-readable failure reason when status is Failed; null on success.

400

Bad Request — a parameter value is malformed, of the wrong type, or outside its allowed range.

401

Unauthorized — the bearer token is missing, invalid or expired, or is not valid for the specified tenant.

403

Forbidden — the caller lacks the permission required for this operation.

404

Not Found — the requested resource does not exist, or the supplied continuation token is unknown or has expired.

409

Conflict — the request conflicts with the current state of the resource and cannot be applied.

422

Unprocessable Entity — a required parameter is missing, or a supplied parameter value is invalid.

429

Too Many Requests — the caller has exceeded the rate limit; retry after a short delay.

500

Internal Server Error — an unexpected error occurred while processing the request.