POST api/BuyAPI
Request Information
URI Parameters
None.
Body Parameters
InvoiceBuyVMName | Description | Type | Additional information |
---|---|---|---|
BuyInvoice_Header | BuyInvoice_Header |
None. |
|
BuyInvoice_Details | Collection of BuyInvoice_Details |
None. |
Request Formats
application/json, text/json
Sample:
{ "BuyInvoice_Header": { "Id": 1, "Total": 2.1, "Paid": 3.1, "Discount": 4.1, "Net": 5.1, "Date": "2025-04-03T21:29:23.9577902-07:00", "User_Id": 7, "Branch_Id": 8, "Vendor_Id": 9, "Returned": true, "Branch_Invoice_For_Id": 11 }, "BuyInvoice_Details": [ { "Id": 1, "Header_Id": 2, "ItemName": "sample string 3", "Item_Id": 4, "Price": 5.1, "Qty": 6, "Total": 7.1 }, { "Id": 1, "Header_Id": 2, "ItemName": "sample string 3", "Item_Id": 4, "Price": 5.1, "Qty": 6, "Total": 7.1 } ] }
application/xml, text/xml
Sample:
<InvoiceBuyVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ODOAPI.ViewModel"> <BuyInvoice_Details xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models"> <d2p1:BuyInvoice_Details> <d2p1:Header_Id>2</d2p1:Header_Id> <d2p1:Id>1</d2p1:Id> <d2p1:ItemName>sample string 3</d2p1:ItemName> <d2p1:Item_Id>4</d2p1:Item_Id> <d2p1:Price>5.1</d2p1:Price> <d2p1:Qty>6</d2p1:Qty> <d2p1:Total>7.1</d2p1:Total> </d2p1:BuyInvoice_Details> <d2p1:BuyInvoice_Details> <d2p1:Header_Id>2</d2p1:Header_Id> <d2p1:Id>1</d2p1:Id> <d2p1:ItemName>sample string 3</d2p1:ItemName> <d2p1:Item_Id>4</d2p1:Item_Id> <d2p1:Price>5.1</d2p1:Price> <d2p1:Qty>6</d2p1:Qty> <d2p1:Total>7.1</d2p1:Total> </d2p1:BuyInvoice_Details> </BuyInvoice_Details> <BuyInvoice_Header xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models"> <d2p1:Branch_Id>8</d2p1:Branch_Id> <d2p1:Branch_Invoice_For_Id>11</d2p1:Branch_Invoice_For_Id> <d2p1:Date>2025-04-03T21:29:23.9577902-07:00</d2p1:Date> <d2p1:Discount>4.1</d2p1:Discount> <d2p1:Id>1</d2p1:Id> <d2p1:Net>5.1</d2p1:Net> <d2p1:Paid>3.1</d2p1:Paid> <d2p1:Returned>true</d2p1:Returned> <d2p1:Total>2.1</d2p1:Total> <d2p1:User_Id>7</d2p1:User_Id> <d2p1:Vendor_Id>9</d2p1:Vendor_Id> </BuyInvoice_Header> </InvoiceBuyVM>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
InvoiceBuyVMName | Description | Type | Additional information |
---|---|---|---|
BuyInvoice_Header | BuyInvoice_Header |
None. |
|
BuyInvoice_Details | Collection of BuyInvoice_Details |
None. |
Response Formats
application/json, text/json
Sample:
{ "BuyInvoice_Header": { "Id": 1, "Total": 2.1, "Paid": 3.1, "Discount": 4.1, "Net": 5.1, "Date": "2025-04-03T21:29:23.9764947-07:00", "User_Id": 7, "Branch_Id": 8, "Vendor_Id": 9, "Returned": true, "Branch_Invoice_For_Id": 11 }, "BuyInvoice_Details": [ { "Id": 1, "Header_Id": 2, "ItemName": "sample string 3", "Item_Id": 4, "Price": 5.1, "Qty": 6, "Total": 7.1 }, { "Id": 1, "Header_Id": 2, "ItemName": "sample string 3", "Item_Id": 4, "Price": 5.1, "Qty": 6, "Total": 7.1 } ] }
application/xml, text/xml
Sample:
<InvoiceBuyVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ODOAPI.ViewModel"> <BuyInvoice_Details xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models"> <d2p1:BuyInvoice_Details> <d2p1:Header_Id>2</d2p1:Header_Id> <d2p1:Id>1</d2p1:Id> <d2p1:ItemName>sample string 3</d2p1:ItemName> <d2p1:Item_Id>4</d2p1:Item_Id> <d2p1:Price>5.1</d2p1:Price> <d2p1:Qty>6</d2p1:Qty> <d2p1:Total>7.1</d2p1:Total> </d2p1:BuyInvoice_Details> <d2p1:BuyInvoice_Details> <d2p1:Header_Id>2</d2p1:Header_Id> <d2p1:Id>1</d2p1:Id> <d2p1:ItemName>sample string 3</d2p1:ItemName> <d2p1:Item_Id>4</d2p1:Item_Id> <d2p1:Price>5.1</d2p1:Price> <d2p1:Qty>6</d2p1:Qty> <d2p1:Total>7.1</d2p1:Total> </d2p1:BuyInvoice_Details> </BuyInvoice_Details> <BuyInvoice_Header xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models"> <d2p1:Branch_Id>8</d2p1:Branch_Id> <d2p1:Branch_Invoice_For_Id>11</d2p1:Branch_Invoice_For_Id> <d2p1:Date>2025-04-03T21:29:23.9764947-07:00</d2p1:Date> <d2p1:Discount>4.1</d2p1:Discount> <d2p1:Id>1</d2p1:Id> <d2p1:Net>5.1</d2p1:Net> <d2p1:Paid>3.1</d2p1:Paid> <d2p1:Returned>true</d2p1:Returned> <d2p1:Total>2.1</d2p1:Total> <d2p1:User_Id>7</d2p1:User_Id> <d2p1:Vendor_Id>9</d2p1:Vendor_Id> </BuyInvoice_Header> </InvoiceBuyVM>