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.

Invoices

Prev Next
Post
/public/v1/accounting/accounts-payable/invoices

Creates one or more AP invoices in batch. Each invoice's detail lines are either GL-account-based or item-based, determined by the vendor's entry type — not by a request flag. For by-account vendors, every detail line requires glAccountId. For by-item vendors, every detail line requires either glAccountId (for a GL-account row) or vendorItemNumber plus quantity (for an item row). See the field-level notes on glAccountId, vendorItemNumber, quantity, and eachAmount for the exact requirements in each mode.

Security
HTTP
Type Bearer

Put ONLY your JWT Bearer token on textbox below!

Body parameters
Expand All
object
invoices
Array of object (R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateItem) Required

The list of AP invoices to create.

object
invoiceNumber
string Required

The invoice number. Required.

vendorId
string (uuid) Required

The identifier of the vendor. Required.

locationId
string (uuid) Required

The identifier of the location. Required.

documentDate
string (date) Required

The document date. Required.

documentAmount
number (decimal) Required

The document amount. Required.

dueDate
string (date) | null

Optional due date.

comment
string | null

Optional comment.

paymentTermsId
string (uuid) | null

Optional payment terms identifier.

purchaseOrderId
string (uuid) | null

Optional purchase order identifier.

markAsPaid
boolean | null

Indicates whether to mark the invoice as paid.

details
Array of object (R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateDetailItem)

The list of invoice detail line items.

object
glAccountId
string (uuid) | null

Optional GL account identifier. Required for GL-account rows and for by-account vendors. For by-item vendors, either this or vendorItemNumber must be provided.

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 (decimal) | null

Optional quantity. Required for item rows on by-item vendors when glAccountId is not provided. Must be greater than zero.

eachAmount
number (decimal) | null

Optional unit price. Derived from totalAmount divided by quantity when omitted on item rows. Must be greater than zero when supplied.

totalAmount
number (decimal) Required

The total amount for this line item. Required.

unitOfMeasureId
string (uuid) | null

Optional unit of measure identifier.

comment
string | null

Optional line-level comment.

Responses
207

Multi-Status – batch operation result containing per-invoice success or failure.

Expand All
object
results
Array of object (R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.InvoiceCreateResult)

Per-invoice results for the batch operation.

object
requestIndex
integer (int32)

Zero-based index of the invoice in the original request array.

invoiceNumber
string

The invoice number from the original request.

status
string

Result status of this invoice. Valid values: Unknown, Succeeded, Failed.

errorCode
string | null

Error code if the invoice failed, otherwise null.

errorMessage
string | null

Human-readable error message if the invoice failed, otherwise null.

id
string (uuid) | null

The identifier of the created invoice if succeeded, otherwise null.

400

Bad request – one or more validation errors occurred.

401

Unauthorized – authentication credentials are missing or invalid.

403

Forbidden – the caller does not have permission to perform this operation.