POST api/UnPos/Merchant/Product/V/Add
添加一个商品
Request Information
URI Parameters
None.
Body Parameters
MerchantProductParmName | Description | Type | Additional information |
---|---|---|---|
ProductName |
商品名 Varchar(40) NOT NULL. |
string |
Required Max length: 40 |
BarCode |
条码 Varchar(20) |
string |
Max length: 20 |
BaseUnit |
基本单位 Varchar(8) NOT NULL. |
string |
Required Max length: 8 |
ProductClassCode |
商品类别 Varchar(6) NOT NULL. |
string |
Required Max length: 6 |
NormalRetailPrice |
一般零售价 Numeric(8,2) NN |
decimal number |
Required |
NormalLowestRetailPrice |
一般零售底价 Numeric(8,2)NN |
decimal number |
Required |
NormalPurchaePrice |
一般采购价 Numeric(8,2) NN |
decimal number |
Required |
SellType |
商品销售特性 char(1) NN |
string |
Required Max length: 1 |
ProductStatus |
状态 char(1) NN |
string |
Required Max length: 1 |
Standard |
规格 Varchar(30) |
string |
Max length: 30 |
ProducingArea |
产地 Varchar(20) |
string |
Max length: 20 |
QualityLevel |
质量标准 Varchar(30) |
string |
Max length: 30 |
Reserve1 |
保留一 Varchar(50) |
string |
Max length: 50 |
Reserve2 |
保留二 Varchar(50) |
string |
Max length: 50 |
LastUpdUser |
最后更新用户 Varchar(20) |
integer |
Required |
Request Formats
application/json, text/json
Sample:
{ "ProductName": "sample string 1", "BarCode": "sample string 2", "BaseUnit": "sample string 3", "ProductClassCode": "sample string 4", "NormalRetailPrice": 5.0, "NormalLowestRetailPrice": 6.0, "NormalPurchaePrice": 7.0, "SellType": "sample string 8", "ProductStatus": "sample string 9", "Standard": "sample string 10", "ProducingArea": "sample string 11", "QualityLevel": "sample string 12", "Reserve1": "sample string 13", "Reserve2": "sample string 14", "LastUpdUser": 15 }
application/xml, text/xml
Sample:
<MerchantProductParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.UnPos.Parms"> <BarCode>sample string 2</BarCode> <BaseUnit>sample string 3</BaseUnit> <LastUpdUser>15</LastUpdUser> <NormalLowestRetailPrice>6</NormalLowestRetailPrice> <NormalPurchaePrice>7</NormalPurchaePrice> <NormalRetailPrice>5</NormalRetailPrice> <ProducingArea>sample string 11</ProducingArea> <ProductClassCode>sample string 4</ProductClassCode> <ProductName>sample string 1</ProductName> <ProductStatus>sample string 9</ProductStatus> <QualityLevel>sample string 12</QualityLevel> <Reserve1>sample string 13</Reserve1> <Reserve2>sample string 14</Reserve2> <SellType>sample string 8</SellType> <Standard>sample string 10</Standard> </MerchantProductParm>
application/x-www-form-urlencoded
Sample:
Sample not available.
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
添加一个商品
CommonOperationResultWithTagOfInt32Name | Description | Type | Additional information |
---|---|---|---|
errcode | integer |
None. |
|
errmsg | string |
None. |
|
tag | integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "errcode": 1, "errmsg": "sample string 2", "tag": 3 }
application/xml, text/xml
Sample:
<CommonOperationResultWithTagOfint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer"> <errcode>1</errcode> <errmsg>sample string 2</errmsg> <tag>3</tag> </CommonOperationResultWithTagOfint>
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.