POST api/Sale/AddorUpdateSale

Request Information

URI Parameters

None.

Body Parameters

SaleEntities
NameDescriptionTypeAdditional information
SaleId

integer

None.

SaleDate

date

None.

Date

string

None.

SaleNo

string

None.

SalesmanId

integer

None.

SalesmanNo

string

None.

CustomerName

string

None.

Contact

string

None.

Total

decimal number

None.

TaxAmount

decimal number

None.

GrandTotal

decimal number

None.

Discount

decimal number

None.

PendAmount

decimal number

None.

ReceiveAmount

decimal number

None.

PendingAmount

decimal number

None.

Change

decimal number

None.

Cash

decimal number

None.

PaymentOption

string

None.

UserId

integer

None.

OrderStatusId

integer

None.

saleDetails

Collection of SaleDetailEnitities

None.

Request Formats

application/json, text/json

Sample:
{
  "SaleId": 1,
  "SaleDate": "2021-09-26T20:44:32.0224715+05:30",
  "Date": "sample string 3",
  "SaleNo": "sample string 4",
  "SalesmanId": 5,
  "SalesmanNo": "sample string 6",
  "CustomerName": "sample string 7",
  "Contact": "sample string 8",
  "Total": 9.0,
  "TaxAmount": 10.0,
  "GrandTotal": 11.0,
  "Discount": 12.0,
  "PendAmount": 13.0,
  "ReceiveAmount": 14.0,
  "PendingAmount": 15.0,
  "Change": 16.0,
  "Cash": 17.0,
  "PaymentOption": "sample string 18",
  "UserId": 19,
  "OrderStatusId": 20,
  "saleDetails": [
    {
      "SaleDetId": 1,
      "SaleId": 2,
      "SaleNo": "sample string 3",
      "CategoryId": 4,
      "CategoryName": "sample string 5",
      "SubcategoryId": 6,
      "SubCategoryName": "sample string 7",
      "BrandId": 8,
      "BrandName": "sample string 9",
      "ProductId": 10,
      "ProductName": "sample string 11",
      "ImagePath": "sample string 12",
      "SizeId": 13,
      "Size": "sample string 14",
      "Unit": "sample string 15",
      "SaleQty": "sample string 16",
      "SaleRate": 17.0,
      "TaxId": 18,
      "TaxName": "sample string 19",
      "TaxAmount": 20.0,
      "Total": 21.0,
      "GrandTotal": 22.0,
      "Discount": 23.0
    },
    {
      "SaleDetId": 1,
      "SaleId": 2,
      "SaleNo": "sample string 3",
      "CategoryId": 4,
      "CategoryName": "sample string 5",
      "SubcategoryId": 6,
      "SubCategoryName": "sample string 7",
      "BrandId": 8,
      "BrandName": "sample string 9",
      "ProductId": 10,
      "ProductName": "sample string 11",
      "ImagePath": "sample string 12",
      "SizeId": 13,
      "Size": "sample string 14",
      "Unit": "sample string 15",
      "SaleQty": "sample string 16",
      "SaleRate": 17.0,
      "TaxId": 18,
      "TaxName": "sample string 19",
      "TaxAmount": 20.0,
      "Total": 21.0,
      "GrandTotal": 22.0,
      "Discount": 23.0
    }
  ]
}

text/html

Sample:
{"SaleId":1,"SaleDate":"2021-09-26T20:44:32.0224715+05:30","Date":"sample string 3","SaleNo":"sample string 4","SalesmanId":5,"SalesmanNo":"sample string 6","CustomerName":"sample string 7","Contact":"sample string 8","Total":9.0,"TaxAmount":10.0,"GrandTotal":11.0,"Discount":12.0,"PendAmount":13.0,"ReceiveAmount":14.0,"PendingAmount":15.0,"Change":16.0,"Cash":17.0,"PaymentOption":"sample string 18","UserId":19,"OrderStatusId":20,"saleDetails":[{"SaleDetId":1,"SaleId":2,"SaleNo":"sample string 3","CategoryId":4,"CategoryName":"sample string 5","SubcategoryId":6,"SubCategoryName":"sample string 7","BrandId":8,"BrandName":"sample string 9","ProductId":10,"ProductName":"sample string 11","ImagePath":"sample string 12","SizeId":13,"Size":"sample string 14","Unit":"sample string 15","SaleQty":"sample string 16","SaleRate":17.0,"TaxId":18,"TaxName":"sample string 19","TaxAmount":20.0,"Total":21.0,"GrandTotal":22.0,"Discount":23.0},{"SaleDetId":1,"SaleId":2,"SaleNo":"sample string 3","CategoryId":4,"CategoryName":"sample string 5","SubcategoryId":6,"SubCategoryName":"sample string 7","BrandId":8,"BrandName":"sample string 9","ProductId":10,"ProductName":"sample string 11","ImagePath":"sample string 12","SizeId":13,"Size":"sample string 14","Unit":"sample string 15","SaleQty":"sample string 16","SaleRate":17.0,"TaxId":18,"TaxName":"sample string 19","TaxAmount":20.0,"Total":21.0,"GrandTotal":22.0,"Discount":23.0}]}

