Here’s how to create line items and attachments while creating process request:
Request type – POST
/api/1/Purchase Order/create
{
PO No: 12345,
Total Amount: 130,
Line Item:[
{
Description: "hose",
Amount: 10
},
{
Description: "Pipe",
Amount: 120
}
],
Attachment:[
{
Name: "Issues.xls",
Url: "http://s3.test.com/issues.xls"
},
{
Name: "Bug.xls",
Url: "http://s3.test.com/bug.xls"
}
]
}
Note:
Line Item,
For updating a Line Item, pass the unique UUID “Id” with other parameters
For deleting a Line Item, use the child table delete API (Child Table API)
Attachment:
For deleting a Attachment, use attachment delete API (Attachment API)
No updation for attachment