POST api/Coupon/Busi/BeginUse
(跨平台方法)核销一个或多个优惠券(result.errcode=0表示成功,tag中包含核销优惠券的详细信息(注意是截止到当前时间为止的指定单据的所有核销的优惠券的信息);result.errcode=1表示需要查询)。 一个单据可以多次核销优惠券。
Request Information
URI Parameters
None.
Body Parameters
核销优惠券的参数。
CouponUsingParmName | Description | Type | Additional information |
---|---|---|---|
UsedForBusi |
/*1-票务(含景区和演出);2-自营零售业务;3-包车业务;4-即上即下环保车业务;5-装备租赁业务,6-联营零售业务,7-餐饮业务,8-其他业务。*/ |
string |
Required Max length: 1 Min length: 1 |
BusiBillNum |
业务单据单号(业务系统的单据号,如“餐饮系统的单据单号”)。 |
string |
Required Max length: 36 |
BusiBillSummary |
业务单据的收款金额,用于判断是否满足使用条件 |
decimal number |
Required |
UsedByMerchant |
是否联营零售店铺使用,1-是,0否。 |
string |
Required Max length: 1 Min length: 1 |
UsedMerchantId |
联营商户ID,当UsedByMerchant=1时,此值必填。 |
integer |
None. |
UsedShopId |
联营店铺ID,当UsedByMerchant=1时,此值必填。 |
string |
Max length: 4 |
IgnorDisabled |
当需要核销的优惠券中,存在一个或多个不可用优惠券时,是否自动替除这些优惠券并继续执行核销,1表示是,0或其他值表示否。 |
string |
Max length: 1 |
CouponList |
需要核销的优惠券的集合,只需要优惠券的ID。 |
Collection of string |
Required |
Request Formats
application/json, text/json
{ "UsedForBusi": "sample string 1", "BusiBillNum": "sample string 2", "BusiBillSummary": 3.0, "UsedByMerchant": "sample string 4", "UsedMerchantId": 5, "UsedShopId": "sample string 6", "IgnorDisabled": "sample string 7", "CouponList": [ "sample string 1", "sample string 2" ] }
application/xml, text/xml
<CouponUsingParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm.Coupon"> <BusiBillNum>sample string 2</BusiBillNum> <BusiBillSummary>3</BusiBillSummary> <CouponList xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </CouponList> <IgnorDisabled>sample string 7</IgnorDisabled> <UsedByMerchant>sample string 4</UsedByMerchant> <UsedForBusi>sample string 1</UsedForBusi> <UsedMerchantId>5</UsedMerchantId> <UsedShopId>sample string 6</UsedShopId> </CouponUsingParm>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
(跨平台方法)核销一个或多个优惠券(result.errcode=0表示成功,tag中包含核销优惠券的详细信息(注意是截止到当前时间为止的指定单据的所有核销的优惠券的信息);result.errcode=1表示需要查询)。 一个单据可以多次核销优惠券。
CommonOperationResultWithTagOfCouponUsedResultName | Description | Type | Additional information |
---|---|---|---|
errcode | integer |
None. |
|
errmsg | string |
None. |
|
tag | CouponUsedResult |
None. |
Response Formats
application/json, text/json
{ "errcode": 1, "errmsg": "sample string 2", "tag": { "UsedForBusi": "sample string 1", "BusiBillNum": "sample string 2", "TotalFreeAmount": 3.0, "UsedCouponCount": 4, "UsedCouponList": [ { "CouponId": "sample string 1", "RndCode": "sample string 2", "MemberId": 3, "HoldUserName": "sample string 4", "HoldUserMobile": "sample string 5", "CouponTypeId": "sample string 6", "CouponName": "sample string 7", "CouponType": "sample string 8", "Denomination": 9.0, "BackgroundColor": "sample string 10", "ForeColor": "sample string 11", "PayBillSummaryLimit": 12.0, "GivenToOne": "sample string 13", "ComboWithOtherCoupon": "sample string 14", "SuperimposeMulti": "sample string 15", "SourceOfFund": "sample string 16", "UsedForBusi": "sample string 17", "UsedForSpecialShop": "sample string 18", "UseStatus": "sample string 19", "UsedTime": "sample string 20", "UsedForBusiYet": "sample string 21", "BusiBillNum": "sample string 22", "UsedByMerchant": "sample string 23", "UsedMerchantId": 24, "UsedMerchantName": "sample string 25", "UsedShopId": "sample string 26", "UsedShopName": "sample string 27", "GetTime": "sample string 28", "GetChannel": "sample string 29", "DispatchUserLoginName": "sample string 30", "UsingUserLoginName": "sample string 31", "UseStartTime": "sample string 32", "UseEndTime": "sample string 33", "Reserve1": "sample string 34", "Reserve2": "sample string 35" }, { "CouponId": "sample string 1", "RndCode": "sample string 2", "MemberId": 3, "HoldUserName": "sample string 4", "HoldUserMobile": "sample string 5", "CouponTypeId": "sample string 6", "CouponName": "sample string 7", "CouponType": "sample string 8", "Denomination": 9.0, "BackgroundColor": "sample string 10", "ForeColor": "sample string 11", "PayBillSummaryLimit": 12.0, "GivenToOne": "sample string 13", "ComboWithOtherCoupon": "sample string 14", "SuperimposeMulti": "sample string 15", "SourceOfFund": "sample string 16", "UsedForBusi": "sample string 17", "UsedForSpecialShop": "sample string 18", "UseStatus": "sample string 19", "UsedTime": "sample string 20", "UsedForBusiYet": "sample string 21", "BusiBillNum": "sample string 22", "UsedByMerchant": "sample string 23", "UsedMerchantId": 24, "UsedMerchantName": "sample string 25", "UsedShopId": "sample string 26", "UsedShopName": "sample string 27", "GetTime": "sample string 28", "GetChannel": "sample string 29", "DispatchUserLoginName": "sample string 30", "UsingUserLoginName": "sample string 31", "UseStartTime": "sample string 32", "UseEndTime": "sample string 33", "Reserve1": "sample string 34", "Reserve2": "sample string 35" } ] } }
application/xml, text/xml
<CommonOperationResultWithTagOfCouponUsedResultG7pGc9yP 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 xmlns:d2p1="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Result.Coupon"> <d2p1:BusiBillNum>sample string 2</d2p1:BusiBillNum> <d2p1:TotalFreeAmount>3</d2p1:TotalFreeAmount> <d2p1:UsedCouponCount>4</d2p1:UsedCouponCount> <d2p1:UsedCouponList> <d2p1:CouponItemBase> <d2p1:BackgroundColor>sample string 10</d2p1:BackgroundColor> <d2p1:BusiBillNum>sample string 22</d2p1:BusiBillNum> <d2p1:ComboWithOtherCoupon>sample string 14</d2p1:ComboWithOtherCoupon> <d2p1:CouponId>sample string 1</d2p1:CouponId> <d2p1:CouponName>sample string 7</d2p1:CouponName> <d2p1:CouponType>sample string 8</d2p1:CouponType> <d2p1:CouponTypeId>sample string 6</d2p1:CouponTypeId> <d2p1:Denomination>9</d2p1:Denomination> <d2p1:DispatchUserLoginName>sample string 30</d2p1:DispatchUserLoginName> <d2p1:ForeColor>sample string 11</d2p1:ForeColor> <d2p1:GetChannel>sample string 29</d2p1:GetChannel> <d2p1:GetTime>sample string 28</d2p1:GetTime> <d2p1:GivenToOne>sample string 13</d2p1:GivenToOne> <d2p1:HoldUserMobile>sample string 5</d2p1:HoldUserMobile> <d2p1:HoldUserName>sample string 4</d2p1:HoldUserName> <d2p1:MemberId>3</d2p1:MemberId> <d2p1:PayBillSummaryLimit>12</d2p1:PayBillSummaryLimit> <d2p1:Reserve1>sample string 34</d2p1:Reserve1> <d2p1:Reserve2>sample string 35</d2p1:Reserve2> <d2p1:RndCode>sample string 2</d2p1:RndCode> <d2p1:SourceOfFund>sample string 16</d2p1:SourceOfFund> <d2p1:SuperimposeMulti>sample string 15</d2p1:SuperimposeMulti> <d2p1:UseEndTime>sample string 33</d2p1:UseEndTime> <d2p1:UseStartTime>sample string 32</d2p1:UseStartTime> <d2p1:UseStatus>sample string 19</d2p1:UseStatus> <d2p1:UsedByMerchant>sample string 23</d2p1:UsedByMerchant> <d2p1:UsedForBusi>sample string 17</d2p1:UsedForBusi> <d2p1:UsedForBusiYet>sample string 21</d2p1:UsedForBusiYet> <d2p1:UsedForSpecialShop>sample string 18</d2p1:UsedForSpecialShop> <d2p1:UsedMerchantId>24</d2p1:UsedMerchantId> <d2p1:UsedMerchantName>sample string 25</d2p1:UsedMerchantName> <d2p1:UsedShopId>sample string 26</d2p1:UsedShopId> <d2p1:UsedShopName>sample string 27</d2p1:UsedShopName> <d2p1:UsedTime>sample string 20</d2p1:UsedTime> <d2p1:UsingUserLoginName>sample string 31</d2p1:UsingUserLoginName> </d2p1:CouponItemBase> <d2p1:CouponItemBase> <d2p1:BackgroundColor>sample string 10</d2p1:BackgroundColor> <d2p1:BusiBillNum>sample string 22</d2p1:BusiBillNum> <d2p1:ComboWithOtherCoupon>sample string 14</d2p1:ComboWithOtherCoupon> <d2p1:CouponId>sample string 1</d2p1:CouponId> <d2p1:CouponName>sample string 7</d2p1:CouponName> <d2p1:CouponType>sample string 8</d2p1:CouponType> <d2p1:CouponTypeId>sample string 6</d2p1:CouponTypeId> <d2p1:Denomination>9</d2p1:Denomination> <d2p1:DispatchUserLoginName>sample string 30</d2p1:DispatchUserLoginName> <d2p1:ForeColor>sample string 11</d2p1:ForeColor> <d2p1:GetChannel>sample string 29</d2p1:GetChannel> <d2p1:GetTime>sample string 28</d2p1:GetTime> <d2p1:GivenToOne>sample string 13</d2p1:GivenToOne> <d2p1:HoldUserMobile>sample string 5</d2p1:HoldUserMobile> <d2p1:HoldUserName>sample string 4</d2p1:HoldUserName> <d2p1:MemberId>3</d2p1:MemberId> <d2p1:PayBillSummaryLimit>12</d2p1:PayBillSummaryLimit> <d2p1:Reserve1>sample string 34</d2p1:Reserve1> <d2p1:Reserve2>sample string 35</d2p1:Reserve2> <d2p1:RndCode>sample string 2</d2p1:RndCode> <d2p1:SourceOfFund>sample string 16</d2p1:SourceOfFund> <d2p1:SuperimposeMulti>sample string 15</d2p1:SuperimposeMulti> <d2p1:UseEndTime>sample string 33</d2p1:UseEndTime> <d2p1:UseStartTime>sample string 32</d2p1:UseStartTime> <d2p1:UseStatus>sample string 19</d2p1:UseStatus> <d2p1:UsedByMerchant>sample string 23</d2p1:UsedByMerchant> <d2p1:UsedForBusi>sample string 17</d2p1:UsedForBusi> <d2p1:UsedForBusiYet>sample string 21</d2p1:UsedForBusiYet> <d2p1:UsedForSpecialShop>sample string 18</d2p1:UsedForSpecialShop> <d2p1:UsedMerchantId>24</d2p1:UsedMerchantId> <d2p1:UsedMerchantName>sample string 25</d2p1:UsedMerchantName> <d2p1:UsedShopId>sample string 26</d2p1:UsedShopId> <d2p1:UsedShopName>sample string 27</d2p1:UsedShopName> <d2p1:UsedTime>sample string 20</d2p1:UsedTime> <d2p1:UsingUserLoginName>sample string 31</d2p1:UsingUserLoginName> </d2p1:CouponItemBase> </d2p1:UsedCouponList> <d2p1:UsedForBusi>sample string 1</d2p1:UsedForBusi> </tag> </CommonOperationResultWithTagOfCouponUsedResultG7pGc9yP>
application/bson
Binary JSON content. See http://bsonspec.org for details.