POST api/UnPos/Merchant/Shop/ProductDiscount/Add
商品限时打折
Request Information
URI Parameters
None.
Body Parameters
MerhcantShopProductDiscountParm| Name | Description | Type | Additional information |
|---|---|---|---|
| ProductId |
商品ID int NOT NULL. |
integer |
Required |
| ShopId |
门店ID Char(4) NOT NULL. |
string |
Required Max length: 4 |
| ApplyToObject |
适用对象 char(1) NOT NULL. |
string |
Required Max length: 1 |
| MemberLimitLevel |
限定最低会员等级 Byte |
byte |
None. |
| IsSellAmountLimit |
是否启用每单购买数量限制 char(1) NOT NULL. |
string |
Required Max length: 1 |
| PerBillAmountLimit |
每单购买数量限制 Numeric(8,4) 当IsSellSummaryLimit=‘1’,此值有意义。表示依据下面的两个字段来限制购买。 |
decimal number |
None. |
| PerBillAmountLimitType |
每单购买金额许可模式 char(1) N不限制,P每单限制;A达到许可金额后可以购买限制数量的本商品;B每倍许可金额阀值可以购买指定数量的商品。 |
string |
None. |
| PerAmountSummaryLimit |
许可购买金额阀值 Numeric(12,2) |
decimal number |
None. |
| Memory |
备注 Varchar(100) |
string |
Max length: 100 |
| UserCode |
用户代码 int |
integer |
Required |
| Start |
限时打折的起始时间 char(14) NOT NULL. |
string |
Required Max length: 14 |
| End |
限时打折的截止时间 char(14) NOT NULL. |
string |
Required Max length: 14 |
| Discount |
折扣 Numeric(8,2) NN |
decimal number |
Required |
| IsIgnore |
是否忽略价格记录不存在的情况 |
string |
Required Max length: 1 |
Request Formats
application/json, text/json
Sample:
{
"ProductId": 1,
"ShopId": "sample string 2",
"ApplyToObject": "sample string 3",
"MemberLimitLevel": 64,
"IsSellAmountLimit": "sample string 5",
"PerBillAmountLimit": 6.0,
"PerBillAmountLimitType": "sample string 7",
"PerAmountSummaryLimit": 8.0,
"Memory": "sample string 9",
"UserCode": 10,
"Start": "sample string 11",
"End": "sample string 12",
"Discount": 13.0,
"IsIgnore": "sample string 14"
}
application/xml, text/xml
Sample:
<MerhcantShopProductDiscountParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.UnPos.Parms"> <ApplyToObject>sample string 3</ApplyToObject> <Discount>13</Discount> <End>sample string 12</End> <IsIgnore>sample string 14</IsIgnore> <IsSellAmountLimit>sample string 5</IsSellAmountLimit> <MemberLimitLevel>64</MemberLimitLevel> <Memory>sample string 9</Memory> <PerAmountSummaryLimit>8</PerAmountSummaryLimit> <PerBillAmountLimit>6</PerBillAmountLimit> <PerBillAmountLimitType>sample string 7</PerBillAmountLimitType> <ProductId>1</ProductId> <ShopId>sample string 2</ShopId> <Start>sample string 11</Start> <UserCode>10</UserCode> </MerhcantShopProductDiscountParm>
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
商品限时打折
CommonOperationResult| Name | Description | Type | Additional information |
|---|---|---|---|
| errcode |
错误代码,通常0表示成功,其他值表示错误。 |
integer |
None. |
| errmsg |
错误描述,当errcode不为零时,此值可以用于呈现给用户。 |
string |
None. |
| tag |
操作同时,服务器端需要返回的其他值。 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"errcode": 1,
"errmsg": "sample string 2",
"tag": "sample string 3"
}
application/xml, text/xml
Sample:
<CommonOperationResult 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>sample string 3</tag> </CommonOperationResult>
application/bson
Sample:
Binary JSON content. See http://bsonspec.org for details.