Dear Techis,
I need help with inserting a Purchase Invoice Header along with multiple lines using an API.
I have already published the Purchase Invoice page (51, Document), and using the OData API URL, I’m able to successfully insert the header and a single purchase invoice line.
However, I’m encountering issues when trying to insert multiple lines using the provided payload.
Below are the API URL and example payload for reference.
Could you please suggest me on how to achieve this?
API URL : http://xxx:7448/BC/ODataV4/Company(xxxx')/PurchInv
Payload example
{
"Document_Type": "Invoice",
"Buy_from_Vendor_No": "xxx",
"Vendor_Invoice_No": "xxx",
"Posting_Date": "2025-03-10",
"Purchaser_Code": "APPROVED",
"grPurchInvPurchLines": [
{
"Line_No": 10000,
"Type": "G/L Account",
"No": "610"
},
{
"Line_No": 20000,
"Type": "G/L Account",
"No": "612"
}
]
}
Thanks in Advance!!