# 更新售后

# 接口调用请求说明

订单原始状态为10, 200, 250时会返回错误码100000 finish_all_aftersale = 1时订单状态会流转到200(售后结束)

http请求方式:POST
https://api.weixin.qq.com/shop/aftersale/update?access_token=xxxxxxxxx

# 请求参数示例

{
    "order_id":32434234,            // 发起售后的订单ID
    "out_order_id": "xxxxx",
    "aftersale_id":12314521321,     // 售后单ID
    "out_aftersale_id": "xxxxxx",   // 商家售后ID
    "openid": "oTVP50O53a7jgmawAmxKukNlq3XI",
    "type": 1,          // 1:退款,2:退款退货,3:换货
    "status": 1,       // 0:未受理,1:用户取消,2:商家受理中,3:商家逾期未处理,4:商家拒绝退款,5:商家拒绝退货退款,6:待买家退货,7:退货退款关闭,8:待商家收货,11:商家退款中,12:商家逾期未退款,13:退款完成,14:退货退款完成
    "finish_all_aftersale": 0, // 0:售后未结束, 1:售后结束且订单状态流转
    "product_infos":
    [
        {
            "product_id": 234245,
            "sku_id":23424,
            "product_cnt": 5
        },
        ...
    ]
}

# 回包示例

{
    "errcode": 0,
    "errmsg":"ok"
}

# 请求参数说明

参数 类型 是否必填 说明
order_id number 订单ID
out_order_id string 商家自定义订单ID,与 order_id 二选一
aftersale_id number 交易组件平台内部售后ID
out_aftersale_id string 商家自定义售后ID,与aftersale_id二选一
openid string 用户的openid
type number 售后类型,1:退款,2:退款退货,3:换货
status number 0:未受理,1:用户取消,2:商家受理中,3:商家逾期未处理,4:商家拒绝退款,5:商家拒绝退货退款,6:待买家退货,7:退货退款关闭,8:待商家收货,11:商家退款中,12:商家逾期未退款,13:退款完成,14:退货退款完成
finish_all_aftersale number 0:售后未结束, 1:售后结束且订单状态流转
product_infos object array 退货相关商品列表
product_infos[].product_id number 交易组件平台内部商品ID
product_infos[].out_product_id string 商家自定义商品ID,与product_id二选一
product_infos[].sku_id number product_infos存在时必填 交易组件平台内部skuID,可填0,如果这个product_id下没有sku的时候
product_infos[].product_cnt number product_infos存在时必填 参与售后的商品数量

# 回包参数说明

参数 类型 说明
errcode number 错误码
errmsg string 错误信息