page 60000 AAA_PurchaseInvoiceAPI{ PageType = API; Caption = 'AAA PurchaseInvoiceAPI', Locked = true; APIPublisher = 'aaa'; APIGroup = 'group1'; APIVersion = 'v5.1'; EntityName = 'purchaseinvoice'; EntitySetName = 'purchaseinvoices'; SourceTable = /Purchase Header/; SourceTableView = where(/Document Type/ = filter(Invoice)); DelayedInsert = true; ODataKeyFields = SystemId; layout { area(Content) { repeater(GroupName) { field(DocumentType; Rec./Document Type/) { Caption = 'DocumentType', Locked = true; } field(DocumentNo; Rec./No./) { Caption = 'DocumentNo', Locked = true; } field(DueDate; Rec./Due Date/) { Caption = 'DueDate', Locked = true; } field(BuyFromVendorNo; Rec./Buy-from Vendor No./) { Caption = 'BuyFromVendorNo', Locked = true; }### SOME MORE FIELDS... field(SystemId; Rec.SystemId) { Caption = 'SystemId', Locked = true; } } } }
URL=
https:/api.businesscentral.dynamics.com/v2.0/tenantID/env_ID/api/stampli/group1/v5.1/companies(company_ID)/purchaseinvoices
Body = {
/BuyFromVendorNo/: /MONNSU/,
/DueDate/: /2023-06-06/,
/DocumentDate/: /2023-06-05/,
/VendorInvoiceNo/: /160392/,
}
1. verified the no series setup
2. created a purchase credit memo header successfully