POST stock/Create

Request Information

URI Parameters

None.

Body Parameters

StockEntity
NameDescriptionTypeAdditional information
StockId

integer

None.

StockCode

string

None.

StockDesc

string

None.

Active

boolean

None.

StockUnit

string

None.

StockType

string

None.

Kit

boolean

None.

TenantId

integer

None.

KitVersionNo

integer

None.

IsLabour

boolean

None.

StockCategory

string

None.

ProductTags

string

None.

CostPrice

decimal number

None.

PriceExc

decimal number

None.

WorkUnits

date

None.

AllowQtyFractions

boolean

None.

FixedPrice

boolean

None.

CheckStockLevel

boolean

None.

GLAccFixed

boolean

None.

SalesGLAcc

string

None.

CostGLAcc

string

None.

Acc_StockNo

integer

None.

IsDiscount

boolean

None.

DefaultPrice

decimal number

None.

PageNo

integer

None.

TotalPages

integer

None.

HasPricelist

boolean

None.

HasMinimumPrice

boolean

None.

MinimumPriceExc

decimal number

None.

IsBOM

boolean

None.

UseBOMPrice

boolean

None.

HasDocs

boolean

None.

IsTakeOn

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "StockId": 1,
  "StockCode": "sample string 2",
  "StockDesc": "sample string 3",
  "Active": true,
  "StockUnit": "sample string 5",
  "StockType": "sample string 6",
  "Kit": true,
  "TenantId": 8,
  "KitVersionNo": 1,
  "IsLabour": true,
  "StockCategory": "sample string 10",
  "ProductTags": "sample string 11",
  "CostPrice": 1.0,
  "PriceExc": 1.0,
  "WorkUnits": "2026-04-17T11:33:31.4738789+00:00",
  "AllowQtyFractions": true,
  "FixedPrice": true,
  "CheckStockLevel": true,
  "GLAccFixed": true,
  "SalesGLAcc": "sample string 12",
  "CostGLAcc": "sample string 13",
  "Acc_StockNo": 1,
  "IsDiscount": true,
  "DefaultPrice": 1.0,
  "PageNo": 14,
  "TotalPages": 15,
  "HasPricelist": true,
  "HasMinimumPrice": true,
  "MinimumPriceExc": 1.0,
  "IsBOM": true,
  "UseBOMPrice": true,
  "HasDocs": true,
  "IsTakeOn": true
}

text/html

Sample:
{"StockId":1,"StockCode":"sample string 2","StockDesc":"sample string 3","Active":true,"StockUnit":"sample string 5","StockType":"sample string 6","Kit":true,"TenantId":8,"KitVersionNo":1,"IsLabour":true,"StockCategory":"sample string 10","ProductTags":"sample string 11","CostPrice":1.0,"PriceExc":1.0,"WorkUnits":"2026-04-17T11:33:31.4738789+00:00","AllowQtyFractions":true,"FixedPrice":true,"CheckStockLevel":true,"GLAccFixed":true,"SalesGLAcc":"sample string 12","CostGLAcc":"sample string 13","Acc_StockNo":1,"IsDiscount":true,"DefaultPrice":1.0,"PageNo":14,"TotalPages":15,"HasPricelist":true,"HasMinimumPrice":true,"MinimumPriceExc":1.0,"IsBOM":true,"UseBOMPrice":true,"HasDocs":true,"IsTakeOn":true}

application/xml, text/xml

Sample:
<StockEntity xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ListenerOnline.BusinessEntities.Stock">
  <Acc_StockNo>1</Acc_StockNo>
  <Active>true</Active>
  <AllowQtyFractions>true</AllowQtyFractions>
  <CheckStockLevel>true</CheckStockLevel>
  <CostGLAcc>sample string 13</CostGLAcc>
  <CostPrice>1</CostPrice>
  <DefaultPrice>1</DefaultPrice>
  <FixedPrice>true</FixedPrice>
  <GLAccFixed>true</GLAccFixed>
  <HasDocs>true</HasDocs>
  <HasMinimumPrice>true</HasMinimumPrice>
  <HasPricelist>true</HasPricelist>
  <IsBOM>true</IsBOM>
  <IsDiscount>true</IsDiscount>
  <IsLabour>true</IsLabour>
  <IsTakeOn>true</IsTakeOn>
  <Kit>true</Kit>
  <KitVersionNo>1</KitVersionNo>
  <MinimumPriceExc>1</MinimumPriceExc>
  <PageNo>14</PageNo>
  <PriceExc>1</PriceExc>
  <ProductTags>sample string 11</ProductTags>
  <SalesGLAcc>sample string 12</SalesGLAcc>
  <StockCategory>sample string 10</StockCategory>
  <StockCode>sample string 2</StockCode>
  <StockDesc>sample string 3</StockDesc>
  <StockId>1</StockId>
  <StockType>sample string 6</StockType>
  <StockUnit>sample string 5</StockUnit>
  <TenantId>8</TenantId>
  <TotalPages>15</TotalPages>
  <UseBOMPrice>true</UseBOMPrice>
  <WorkUnits>2026-04-17T11:33:31.4738789+00:00</WorkUnits>
</StockEntity>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'StockEntity'.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/html, application/xml, text/xml

Sample:

Sample not available.