> ## 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. # AP Invoices > Retrieves invoices. If no filter of any kind is supplied, results are limited to the current day (UTC). **Security** The requesting user must have one of the following permissions to retrieve AP invoices: - Accounts Payable → AP Invoices → View AP Invoices Within Accounting - Food → AP Invoices → View AP Invoices Within Food _Restricted-record access:_ the response excludes records that reference a restricted GL account or a restricted vendor unless the user also has: - General Ledger → GL Accounts → Access Restricted GL Accounts - Accounts Payable → Vendors → Access Restricted Vendors ## OpenAPI ````json GET /public/v1/accounting/accounts-payable/invoices { "openapi": "3.0.1", "info": { "title": "R365 Public API", "contact": { "name": "R365 Services Team", "email": "r365@restaurant365.com" }, "version": "1.0" }, "security": [ { "Bearer": [] } ], "paths": { "/public/v1/accounting/accounts-payable/invoices": { "get": { "tags": [ "accounting" ], "summary": "AP Invoices", "description": "Retrieves invoices. If no filter of any kind is supplied, results are limited to the current day (UTC).\n\n**Security**\n\nThe requesting user must have one of the following permissions to retrieve AP invoices:\n\n- Accounts Payable → AP Invoices → View AP Invoices Within Accounting\n- Food → AP Invoices → View AP Invoices Within Food\n\n_Restricted-record access:_ the response excludes records that reference a restricted GL account or a restricted vendor unless the user also has:\n\n- General Ledger → GL Accounts → Access Restricted GL Accounts\n- Accounts Payable → Vendors → Access Restricted Vendors", "parameters": [ { "$ref": "#/components/parameters/TenantId" }, { "name": "ModifiedOnStart", "in": "query", "description": "Modified date start (inclusive)", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "name": "ModifiedOnEnd", "in": "query", "description": "Modified date end (inclusive)", "required": false, "schema": { "type": "string", "format": "date-time" } }, { "name": "DateStart", "in": "query", "description": "Document date start (inclusive).", "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "DateEnd", "in": "query", "description": "Document date end (inclusive).", "required": false, "schema": { "type": "string", "format": "date" } }, { "name": "Status", "in": "query", "description": "Status. Valid values: Approved, Unapproved", "required": false, "schema": { "type": "string" } }, { "name": "InvoiceNumbers", "in": "query", "description": "Invoice numbers (comma-separated)", "required": false, "schema": { "type": "string" } }, { "name": "InvoiceIds", "in": "query", "description": "Invoice IDs (comma-separated UUIDs)", "required": false, "schema": { "type": "string" } }, { "name": "pageSize", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 250, "default": 250 }, "description": "Maximum number of top-level objects to return in one page." }, { "name": "ContinuationToken", "in": "query", "description": "Continuation token for pagination. Use the nextLink from a previous response to get the next page of results", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Invoice query results.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryInvoicesResponse" } } } }, "400": { "description": "Bad Request — a parameter value is malformed, of the wrong type, or outside its allowed range." }, "401": { "description": "Unauthorized — the bearer token is missing, invalid or expired, or is not valid for the specified tenant." }, "403": { "description": "Forbidden — the caller lacks the permission required for this operation." }, "404": { "description": "Not Found — the requested resource does not exist, or the supplied continuation token is unknown or has expired." }, "409": { "description": "Conflict — the request conflicts with the current state of the resource and cannot be applied." }, "422": { "description": "Unprocessable Entity — a required parameter is missing, or a supplied parameter value is invalid." }, "429": { "description": "Too Many Requests — the caller has exceeded the rate limit; retry after a short delay." }, "500": { "description": "Internal Server Error — an unexpected error occurred while processing the request." } } } } }, "components": { "parameters": { "TenantId": { "name": "x-r365-context-tenant-id", "in": "header", "required": true, "description": "Identifies the R365 tenant the request applies to. Required on every request.", "schema": { "type": "string" } } }, "schemas": { "QueryInvoicesResponse": { "type": "object", "properties": { "invoices": { "type": "array", "items": { "$ref": "#/components/schemas/Invoice" }, "description": "The collection of invoices for the current page.", "nullable": true }, "nextLink": { "type": "string", "description": "The URL to retrieve the next page of results, or null if this is the last page.", "nullable": true } }, "additionalProperties": false, "description": "Paginated response containing queried invoices." }, "Invoice": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the invoice.", "format": "uuid" }, "invoiceNumber": { "type": "string", "description": "Vendor-assigned invoice number.", "nullable": true }, "location": { "$ref": "#/components/schemas/InvoiceLocationReference" }, "vendor": { "$ref": "#/components/schemas/InvoiceVendorReference" }, "documentDate": { "type": "string", "description": "Date printed on the invoice document.", "format": "date", "nullable": true }, "documentAmount": { "type": "number", "description": "Total amount of the invoice.", "format": "double" }, "comment": { "type": "string", "description": "Free-text comment or memo on the invoice.", "nullable": true }, "status": { "type": "string", "description": "Approval status of the invoice. Values are \"Approved\", \"Unapproved\".", "nullable": true }, "amount1099": { "type": "number", "description": "Amount reported on Form 1099, if applicable.", "format": "double", "nullable": true }, "form1099": { "type": "string", "description": "Form 1099 type applied to this invoice.", "nullable": true }, "box1099": { "type": "string", "description": "Form 1099 box this invoice amount is reported in.", "nullable": true }, "paymentTerms": { "type": "string", "description": "Payment terms name applied to this invoice.", "nullable": true }, "dueDate": { "type": "string", "description": "Date the invoice payment is due.", "format": "date", "nullable": true }, "isPaid": { "type": "boolean", "description": "Indicates whether the invoice has been fully paid." }, "purchaseOrder": { "$ref": "#/components/schemas/InvoicePurchaseOrderReference" }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDetail" }, "description": "Line items for this invoice, included when IncludeDetails is true in the request.", "nullable": true }, "distributions": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceDistributionLine" }, "description": "GL distribution lines for this invoice, included when IncludeDistributions is true in the request.", "nullable": true }, "createdOn": { "type": "string", "description": "Timestamp when the invoice was created.", "format": "date-time", "nullable": true }, "createdBy": { "$ref": "#/components/schemas/InvoiceUserReference", "description": "User who created the invoice." }, "modifiedOn": { "type": "string", "description": "Timestamp of the most recent modification.", "format": "date-time", "nullable": true }, "modifiedBy": { "$ref": "#/components/schemas/InvoiceUserReference", "description": "User who last modified the invoice." }, "approvedOn": { "type": "string", "description": "Timestamp when the invoice was approved.", "format": "date-time", "nullable": true }, "approvedBy": { "$ref": "#/components/schemas/InvoiceUserReference", "description": "User who approved the invoice." }, "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/InvoiceTransactionAttachment" }, "description": "Files attached to this invoice.", "nullable": true } }, "additionalProperties": false, "description": "Invoice model for the query invoices public API response." }, "InvoiceLocationReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the location.", "format": "uuid" }, "name": { "type": "string", "description": "Display name of the location.", "nullable": true }, "number": { "type": "string", "description": "Location number.", "nullable": true }, "legalEntity": { "$ref": "#/components/schemas/InvoiceLegalEntityReference" } }, "additionalProperties": false, "description": "Location reference with optional legal entity." }, "InvoiceVendorReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the vendor.", "format": "uuid" }, "name": { "type": "string", "description": "Vendor display name (check name).", "nullable": true }, "number": { "type": "string", "description": "Vendor account number.", "nullable": true }, "entryType": { "type": "string", "nullable": true, "enum": [ "ByAccount", "ByItem" ], "description": "How the vendor's transactions are entered. Present on every invoice." } }, "additionalProperties": false, "description": "Vendor reference with id, name (CheckName), and number (AccountNumber)." }, "InvoicePurchaseOrderReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the purchase order.", "format": "uuid" }, "number": { "type": "string", "description": "Purchase order number.", "nullable": true } }, "additionalProperties": false, "description": "Purchase order reference." }, "InvoiceDetail": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the detail line.", "format": "uuid" }, "glAccount": { "$ref": "#/components/schemas/InvoiceGlAccountReference" }, "location": { "$ref": "#/components/schemas/InvoiceLocationReference" }, "comment": { "type": "string", "description": "Free-text comment on this line.", "nullable": true }, "total": { "type": "number", "description": "Total amount for this line.", "format": "double", "nullable": true }, "item": { "$ref": "#/components/schemas/InvoiceInventoryItemReference" }, "uom": { "$ref": "#/components/schemas/InvoiceUomReference" }, "quantity": { "type": "number", "description": "Quantity for this line. Populated for item-based entries only.", "format": "double", "nullable": true }, "eachAmount": { "type": "number", "description": "Unit cost for this line. Populated for item-based entries only.", "format": "double", "nullable": true }, "vendorItemNumber": { "type": "string", "description": "Vendor-specific item number. Populated for item-based entries only.", "nullable": true } }, "additionalProperties": false, "description": "Invoice detail line for the query invoices public API response. Covers both item-based and GL-based entries." }, "InvoiceDistributionLine": { "type": "object", "properties": { "glAccount": { "$ref": "#/components/schemas/InvoiceGlAccountReference" }, "debit": { "type": "number", "description": "Debit amount on this distribution line. Zero when the line is a credit.", "format": "double" }, "credit": { "type": "number", "description": "Credit amount on this distribution line. Zero when the line is a debit.", "format": "double" }, "comment": { "type": "string", "description": "Comment on this distribution line.", "nullable": true }, "location": { "$ref": "#/components/schemas/InvoiceLocationReference" } }, "additionalProperties": false, "description": "A single GL distribution line for a posted transaction." }, "InvoiceUserReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the entity.", "format": "uuid" }, "name": { "type": "string", "description": "Display name of the entity.", "nullable": true } }, "additionalProperties": false, "description": "User reference." }, "InvoiceTransactionAttachment": { "type": "object", "properties": { "id": { "type": "integer", "description": "Numeric identifier of the attachment.", "format": "int32" }, "storageFileName": { "type": "string", "description": "Internal storage key or path for the file.", "nullable": true }, "filename": { "type": "string", "description": "Original file name as uploaded.", "nullable": true }, "linkType": { "type": "string", "description": "Link type indicating how the attachment is associated with the transaction.", "nullable": true }, "publicUrl": { "type": "string", "description": "Public URL to download the full attachment.", "nullable": true }, "publicThumbnailUrl": { "type": "string", "description": "Public URL for a thumbnail preview of the attachment, if available.", "nullable": true } }, "additionalProperties": false, "description": "File attachment linked to an AP transaction." }, "InvoiceLegalEntityReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the legal entity.", "format": "uuid" }, "name": { "type": "string", "description": "Display name of the legal entity.", "nullable": true }, "number": { "type": "string", "description": "Legal entity number.", "nullable": true } }, "additionalProperties": false, "description": "Legal entity reference." }, "InvoiceGlAccountReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the GL account.", "format": "uuid" }, "name": { "type": "string", "description": "Display name of the GL account.", "nullable": true }, "number": { "type": "string", "description": "GL account number.", "nullable": true }, "glType": { "type": "string", "description": "GL type name for this account.", "nullable": true } }, "additionalProperties": false, "description": "GL Account reference." }, "InvoiceInventoryItemReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the inventory item.", "format": "uuid", "nullable": true }, "name": { "type": "string", "description": "Display name of the inventory item.", "nullable": true }, "number": { "type": "string", "description": "Inventory item number.", "nullable": true } }, "additionalProperties": false, "description": "Inventory item reference." }, "InvoiceUomReference": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier (GUID) of the entity.", "format": "uuid" }, "name": { "type": "string", "description": "Display name of the entity.", "nullable": true } }, "additionalProperties": false, "description": "Unit of measure reference." } }, "securitySchemes": { "Bearer": { "type": "http", "scheme": "Bearer" } } } } ````