1. Sales
V8STD
  • Index
  • Inventory
    • TrfRsAdj
      POST
    • GRConfirm
      POST
    • ItemStockOnHand
      POST
    • GRUpdate
      POST
    • QtyAdj
      POST
    • TrfRsOut
      POST
    • QtyAdjConfirm
      POST
    • StkCntUpdate
      POST
    • GoodsReturnUpdate
      POST
    • GoodsReturnConfirm
      POST
    • TrfRsIn
      POST
    • TrfReqConfirm
      POST
    • TrfReq
      POST
    • POUpdate
      POST
    • POStatusChange
      POST
    • TrfRsConfirm
      POST
  • Inventory Enquiry
    • enq_TrfRsOsNote
      POST
    • enq_TrfRs
      POST
  • Master
    • itemSearchTTPos
      POST
  • Master Export
    • barCodeExport
      POST
    • storeExport
      POST
    • staffExport
      POST
    • ReasonExport
      POST
    • itemPriceExport
      POST
    • itemMasterExport
      POST
    • tenderExport
      POST
  • Master Import
    • itemPriceImport
    • barcodeImport
    • itemMasterImport
    • staffImport
  • Sales
    • salesTransStd
      POST
    • salesValidate
      POST
    • salesVoid
      POST
    • salesMemoStdEnquiry
      POST
  • Vip
    • vipBonusAdjustVipStd
    • vipSearchVipStd
    • vipMasterBasicCreateVipStd
    • vipBonusEnquiryVipStd
  • Device Login
    • Get_APIKEY
  1. Sales

salesVoid

测试中
POST
/posservice/rest/salestransaction/void
salesVoid 取消銷售單據接口
接口說明:(如使用第三方電子支付方式,只能做退貨,不可以取消。涉及會員銷售,要校驗是否有足夠的積分扣除)
Interface Description: (If a third-party electronic payment method is used, it can only be returned and cannot be cancelled. When it comes to vip sales, check whether there is enough bouns deduction)
V2025.10.10 接口修改说明: 为区别单据属性 Request void doc 的 transHdr.docType 必须为“V”

请求参数

Authorization
在 header 添加参数
apiKey
示例:
apiKey: ********************
Body 参数application/json

示例
{
    "docKey": "S0013232324000007.1",
    "transHdr": {
        "txDate": "2024-09-27",
        "ledgerDatetime": "2024-09-27 11:59:06",
        "programName": "BACKEND",
        "storeCode": "BJ001",
        "tillId": "23",
        "docType": "V",
        "txSerial": 1,
        "docNo": "VS0013232324000007",
        "voidDocNo": "S0013232324000007",
        "orgPrefix": "HQ"
    },
    "orgSalesMemo": {
        "txDate": "2024-09-21",
        "storeCode": "BJ001",
        "tillId": "23",
        "docNo": "S0013232324000007",
        "netQty": 1.0,
        "netAmount": 150.0
    },
    "apiKey": "{{apiKey}}"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/posservice/rest/salestransaction/void' \
--header 'apiKey: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "docKey": "S0013232324000007.1",
    "transHdr": {
        "txDate": "2024-09-27",
        "ledgerDatetime": "2024-09-27 11:59:06",
        "programName": "BACKEND",
        "storeCode": "BJ001",
        "tillId": "23",
        "docType": "V",
        "txSerial": 1,
        "docNo": "VS0013232324000007",
        "voidDocNo": "S0013232324000007",
        "orgPrefix": "HQ"
    },
    "orgSalesMemo": {
        "txDate": "2024-09-21",
        "storeCode": "BJ001",
        "tillId": "23",
        "docNo": "S0013232324000007",
        "netQty": 1.0,
        "netAmount": 150.0
    },
    "apiKey": "{{apiKey}}"
}'

返回响应

🟢200成功
application/json
Body

示例
{
    "asynCode": null,
    "asynMessage": null,
    "asynStatus": 0,
    "className": null,
    "errorCode": 0,
    "errorLog": null,
    "errorMessage": null
}
🟢200处理数据失败
🟠404响应失败
修改于 2025-10-10 10:35:57
上一页
salesValidate
下一页
salesMemoStdEnquiry
Built with