POST api/ProductMaster/InsertOrUpdate

Request Information

URI Parameters

None.

Body Parameters

ProductDetails
NameDescriptionTypeAdditional information
ProductHeader

ProductSummary

None.

ProductBarcodes

Collection of ProductBarcode

None.

ProductSuppliers

Collection of ProductSupplier

None.

Request Formats

application/json, text/json

Sample:
{
  "ProductHeader": {
    "PluNumber": 1,
    "ProductDescription": "sample string 2",
    "Barcode": "sample string 3",
    "DepartmentId": 4,
    "SubDepartmentId": 5,
    "TaxId": 6,
    "LocationId": 7,
    "StockControlled": true,
    "LabelRequired": true,
    "Discontinued": true,
    "ProductSize": "sample string 11",
    "Stock": "sample string 12",
    "ReOrderLevel": 13,
    "AverageSales": "sample string 14",
    "LastSoldDate": "sample string 15",
    "LastBoughtDate": "sample string 16",
    "LastAdjustment": "sample string 17",
    "OnOrder": "sample string 18",
    "OrderType": 19,
    "Rrp": 20.0,
    "CostPrice": 21.0,
    "MaxWeeklySales": "sample string 22"
  },
  "ProductBarcodes": [
    {
      "IntProductBarcodeId": 1,
      "PluNumber": 2,
      "StrBarcode": "sample string 3",
      "StrProductDesc": "sample string 4",
      "DecPrice": 5.1,
      "DecOldPrice": 6.1,
      "DecMargin": 7.1,
      "IsOnOffer": true,
      "IsDefaultBarcode": true,
      "IsPriceLabelPrint": true,
      "BPricemarked": true,
      "RowStatus": "sample string 12"
    },
    {
      "IntProductBarcodeId": 1,
      "PluNumber": 2,
      "StrBarcode": "sample string 3",
      "StrProductDesc": "sample string 4",
      "DecPrice": 5.1,
      "DecOldPrice": 6.1,
      "DecMargin": 7.1,
      "IsOnOffer": true,
      "IsDefaultBarcode": true,
      "IsPriceLabelPrint": true,
      "BPricemarked": true,
      "RowStatus": "sample string 12"
    }
  ],
  "ProductSuppliers": [
    {
      "IntProductSupplierId": 1,
      "PluNumber": 2,
      "StrRefNo": "sample string 3",
      "Id_Supplier": 4,
      "IntCaseQty": 5,
      "DecCost": 6.1,
      "IsDefaultSupplier": true,
      "RowStatus": "sample string 8"
    },
    {
      "IntProductSupplierId": 1,
      "PluNumber": 2,
      "StrRefNo": "sample string 3",
      "Id_Supplier": 4,
      "IntCaseQty": 5,
      "DecCost": 6.1,
      "IsDefaultSupplier": true,
      "RowStatus": "sample string 8"
    }
  ]
}

text/html

Sample:
{"ProductHeader":{"PluNumber":1,"ProductDescription":"sample string 2","Barcode":"sample string 3","DepartmentId":4,"SubDepartmentId":5,"TaxId":6,"LocationId":7,"StockControlled":true,"LabelRequired":true,"Discontinued":true,"ProductSize":"sample string 11","Stock":"sample string 12","ReOrderLevel":13,"AverageSales":"sample string 14","LastSoldDate":"sample string 15","LastBoughtDate":"sample string 16","LastAdjustment":"sample string 17","OnOrder":"sample string 18","OrderType":19,"Rrp":20.0,"CostPrice":21.0,"MaxWeeklySales":"sample string 22"},"ProductBarcodes":[{"IntProductBarcodeId":1,"PluNumber":2,"StrBarcode":"sample string 3","StrProductDesc":"sample string 4","DecPrice":5.1,"DecOldPrice":6.1,"DecMargin":7.1,"IsOnOffer":true,"IsDefaultBarcode":true,"IsPriceLabelPrint":true,"BPricemarked":true,"RowStatus":"sample string 12"},{"IntProductBarcodeId":1,"PluNumber":2,"StrBarcode":"sample string 3","StrProductDesc":"sample string 4","DecPrice":5.1,"DecOldPrice":6.1,"DecMargin":7.1,"IsOnOffer":true,"IsDefaultBarcode":true,"IsPriceLabelPrint":true,"BPricemarked":true,"RowStatus":"sample string 12"}],"ProductSuppliers":[{"IntProductSupplierId":1,"PluNumber":2,"StrRefNo":"sample string 3","Id_Supplier":4,"IntCaseQty":5,"DecCost":6.1,"IsDefaultSupplier":true,"RowStatus":"sample string 8"},{"IntProductSupplierId":1,"PluNumber":2,"StrRefNo":"sample string 3","Id_Supplier":4,"IntCaseQty":5,"DecCost":6.1,"IsDefaultSupplier":true,"RowStatus":"sample string 8"}]}

