POST api/UnPos/Shop/Refund/AddOrUpdate
添加或修改一个退货单。注意,退货单仅在初始状态(任何一次退款前,才能被修改)。 提交退货单时,系统将验证其在售货单中是否有记录,没有的或已退货的退货单明细不能被引用; 需要判断返回值,返回值的errcode=0表示操作成功。
Request Information
URI Parameters
None.
Body Parameters
退货单的信息
UnPosRefundParmName | Description | Type | Additional information |
---|---|---|---|
billnum |
退货单单号。 |
string |
Required Max length: 20 |
sellbillnum |
引用的售货单的单号。 |
string |
Required Max length: 20 |
BusiFrom |
交易来源 1-前台 2互联网 |
string |
Required Max length: 1 |
BusiFromSubType |
子交易来源1-营业员小程序,2码牌 |
string |
Max length: 1 |
CodeCardType |
码牌类型 |
string |
Max length: 1 |
CardId |
码牌ID |
string |
Max length: 8 |
CardName |
码牌名/桌台号 |
string |
Max length: 40 |
HappenDate |
发生日期 YYYYMMDD |
string |
Required Max length: 8 |
HappenTime |
发生时间,HHMMSS |
string |
Required Max length: 6 |
UserCode |
商户用户代码 |
integer |
Required |
Reserve1 |
保留一 Varchar(50) |
string |
Max length: 50 |
Reserve2 |
保留二 Varchar(50) |
string |
Max length: 50 |
Memory |
备注。 |
string |
Max length: 100 |
Details |
明细记录。 |
Collection of UnPosRefundDetailParm |
Required |
Request Formats
application/json, text/json
{ "billnum": "sample string 1", "sellbillnum": "sample string 2", "BusiFrom": "sample string 3", "BusiFromSubType": "sample string 4", "CodeCardType": "sample string 5", "CardId": "sample string 6", "CardName": "sample string 7", "HappenDate": "sample string 8", "HappenTime": "sample string 9", "UserCode": 10, "Reserve1": "sample string 11", "Reserve2": "sample string 12", "Memory": "sample string 13", "Details": [ { "billnum": "sample string 1", "AutoId": 2, "ProductId": 3, "ProductName": "sample string 4", "BarCode": "sample string 5", "SellType": "sample string 6", "Standard": "sample string 7", "ProducingArea": "sample string 8", "QualityLevel": "sample string 9", "Unit": "sample string 10", "Amount": 11.0, "ListingPrice": 12.0, "RetailPrice": 13.0, "LowestRetailPrice": 14.0, "PurchaePrice": 15.0 }, { "billnum": "sample string 1", "AutoId": 2, "ProductId": 3, "ProductName": "sample string 4", "BarCode": "sample string 5", "SellType": "sample string 6", "Standard": "sample string 7", "ProducingArea": "sample string 8", "QualityLevel": "sample string 9", "Unit": "sample string 10", "Amount": 11.0, "ListingPrice": 12.0, "RetailPrice": 13.0, "LowestRetailPrice": 14.0, "PurchaePrice": 15.0 } ] }
application/xml, text/xml
<UnPosRefundParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.UnPos.Parms"> <BusiFrom>sample string 3</BusiFrom> <BusiFromSubType>sample string 4</BusiFromSubType> <CardId>sample string 6</CardId> <CardName>sample string 7</CardName> <CodeCardType>sample string 5</CodeCardType> <Details> <UnPosRefundDetailParm> <Amount>11</Amount> <AutoId>2</AutoId> <BarCode>sample string 5</BarCode> <ListingPrice>12</ListingPrice> <LowestRetailPrice>14</LowestRetailPrice> <ProducingArea>sample string 8</ProducingArea> <ProductId>3</ProductId> <ProductName>sample string 4</ProductName> <PurchaePrice>15</PurchaePrice> <QualityLevel>sample string 9</QualityLevel> <RetailPrice>13</RetailPrice> <SellType>sample string 6</SellType> <Standard>sample string 7</Standard> <Unit>sample string 10</Unit> <billnum>sample string 1</billnum> </UnPosRefundDetailParm> <UnPosRefundDetailParm> <Amount>11</Amount> <AutoId>2</AutoId> <BarCode>sample string 5</BarCode> <ListingPrice>12</ListingPrice> <LowestRetailPrice>14</LowestRetailPrice> <ProducingArea>sample string 8</ProducingArea> <ProductId>3</ProductId> <ProductName>sample string 4</ProductName> <PurchaePrice>15</PurchaePrice> <QualityLevel>sample string 9</QualityLevel> <RetailPrice>13</RetailPrice> <SellType>sample string 6</SellType> <Standard>sample string 7</Standard> <Unit>sample string 10</Unit> <billnum>sample string 1</billnum> </UnPosRefundDetailParm> </Details> <HappenDate>sample string 8</HappenDate> <HappenTime>sample string 9</HappenTime> <Memory>sample string 13</Memory> <Reserve1>sample string 11</Reserve1> <Reserve2>sample string 12</Reserve2> <UserCode>10</UserCode> <billnum>sample string 1</billnum> <sellbillnum>sample string 2</sellbillnum> </UnPosRefundParm>
application/x-www-form-urlencoded
Sample not available.
application/bson
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
{ "errcode": 1, "errmsg": "sample string 2", "tag": "sample string 3" }
application/xml, text/xml
<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
Binary JSON content. See http://bsonspec.org for details.