POST api/Pos/Sell/Bill/AddOrUpdate

添加或修改一个售货单。注意,售货单仅在初始状态(任何一次付款前,才能被修改)。 提交售货单时,系统将验证其在仓库是否有记录(哪怕是库存为零),没有的不能提交; 其次将验证其在门店是否有报价;当零售价与门价当前价格不一致时,将提交失败; 将验证折后价是否低于最低零售限价,折合价低于此价格时,将提交失败。 需要判断返回值,返回值的errcode=0表示操作成功。 本操作成功后会有回调。 操作的流程是: A:下单后支付 (1)AddOrUpdate(下单) (2)PayBill(支付)。 B:下单后关闭订单: (1)AddOrUpdate(下单)。 (2)DeleteOrClose(删除或关闭订单)。

Request Information

URI Parameters

None.

Body Parameters

售货单的信息

PosSellFromWebInterfaceParm
NameDescriptionTypeAdditional information
SenderBillNum

第三方的唯一单据号(对接方的单据的主键)。 每次调用时,会依据这个号码进行“幂等处理”,不会重复提交。 此处的幂等基于访问者的用户对应的客户单位,当这个设置被更改时,同一个SenderBillNum可能两次提交。

string

Required

Max length: 32

GuiderNumber

绑定导游的导游证号。

string

Max length: 20

Memory

订单本身备注。

string

Max length: 100

MemberId

会员的ID。这个ID是票务系统的会员的ID,不是第三方的会员的ID,一般情况下,这个是没有的。 只有在官方的小程序,会有这个。

integer

None.

GuestMobile

顾客电话

string

Max length: 20

GuestName

顾客姓名

string

Max length: 30

GuestCeriCode

顾客证件号

string

Max length: 20

PlanDeliverType

预计的/申请的取件方式,1-现场取货,2快递递送,3-其他

string

Max length: 1

DeliverAddress

邮寄地址

string

Max length: 50

GuestMemory

顾客留言

string

Max length: 50

Details

销售的明细商品清单, 至少需要有一个明细记录。

Collection of PosSellFromWebInterfaceDetailParm

Required

Request Formats

application/json, text/json

Sample:
{
  "SenderBillNum": "sample string 1",
  "GuiderNumber": "sample string 2",
  "Memory": "sample string 3",
  "MemberId": 1,
  "GuestMobile": "sample string 4",
  "GuestName": "sample string 5",
  "GuestCeriCode": "sample string 6",
  "PlanDeliverType": "sample string 7",
  "DeliverAddress": "sample string 8",
  "GuestMemory": "sample string 9",
  "Details": [
    {
      "ProductId": 1,
      "Amount": 2.0,
      "DiscountRate": 3.0,
      "DiscountBase": 4.0,
      "RetailPrice": 5.0,
      "Unit": "sample string 6",
      "Standard": "sample string 7"
    },
    {
      "ProductId": 1,
      "Amount": 2.0,
      "DiscountRate": 3.0,
      "DiscountBase": 4.0,
      "RetailPrice": 5.0,
      "Unit": "sample string 6",
      "Standard": "sample string 7"
    }
  ]
}

application/xml, text/xml

Sample:
<PosSellFromWebInterfaceParm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Tour.V5.Parm">
  <DeliverAddress>sample string 8</DeliverAddress>
  <Details>
    <PosSellFromWebInterfaceDetailParm>
      <Amount>2</Amount>
      <DiscountBase>4</DiscountBase>
      <DiscountRate>3</DiscountRate>
      <ProductId>1</ProductId>
      <RetailPrice>5</RetailPrice>
      <Standard>sample string 7</Standard>
      <Unit>sample string 6</Unit>
    </PosSellFromWebInterfaceDetailParm>
    <PosSellFromWebInterfaceDetailParm>
      <Amount>2</Amount>
      <DiscountBase>4</DiscountBase>
      <DiscountRate>3</DiscountRate>
      <ProductId>1</ProductId>
      <RetailPrice>5</RetailPrice>
      <Standard>sample string 7</Standard>
      <Unit>sample string 6</Unit>
    </PosSellFromWebInterfaceDetailParm>
  </Details>
  <GuestCeriCode>sample string 6</GuestCeriCode>
  <GuestMemory>sample string 9</GuestMemory>
  <GuestMobile>sample string 4</GuestMobile>
  <GuestName>sample string 5</GuestName>
  <GuiderNumber>sample string 2</GuiderNumber>
  <MemberId>1</MemberId>
  <Memory>sample string 3</Memory>
  <PlanDeliverType>sample string 7</PlanDeliverType>
  <SenderBillNum>sample string 1</SenderBillNum>
</PosSellFromWebInterfaceParm>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

添加或修改一个售货单。注意,售货单仅在初始状态(任何一次付款前,才能被修改)。 提交售货单时,系统将验证其在仓库是否有记录(哪怕是库存为零),没有的不能提交; 其次将验证其在门店是否有报价;当零售价与门价当前价格不一致时,将提交失败; 将验证折后价是否低于最低零售限价,折合价低于此价格时,将提交失败。 需要判断返回值,返回值的errcode=0表示操作成功。 本操作成功后会有回调。 操作的流程是: A:下单后支付 (1)AddOrUpdate(下单) (2)PayBill(支付)。 B:下单后关闭订单: (1)AddOrUpdate(下单)。 (2)DeleteOrClose(删除或关闭订单)。

CommonOperationResultWithTagOfPosSellFromWebInterfaceResult
NameDescriptionTypeAdditional information
errcode

integer

None.

errmsg

string

None.

tag

PosSellFromWebInterfaceResult

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": {
    "SenderBillNum": "sample string 1",
    "BillNum": "sample string 2",
    "BillState": "sample string 3"
  }
}

application/xml, text/xml

Sample:
<CommonOperationResultWithTagOfPosSellFromWebInterfaceResultlTRO8TLE 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 2</d2p1:BillNum>
    <d2p1:BillState>sample string 3</d2p1:BillState>
    <d2p1:SenderBillNum>sample string 1</d2p1:SenderBillNum>
  </tag>
</CommonOperationResultWithTagOfPosSellFromWebInterfaceResultlTRO8TLE>