POST api/Pos/MiniProgram/Refund/AddOrUpdate
添加或修改一个退货单。注意,退货单仅在初始状态(任何一次退款前,才能被修改)。 提交退货单时,系统将验证其在售货单中是否有记录,没有的或已退货的退货单明细不能被引用; 需要判断返回值,返回值的errcode=0表示操作成功。
Request Information
URI Parameters
None.
Body Parameters
退货单的信息
PosRefundParmName | Description | Type | Additional information |
---|---|---|---|
billnum |
退货单单号。 |
string |
Required Max length: 20 |
sellbillnum |
引用的售货单的单号。 |
string |
Required Max length: 20 |
shopid |
售理退货的门店。 |
string |
Required Max length: 4 |
happendate |
发生日期 YYYYMMDD |
string |
Required Max length: 8 |
happentime |
发生时间,HHMMSS |
string |
Required Max length: 6 |
busiformtype |
交易来源,1前台POS,2手机POS,3其他或互联网 |
string |
Required Max length: 6 |
memory |
备注。 |
string |
Max length: 100 |
details |
明细记录。 |
Collection of PosRefundDetailParm |
Required |
Request Formats
application/json, text/json
Sample:
{ "billnum": "sample string 1", "sellbillnum": "sample string 2", "shopid": "sample string 3", "happendate": "sample string 4", "happentime": "sample string 5", "busiformtype": "sample string 6", "memory": "sample string 7", "details": [ { "billnum": "sample string 1", "productid": 2, "amount": 3.0, "costprice": 4.0, "discountrate": 5.0, "discountbase": 6.0, "retailprice": 7.0, "autoid": 8, "fee": 9.0 }, { "billnum": "sample string 1", "productid": 2, "amount": 3.0, "costprice": 4.0, "discountrate": 5.0, "discountbase": 6.0, "retailprice": 7.0, "autoid": 8, "fee": 9.0 } ] }
application/xml, text/xml
Sample:
<PosRefundParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm"> <billnum>sample string 1</billnum> <busiformtype>sample string 6</busiformtype> <details> <PosRefundDetailParm> <amount>3</amount> <autoid>8</autoid> <billnum>sample string 1</billnum> <costprice>4</costprice> <discountbase>6</discountbase> <discountrate>5</discountrate> <fee>9</fee> <productid>2</productid> <retailprice>7</retailprice> </PosRefundDetailParm> <PosRefundDetailParm> <amount>3</amount> <autoid>8</autoid> <billnum>sample string 1</billnum> <costprice>4</costprice> <discountbase>6</discountbase> <discountrate>5</discountrate> <fee>9</fee> <productid>2</productid> <retailprice>7</retailprice> </PosRefundDetailParm> </details> <happendate>sample string 4</happendate> <happentime>sample string 5</happentime> <memory>sample string 7</memory> <sellbillnum>sample string 2</sellbillnum> <shopid>sample string 3</shopid> </PosRefundParm>
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
添加或修改一个退货单。注意,退货单仅在初始状态(任何一次退款前,才能被修改)。 提交退货单时,系统将验证其在售货单中是否有记录,没有的或已退货的退货单明细不能被引用; 需要判断返回值,返回值的errcode=0表示操作成功。
CommonOperationResultName | 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.