Documentation Index

Fetch the complete documentation index at: https://docs.restaurant365.com/llms.txt

Use this file to discover all available pages before exploring further.

/public/v1/accounting/accounts-payable/credit-memos

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

Creates one or more AP credit memos in bulk

Security
HTTP
Type Bearer

Put ONLY your JWT Bearer token on textbox below!

Body parameters
Expand All
object
creditMemos
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreateCreditMemoItem) Required
Min items1
object
creditMemoNumber
string Required

The credit memo number (business identifier).

vendorId
string (uuid) Required

The vendor identifier.

locationId
string (uuid) Required

The header location identifier.

documentDate
string (date) Required

The document date (ISO 8601 calendar date, no time component).

documentAmount
number Required

The document amount.

comment
string | null

Optional header-level comment.

details
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreateCreditMemoDetailItem) Required

The list of credit memo detail line items.

Min items1
object
glAccountId
string (uuid) | null

Optional GL account identifier. Required for GL-account rows and for by-account vendors.

locationId
string (uuid) | null

Optional location identifier for this line. Falls back to the header location when omitted.

vendorItemNumber
string | null

Optional vendor item number. Required for item rows on by-item vendors when glAccountId is not provided.

quantity
number | null

Optional quantity. Required for item rows on by-item vendors.

eachAmount
number | null

Optional unit price. Derived from totalAmount / quantity when omitted on item rows.

totalAmount
number Required

The line total amount.

unitOfMeasureId
string (uuid) | null

Optional unit of measure identifier.

comment
string | null

Optional line-level comment.

Responses
207

207 Multi-Status – per-item processing outcomes for the credit memos in the request. Inspect the per-item Status to identify successes and failures.

Expand All
object
results
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreditMemoCreateResult)

Per-item processing outcomes, one entry per credit memo in the original request (same order, matched by requestIndex).

object
requestIndex
integer

Zero-based index of this item in creditMemos array of the original request.

creditMemoNumber
string

The credit memo number echoed from the request, so callers can match the result back to the input.

status
string

Processing outcome for this item.

Valid values[ "Succeeded", "Failed" ]
creditMemoId
string (uuid) | null

Identifier of the created credit memo. Populated when status is Succeeded.

errorCode
string | null

Machine-readable error code. Populated when status is Failed (e.g. urn:r365:accounts-payable:credit-memo:create-failed).

errorMessage
string | null

Human-readable error description. Populated when status is Failed.

400

Bad request – one or more validation errors occurred.

Expand All
object
results
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreditMemoCreateResult)

Per-item processing outcomes, one entry per credit memo in the original request (same order, matched by requestIndex).

object
requestIndex
integer

Zero-based index of this item in creditMemos array of the original request.

creditMemoNumber
string

The credit memo number echoed from the request, so callers can match the result back to the input.

status
string

Processing outcome for this item.

Valid values[ "Succeeded", "Failed" ]
creditMemoId
string (uuid) | null

Identifier of the created credit memo. Populated when status is Succeeded.

errorCode
string | null

Machine-readable error code. Populated when status is Failed (e.g. urn:r365:accounts-payable:credit-memo:create-failed).

errorMessage
string | null

Human-readable error description. Populated when status is Failed.

404

Not Found – one or more referenced resources (e.g., vendor, location, GL account) could not be located. When only some items fail, a 207 is returned instead with per-item errors.

Expand All
object
results
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreditMemoCreateResult)

Per-item processing outcomes, one entry per credit memo in the original request (same order, matched by requestIndex).

object
requestIndex
integer

Zero-based index of this item in creditMemos array of the original request.

creditMemoNumber
string

The credit memo number echoed from the request, so callers can match the result back to the input.

status
string

Processing outcome for this item.

Valid values[ "Succeeded", "Failed" ]
creditMemoId
string (uuid) | null

Identifier of the created credit memo. Populated when status is Succeeded.

errorCode
string | null

Machine-readable error code. Populated when status is Failed (e.g. urn:r365:accounts-payable:credit-memo:create-failed).

errorMessage
string | null

Human-readable error description. Populated when status is Failed.

422

Unprocessable Entity – the request was well-formed but contains semantic errors and could not be processed.

Expand All
object
results
Array of object (R365.Accounting.Public.Contracts.AccountsPayable.Models.CreditMemoCreateResult)

Per-item processing outcomes, one entry per credit memo in the original request (same order, matched by requestIndex).

object
requestIndex
integer

Zero-based index of this item in creditMemos array of the original request.

creditMemoNumber
string

The credit memo number echoed from the request, so callers can match the result back to the input.

status
string

Processing outcome for this item.

Valid values[ "Succeeded", "Failed" ]
creditMemoId
string (uuid) | null

Identifier of the created credit memo. Populated when status is Succeeded.

errorCode
string | null

Machine-readable error code. Populated when status is Failed (e.g. urn:r365:accounts-payable:credit-memo:create-failed).

errorMessage
string | null

Human-readable error description. Populated when status is Failed.