> ## 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/accounting/v1/accounts-payable/invoices > Creates AP invoices in bulk ## OpenAPI ````json POST /public/accounting/v1/accounts-payable/invoices { "openapi": "3.0.1", "info": { "title": "R365.PublicApi", "contact": { "name": "R365 Services Team", "email": "r365@restaurant365.com" }, "version": "1.0" }, "security": [ { "Bearer": [] } ], "paths": { "/public/accounting/v1/accounts-payable/invoices": { "post": { "tags": [ "accounting" ], "description": "Creates AP invoices in bulk", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.CreateInvoicesRequest" } } } }, "responses": { "200": { "description": "Invoices created successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.CreateInvoicesResponse" } } } }, "207": { "description": "Multi-Status – batch operation result containing per-invoice success or failure.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.CreateInvoicesResponse" } } } }, "400": { "description": "Bad request – one or more validation errors occurred." }, "401": { "description": "Unauthorized – authentication credentials are missing or invalid." }, "403": { "description": "Forbidden – the caller does not have permission to perform this operation." }, "422": { "description": "Unprocessable Content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/R365.Accounting.Public.Models.R365Error" } } } } } } } }, "components": { "schemas": { "R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.CreateInvoicesRequest": { "required": [ "invoices" ], "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateItem" }, "description": "The list of AP invoices to create." } }, "additionalProperties": false }, "R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.CreateInvoicesResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.InvoiceCreateResult" }, "description": "Per-invoice results for the batch operation." } }, "additionalProperties": false }, "R365.Accounting.Public.Models.R365Error": { "type": "object", "properties": { "errorCode": { "type": "string", "nullable": true }, "innerError": { "$ref": "#/components/schemas/R365.Accounting.Public.Models.R365Error" } } }, "R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateItem": { "required": [ "invoiceNumber", "vendorId", "locationId", "documentDate", "documentAmount" ], "type": "object", "properties": { "invoiceNumber": { "type": "string", "description": "The invoice number. Required." }, "vendorId": { "type": "string", "description": "The identifier of the vendor. Required.", "format": "uuid" }, "locationId": { "type": "string", "description": "The identifier of the location. Required.", "format": "uuid" }, "documentDate": { "type": "string", "description": "The document date. Required.", "format": "date" }, "documentAmount": { "type": "number", "description": "The document amount. Required.", "format": "decimal" }, "dueDate": { "type": "string", "description": "Optional due date.", "format": "date", "nullable": true }, "comment": { "type": "string", "description": "Optional comment.", "nullable": true }, "paymentTermsId": { "type": "string", "description": "Optional payment terms identifier.", "format": "uuid", "nullable": true }, "purchaseOrderId": { "type": "string", "description": "Optional purchase order identifier.", "format": "uuid", "nullable": true }, "markAsPaid": { "type": "boolean", "description": "Indicates whether to mark the invoice as paid.", "nullable": true }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateDetailItem" }, "description": "The list of invoice detail line items." } }, "additionalProperties": false }, "R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Responses.InvoiceCreateResult": { "type": "object", "properties": { "requestIndex": { "type": "integer", "description": "Zero-based index of the invoice in the original request array.", "format": "int32" }, "invoiceNumber": { "type": "string", "description": "The invoice number from the original request." }, "status": { "type": "string", "description": "Result status of this invoice. Valid values: Unknown, Succeeded, Failed." }, "errorCode": { "type": "string", "description": "Error code if the invoice failed, otherwise null.", "nullable": true }, "errorMessage": { "type": "string", "description": "Human-readable error message if the invoice failed, otherwise null.", "nullable": true }, "id": { "type": "string", "description": "The identifier of the created invoice if succeeded, otherwise null.", "format": "uuid", "nullable": true } }, "additionalProperties": false }, "R365.Accounting.AccountsPayable.Contracts.Invoice.Apis.Requests.InvoiceCreateDetailItem": { "required": [ "totalAmount" ], "type": "object", "properties": { "glAccountId": { "type": "string", "description": "Optional GL account identifier.", "format": "uuid", "nullable": true }, "locationId": { "type": "string", "description": "Optional location identifier.", "format": "uuid", "nullable": true }, "vendorItemNumber": { "type": "string", "description": "Optional vendor item number.", "nullable": true }, "quantity": { "type": "number", "description": "The quantity. Optional when totalAmount is provided.", "format": "decimal", "nullable": true }, "eachAmount": { "type": "number", "description": "The unit price. Optional when totalAmount is provided.", "format": "decimal", "nullable": true }, "totalAmount": { "type": "number", "description": "The total amount for this line item. Required.", "format": "decimal" }, "unitOfMeasureId": { "type": "string", "description": "Optional unit of measure identifier.", "format": "uuid", "nullable": true }, "comment": { "type": "string", "description": "Optional comment.", "nullable": true } }, "additionalProperties": false } }, "securitySchemes": { "Bearer": { "type": "http", "description": "Put **_ONLY_** your JWT Bearer token on textbox below!", "scheme": "Bearer", "bearerFormat": "JWT" } } } } ````