POST api/SaleAPI

Request Information

URI Parameters

None.

Body Parameters

InvoiceSaleVM
NameDescriptionTypeAdditional information
SaleInvoice_Header

SaleInvoice_Header

None.

SaleInvoice_Details

Collection of SaleInvoice_Details

None.

Request Formats

application/json, text/json

Sample:
{
  "SaleInvoice_Header": {
    "Id": 1,
    "Total": 2.1,
    "Paid": 3.1,
    "Discount": 4.1,
    "Net": 5.1,
    "Date": "2025-04-03T21:29:23.738079-07:00",
    "User_Id": 7,
    "Branch_Id": 8,
    "Returned": true
  },
  "SaleInvoice_Details": [
    {
      "Id": 1,
      "Header_Id": 2,
      "Item_Id": 3,
      "ItemName": "sample string 4",
      "Price": 5.1,
      "BuyPrice": 6.1,
      "Qty": 7,
      "Total": 8.1
    },
    {
      "Id": 1,
      "Header_Id": 2,
      "Item_Id": 3,
      "ItemName": "sample string 4",
      "Price": 5.1,
      "BuyPrice": 6.1,
      "Qty": 7,
      "Total": 8.1
    }
  ]
}

application/xml, text/xml

Sample:
<InvoiceSaleVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ODOAPI.ViewModel">
  <SaleInvoice_Details xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models">
    <d2p1:SaleInvoice_Details>
      <d2p1:BuyPrice>6.1</d2p1:BuyPrice>
      <d2p1:Header_Id>2</d2p1:Header_Id>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:ItemName>sample string 4</d2p1:ItemName>
      <d2p1:Item_Id>3</d2p1:Item_Id>
      <d2p1:Price>5.1</d2p1:Price>
      <d2p1:Qty>7</d2p1:Qty>
      <d2p1:Total>8.1</d2p1:Total>
    </d2p1:SaleInvoice_Details>
    <d2p1:SaleInvoice_Details>
      <d2p1:BuyPrice>6.1</d2p1:BuyPrice>
      <d2p1:Header_Id>2</d2p1:Header_Id>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:ItemName>sample string 4</d2p1:ItemName>
      <d2p1:Item_Id>3</d2p1:Item_Id>
      <d2p1:Price>5.1</d2p1:Price>
      <d2p1:Qty>7</d2p1:Qty>
      <d2p1:Total>8.1</d2p1:Total>
    </d2p1:SaleInvoice_Details>
  </SaleInvoice_Details>
  <SaleInvoice_Header xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models">
    <d2p1:Branch_Id>8</d2p1:Branch_Id>
    <d2p1:Date>2025-04-03T21:29:23.738079-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>
  </SaleInvoice_Header>
</InvoiceSaleVM>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

InvoiceSaleVM
NameDescriptionTypeAdditional information
SaleInvoice_Header

SaleInvoice_Header

None.

SaleInvoice_Details

Collection of SaleInvoice_Details

None.

Response Formats

application/json, text/json

Sample:
{
  "SaleInvoice_Header": {
    "Id": 1,
    "Total": 2.1,
    "Paid": 3.1,
    "Discount": 4.1,
    "Net": 5.1,
    "Date": "2025-04-03T21:29:23.9733838-07:00",
    "User_Id": 7,
    "Branch_Id": 8,
    "Returned": true
  },
  "SaleInvoice_Details": [
    {
      "Id": 1,
      "Header_Id": 2,
      "Item_Id": 3,
      "ItemName": "sample string 4",
      "Price": 5.1,
      "BuyPrice": 6.1,
      "Qty": 7,
      "Total": 8.1
    },
    {
      "Id": 1,
      "Header_Id": 2,
      "Item_Id": 3,
      "ItemName": "sample string 4",
      "Price": 5.1,
      "BuyPrice": 6.1,
      "Qty": 7,
      "Total": 8.1
    }
  ]
}

application/xml, text/xml

Sample:
<InvoiceSaleVM xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ODOAPI.ViewModel">
  <SaleInvoice_Details xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models">
    <d2p1:SaleInvoice_Details>
      <d2p1:BuyPrice>6.1</d2p1:BuyPrice>
      <d2p1:Header_Id>2</d2p1:Header_Id>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:ItemName>sample string 4</d2p1:ItemName>
      <d2p1:Item_Id>3</d2p1:Item_Id>
      <d2p1:Price>5.1</d2p1:Price>
      <d2p1:Qty>7</d2p1:Qty>
      <d2p1:Total>8.1</d2p1:Total>
    </d2p1:SaleInvoice_Details>
    <d2p1:SaleInvoice_Details>
      <d2p1:BuyPrice>6.1</d2p1:BuyPrice>
      <d2p1:Header_Id>2</d2p1:Header_Id>
      <d2p1:Id>1</d2p1:Id>
      <d2p1:ItemName>sample string 4</d2p1:ItemName>
      <d2p1:Item_Id>3</d2p1:Item_Id>
      <d2p1:Price>5.1</d2p1:Price>
      <d2p1:Qty>7</d2p1:Qty>
      <d2p1:Total>8.1</d2p1:Total>
    </d2p1:SaleInvoice_Details>
  </SaleInvoice_Details>
  <SaleInvoice_Header xmlns:d2p1="http://schemas.datacontract.org/2004/07/ODOAPI.Models">
    <d2p1:Branch_Id>8</d2p1:Branch_Id>
    <d2p1:Date>2025-04-03T21:29:23.9733838-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>
  </SaleInvoice_Header>
</InvoiceSaleVM>