POST api/Pos/Busi/Refund/AddOrUpdate

添加或修改一个退货单。注意,退货单仅在初始状态(任何一次退款前,才能被修改)。 提交退货单时,系统将验证其在售货单中是否有记录,没有的或已退货的退货单明细不能被引用; 需要判断返回值,返回值的errcode=0表示操作成功。

Request Information

URI Parameters

None.

Body Parameters

退货单的信息

PosRefundParm
NameDescriptionTypeAdditional information
BillNum

退货单单号。

string

Required

Max length: 20

SellBillNum

引用的售货单的单号。

string

Required

Max length: 20

ShopId

售理退货的门店。

string

Required

Max length: 4

BusiFromType

交易来源,1前台POS,2手机POS,3其他或互联网

string

Required

Max length: 6

Memory

备注。

string

Max length: 100

DWID

客户ID.

string

Max length: 36

DWSX

客户类型,1-地接社,2组团社,3-协议单位,4-地接部门,5-组团部门,7导游员。

string

Max length: 1

GuestMemory

顾客留言。

string

Max length: 100

AutoRefundMoney

是否自动退款,‘1’表示是,0表示否。 如果是互联网发过来的订单,则应设置为‘1’。 如果是前台的订单,则可以为‘1’或‘0’ 如果为‘0’,则可以一次性办结的业务,需要提供RefundMoneyList清单内容,以指明退款的条目。

string

Max length: 1

RefundMoneyList

退款条目清单。

Collection of RefundTicketRefundMoneyParm

None.

Details

退货的明细记录。

Collection of PosRefundDetailParm

Required

SenderBillNum

第三方退货单据号ID。

string

Max length: 32

Request Formats

application/json, text/json

Sample:
{
  "BillNum": "sample string 1",
  "SellBillNum": "sample string 2",
  "ShopId": "sample string 3",
  "BusiFromType": "sample string 4",
  "Memory": "sample string 5",
  "DWID": "sample string 6",
  "DWSX": "sample string 7",
  "GuestMemory": "sample string 8",
  "AutoRefundMoney": "sample string 9",
  "RefundMoneyList": [
    {
      "OrgPaymentBillNum": "sample string 1",
      "RefundAmount": 2.0,
      "UseCashForce": "sample string 3"
    },
    {
      "OrgPaymentBillNum": "sample string 1",
      "RefundAmount": 2.0,
      "UseCashForce": "sample string 3"
    }
  ],
  "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
    }
  ],
  "SenderBillNum": "sample string 10"
}

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">
  <AutoRefundMoney>sample string 9</AutoRefundMoney>
  <BillNum>sample string 1</BillNum>
  <BusiFromType>sample string 4</BusiFromType>
  <DWID>sample string 6</DWID>
  <DWSX>sample string 7</DWSX>
  <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>
  <GuestMemory>sample string 8</GuestMemory>
  <Memory>sample string 5</Memory>
  <RefundMoneyList>
    <RefundTicketRefundMoneyParm>
      <OrgPaymentBillNum>sample string 1</OrgPaymentBillNum>
      <RefundAmount>2</RefundAmount>
      <UseCashForce>sample string 3</UseCashForce>
    </RefundTicketRefundMoneyParm>
    <RefundTicketRefundMoneyParm>
      <OrgPaymentBillNum>sample string 1</OrgPaymentBillNum>
      <RefundAmount>2</RefundAmount>
      <UseCashForce>sample string 3</UseCashForce>
    </RefundTicketRefundMoneyParm>
  </RefundMoneyList>
  <SellBillNum>sample string 2</SellBillNum>
  <SenderBillNum>sample string 10</SenderBillNum>
  <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表示操作成功。

CommonOperationResultWithTagOfPosRefundResult
NameDescriptionTypeAdditional information
errcode

integer

None.

errmsg

string

None.

tag

PosRefundResult

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": {
    "BillNum": "sample string 1",
    "RefundAuthState": "sample string 2",
    "RefundState": "sample string 3"
  }
}

application/xml, text/xml

Sample:
<CommonOperationResultWithTagOfPosRefundResultlTRO8TLE 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.Parm">
    <d2p1:BillNum>sample string 1</d2p1:BillNum>
    <d2p1:RefundAuthState>sample string 2</d2p1:RefundAuthState>
    <d2p1:RefundState>sample string 3</d2p1:RefundState>
  </tag>
</CommonOperationResultWithTagOfPosRefundResultlTRO8TLE>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.