application/xml, text/xml

Sample:
<ProductDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HeadOfficeApi.DataAccess.Sql.MposMain">
  <ProductBarcodes>
    <ProductBarcode>
      <BPricemarked>true</BPricemarked>
      <DecMargin>7.1</DecMargin>
      <DecOldPrice>6.1</DecOldPrice>
      <DecPrice>5.1</DecPrice>
      <IntProductBarcodeId>1</IntProductBarcodeId>
      <IsDefaultBarcode>true</IsDefaultBarcode>
      <IsOnOffer>true</IsOnOffer>
      <IsPriceLabelPrint>true</IsPriceLabelPrint>
      <PluNumber>2</PluNumber>
      <RowStatus>sample string 12</RowStatus>
      <StrBarcode>sample string 3</StrBarcode>
      <StrProductDesc>sample string 4</StrProductDesc>
    </ProductBarcode>
    <ProductBarcode>
      <BPricemarked>true</BPricemarked>
      <DecMargin>7.1</DecMargin>
      <DecOldPrice>6.1</DecOldPrice>
      <DecPrice>5.1</DecPrice>
      <IntProductBarcodeId>1</IntProductBarcodeId>
      <IsDefaultBarcode>true</IsDefaultBarcode>
      <IsOnOffer>true</IsOnOffer>
      <IsPriceLabelPrint>true</IsPriceLabelPrint>
      <PluNumber>2</PluNumber>
      <RowStatus>sample string 12</RowStatus>
      <StrBarcode>sample string 3</StrBarcode>
      <StrProductDesc>sample string 4</StrProductDesc>
    </ProductBarcode>
  </ProductBarcodes>
  <ProductHeader>
    <AverageSales>sample string 14</AverageSales>
    <Barcode>sample string 3</Barcode>
    <CostPrice>21</CostPrice>
    <DepartmentId>4</DepartmentId>
    <Discontinued>true</Discontinued>
    <LabelRequired>true</LabelRequired>
    <LastAdjustment>sample string 17</LastAdjustment>
    <LastBoughtDate>sample string 16</LastBoughtDate>
    <LastSoldDate>sample string 15</LastSoldDate>
    <LocationId>7</LocationId>
    <MaxWeeklySales>sample string 22</MaxWeeklySales>
    <OnOrder>sample string 18</OnOrder>
    <OrderType>19</OrderType>
    <PluNumber>1</PluNumber>
    <ProductDescription>sample string 2</ProductDescription>
    <ProductSize>sample string 11</ProductSize>
    <ReOrderLevel>13</ReOrderLevel>
    <Rrp>20</Rrp>
    <Stock>sample string 12</Stock>
    <StockControlled>true</StockControlled>
    <SubDepartmentId>5</SubDepartmentId>
    <TaxId>6</TaxId>
  </ProductHeader>
  <ProductSuppliers>
    <ProductSupplier>
      <DecCost>6.1</DecCost>
      <Id_Supplier>4</Id_Supplier>
      <IntCaseQty>5</IntCaseQty>
      <IntProductSupplierId>1</IntProductSupplierId>
      <IsDefaultSupplier>true</IsDefaultSupplier>
      <PluNumber>2</PluNumber>
      <RowStatus>sample string 8</RowStatus>
      <StrRefNo>sample string 3</StrRefNo>
    </ProductSupplier>
    <ProductSupplier>
      <DecCost>6.1</DecCost>
      <Id_Supplier>4</Id_Supplier>
      <IntCaseQty>5</IntCaseQty>
      <IntProductSupplierId>1</IntProductSupplierId>
      <IsDefaultSupplier>true</IsDefaultSupplier>
      <PluNumber>2</PluNumber>
      <RowStatus>sample string 8</RowStatus>
      <StrRefNo>sample string 3</StrRefNo>
    </ProductSupplier>
  </ProductSuppliers>
</ProductDetails>

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.