application/xml, text/xml

Sample:
<SaleEntities xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Meridukan_API.Entities.Sale">
  <Cash>17</Cash>
  <Change>16</Change>
  <Contact>sample string 8</Contact>
  <CustomerName>sample string 7</CustomerName>
  <Date>sample string 3</Date>
  <Discount>12</Discount>
  <GrandTotal>11</GrandTotal>
  <OrderStatusId>20</OrderStatusId>
  <PaymentOption>sample string 18</PaymentOption>
  <PendAmount>13</PendAmount>
  <PendingAmount>15</PendingAmount>
  <ReceiveAmount>14</ReceiveAmount>
  <SaleDate>2021-09-26T20:44:32.0224715+05:30</SaleDate>
  <SaleId>1</SaleId>
  <SaleNo>sample string 4</SaleNo>
  <SalesmanId>5</SalesmanId>
  <SalesmanNo>sample string 6</SalesmanNo>
  <TaxAmount>10</TaxAmount>
  <Total>9</Total>
  <UserId>19</UserId>
  <saleDetails>
    <SaleDetailEnitities>
      <BrandId>8</BrandId>
      <BrandName>sample string 9</BrandName>
      <CategoryId>4</CategoryId>
      <CategoryName>sample string 5</CategoryName>
      <Discount>23</Discount>
      <GrandTotal>22</GrandTotal>
      <ImagePath>sample string 12</ImagePath>
      <ProductId>10</ProductId>
      <ProductName>sample string 11</ProductName>
      <SaleDetId>1</SaleDetId>
      <SaleId>2</SaleId>
      <SaleNo>sample string 3</SaleNo>
      <SaleQty>sample string 16</SaleQty>
      <SaleRate>17</SaleRate>
      <Size>sample string 14</Size>
      <SizeId>13</SizeId>
      <SubCategoryName>sample string 7</SubCategoryName>
      <SubcategoryId>6</SubcategoryId>
      <TaxAmount>20</TaxAmount>
      <TaxId>18</TaxId>
      <TaxName>sample string 19</TaxName>
      <Total>21</Total>
      <Unit>sample string 15</Unit>
    </SaleDetailEnitities>
    <SaleDetailEnitities>
      <BrandId>8</BrandId>
      <BrandName>sample string 9</BrandName>
      <CategoryId>4</CategoryId>
      <CategoryName>sample string 5</CategoryName>
      <Discount>23</Discount>
      <GrandTotal>22</GrandTotal>
      <ImagePath>sample string 12</ImagePath>
      <ProductId>10</ProductId>
      <ProductName>sample string 11</ProductName>
      <SaleDetId>1</SaleDetId>
      <SaleId>2</SaleId>
      <SaleNo>sample string 3</SaleNo>
      <SaleQty>sample string 16</SaleQty>
      <SaleRate>17</SaleRate>
      <Size>sample string 14</Size>
      <SizeId>13</SizeId>
      <SubCategoryName>sample string 7</SubCategoryName>
      <SubcategoryId>6</SubcategoryId>
      <TaxAmount>20</TaxAmount>
      <TaxId>18</TaxId>
      <TaxName>sample string 19</TaxName>
      <Total>21</Total>
      <Unit>sample string 15</Unit>
    </SaleDetailEnitities>
  </saleDetails>
</SaleEntities>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.