Skip to main content

Purchasing endpoints

Vendors, open and posted purchase documents, archives, and vendor ledger entries.

All URLs on this page are relative to the company URL, https://api.businesscentral.dynamics.com/v2.0/{tenantId}/{environment}/api/datawareness/endpoints/v1.0/companies({companyId})/. See Construction of the URL.

Master data​

EndpointDescriptionBusiness keySource tableTier
vendorDimensionsDefault dimensions assigned to vendors.vendorNo&&dimensionCodeDefault DimensionPremium
vendorPostingGroupsVendor posting group definitions.codeVendor Posting GroupPremium
vendorsVendor master data.noVendorPremium

Transactional data​

EndpointDescriptionBusiness keySource tableTier
purchaseCreditMemoHeadersPosted purchase credit memo headers.noPurch. Cr. Memo Hdr.Premium
purchaseCreditMemoLinesPosted purchase credit memo lines.documentNo&&lineNoPurch. Cr. Memo LinePremium
purchaseHeaderArchivesArchived purchase headers.documentType&&no&&docNoOccurrence&&versionNoPurchase Header ArchivePremium
purchaseHeadersPurchase headers (quotes, orders, invoices, credit memos, etc.).documentType&&noPurchase HeaderPremium
purchaseInvoiceHeadersPosted purchase invoice headers.noPurch. Inv. HeaderPremium
purchaseInvoiceLinesPosted purchase invoice lines.documentNo&&lineNoPurch. Inv. LinePremium
purchaseLineArchivesArchived purchase lines.documentType&&documentNo&&docNoOccurrence&&versionNo&&lineNoPurchase Line ArchivePremium
purchaseLinesPurchase lines.documentType&&documentNo&&lineNoPurchase LinePremium
vendorLedgerEntriesVendor ledger entries.entryNoVendor Ledger EntryPremium

Example queries​

Posted purchase invoices since a date​

GET .../purchaseInvoiceHeaders?$filter=postingDate ge 2026-01-01
&$select=no,buyFromVendorNo,postingDate,vendorInvoiceNo,currencyCode,purchaserCode

Lines of one posted purchase invoice​

GET .../purchaseInvoiceLines?$filter=documentNo eq 'PPI-108001'
&$select=documentNo,lineNo,type,no,description,quantity,lineAmount

Open payables​

GET .../vendorLedgerEntries?$filter=open eq true
&$select=entryNo,vendorNo,documentNo,postingDate,dueDate,remainingAmtLCY

Tips​

  • Headers and lines: join purchaseInvoiceLines.documentNo to purchaseInvoiceHeaders.no, and purchaseLines to purchaseHeaders on documentType and documentNo.
  • Fields: every endpoint's fields, with types, are listed by properties — see Metadata discovery. The same list is on the endpoint's page under BI Endpoints in Business Central.