未完成订单-更改订单优惠

订单 - 更改未完成订单折扣金额

接口信息

  • 接口地址: {your-site-url}/api/skill/order/change-pending-order-discount-amount
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: POST
  • 说明: 此接口用于更改未完成订单的折扣金额。仅未完成订单可使用此 API,待处理订单不可使用。未完成订单指用户进行订单结账时填写了一部分信息但未提交支付、或提交了在线支付但未支付成功的订单。管理员可通过此接口帮助用户调整优惠金额。

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)
Content-Type application/json

请求参数 (JSON Body)

字段 类型 必填 说明
order_number string 订单编号
discount_amount string 折扣金额
discount_type string 折扣类型。1 = 固定金额折扣,2 = 按比例折扣。当 discount_type = 2 时,discount_amount 为百分比数值,折扣金额 = 商品总金额 × discount_amount%(例如 discount_type = 2, discount_amount = 10,折扣金额 = 商品总金额 × 10%)

请求示例

cURL

curl --location --request POST '{your-site-url}/api/skill/order/change-pending-order-discount-amount' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "order_number": "FECE602665703920188",
    "discount_amount": "33",
    "discount_type": "1"
}'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array 返回数据(成功时为空数组)

注意事项

  1. 仅未完成订单可使用此 API,待处理订单不可使用
  2. 未完成订单通过 订单-详细recall_status 判断:1(不可召回)或 2(可召回)为未完成订单
  3. 使用场景:管理员帮助用户调整优惠金额,在用户支付前修改订单折扣
  4. discount_type 值说明:1 = 固定金额折扣(discount_amount 即为折扣金额),2 = 按比例折扣(折扣金额 = 商品总金额 × discount_amount%)
  5. 订单折扣变更后可在 订单-详细discount_set 字段查看
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-06-03 11:08:34

results matching ""

    No results matching ""