AfterSale - 友好速搭 -- 开发文档

友好速搭

开放 API
使用说明 获取授权 全部 API 特殊 API 开放功能

AfterSale

AfterSale

#实体关系 AfterSale为友好速搭售后单信息 支持查询修改以及退款操作

AfterSale 对象支持 Webhook

AfterSale 相关API

GET /after_sale/:id获取单个售后单GET /after_sale获取售后单列表PUT /after_sale/:id修改售后单(该接口仅支持退货退款/换货中的 同意/驳回退货或者换货的操作 不包括退款 所有类型的退款均走售后单退款接口)POST /after_sale/:id/refund_amount售后单退款

AfterSale 属性

    • id
    • Number 类型,AfterSale id。
    • created_at
    • Datetime 类型,AfterSale 的创建时间。
    • refund_amount
    • String 类型,退款金额 单位元。

    • status
    • String 类型,售后单状态 详情请看下面的status表。

    • after_sale_reason
    • String 类型,售后原因。

    • after_sale_type
    • Number 类型,售后类型, 0代表仅退款,1代表退货退款,2代表换货。

    • consignee_area_description
    • String 类型,退货退款/换货下,由顾客退还给商家的退货地址。
    • consignee_detail
    • Bool 类型,退货退款/换货下,由顾客退还给商家的退货地址详情。
    • consignee_mobile
    • String 类型,退货退款/换货下,由顾客退还给商家的商家手机。
    • consignee_name
    • String 类型,退货退款/换货下,由顾客退还给商家的商家名称。
    • consignee_remark
    • String 类型,退货退款/换货下,由顾客退还给商家的商家备注。
    • customer_shipment
    • String 类型,customer_shipment, 退货退款/换货下,由顾客退还给商家的快递物流商。
    • customer_shipment_no
    • String 类型,customer_shipment_no, 退货退款/换货下,由顾客退还给商家的快递物流单号。
    • customer
    • Object 类型,customer, 顾客信息, 可参考 Customer
    • trackers
    •   { "trackers": [
                      {
                          "type": 1,
                          "title": "商家同意退货退款,待买家发货",
                          "detail": "【退货地址】收件人:chen,收件人联系电话:13322211122,收件人地址:广东省,广州市,天河区 思成路宏泰智慧谷 商家备注:确认商品收到以及无损 我们会在两个工作日内进行退款",
                          "created_at": "2021-07-06T11:40:29.784+08:00"
                      },
                      {
                          "type": 1,
                          "title": "商家拒绝退货退款",
                          "detail": "拒绝原因:驳回",
                          "created_at": "2021-07-06T11:40:25.453+08:00"
                      },
                      {
                          "type": 0,
                          "title": "买家发起退货退款申请",
                          "detail": "退款原因:我不想要了顾客留言:不想要",
                          "created_at": "2021-07-06T11:40:02.562+08:00"
                      }
                  ],}
      
      Array 类型,trackers, 售后操作记录, 包括顾客的发起/取消/确认 以及商家后台的确认/驳回/退款 都会记录在trackers, 其中字段的含义type=0为买家操作, type=1为商家操作; title为操作内容; detail为操作详情
    • order
    • Object 类型, 该售后单关联的订单信息,可参考Order
    • order_items
    • Array 类型, 该售后单关联的订单商品列表,可参考Order中的items。

AfterSale下的status属性 Number 类型

  • status与after_sale_type有关联关系, 当after_sale_type=0时,status对应范围为0-5; 当after_sale_type=1时,status对应范围为10-17;当after_sale_type=3时,status对应范围为20-28; 另外statu=99为三种售后类型的共同对应
    • 0
    • 买家发起退款申请
    • 1
    • 商家同意退款,退款中
    • 2
    • 系统退款成功
    • 3
    • 商家拒绝退款申请
    • 4
    • 系统退款失败
    • 5
    • 系统超时关闭
    • 10
    • 买家发起退货退款申请,待商家处理
    • 11
    • 商家同意退货退款,待买家发货
    • 12
    • 买家已发货,待商家收货
    • 13
    • 商家已收货,退款中
    • 14
    • 系统退款成功
    • 15
    • 商家拒绝申请
    • 16
    • 系统退款失败
    • 17
    • 系统超时关闭
    • 20
    • 买家发起换货申请,待商家处理
    • 21
    • 商家同意换货,待买家发货
    • 22
    • 买家已发货,待商家收货
    • 23
    • 商家已收货,待商家发货
    • 24
    • 商家已发货,待买家收货
    • 25
    • 买家收货,换货成功
    • 26
    • 商家拒绝换货
    • 27
    • 商家未收到货,关闭申请
    • 28
    • 系统超时关闭
    • 99
    • 买家取消售后

GET /after_sale/:id

获取单个售后单

    • GET /after_sale/:id
    • HTTP/1.1 200 OK

      {
              "after_sale": {
                  "after_sale_reason": "我不想要了",
                  "after_sale_type": 1,
                  "consignee_area_description": "广东省,广州市,天河区",
                  "consignee_detail": "思成路宏泰智慧谷",
                  "consignee_mobile": "13322211122",
                  "consignee_name": "chen",
                  "consignee_remark": "确认商品收到以及无损 我们会在两个工作日内进行退款",
                  "created_at": "2021-07-06T11:39:40.965+08:00",
                  "customer": {
                      "addresses": [
                          {
                              "city": "石家庄市",
                              "city_code": "130100",
                              "completed_address": "中国,河北省,石家庄市,新华区,广州萝岗万达广场",
                              "country": "中国",
                              "country_code": "CN",
                              "created_at": "2021-06-19T14:23:29.223+08:00",
                              "detail": "广州萝岗万达广场",
                              "district": "新华区",
                              "district_code": "130105",
                              "email": "",
                              "id": 1676,
                              "id_card": "",
                              "is_default": true,
                              "mobile": "13631293532",
                              "name": "陈盈达",
                              "province": "河北省",
                              "province_code": "130000",
                              "telephone": "",
                              "updated_at": "2021-06-19T14:23:29.223+08:00",
                              "zipcode": "510000"
                          }
                      ],
                      "applet_type": false,
                      "avatar": {},
                      "birthday": "1990-01-01T00:00:00.000+08:00",
                      "black_list": false,
                      "created_at": "2021-06-08T17:56:33.267+08:00",
                      "customer_level_name": "普通会员",
                      "id": 18055,
                      "identity_card": "3622**********2933",
                      "last_in": "2021-07-06T11:19:15.352+08:00",
                      "last_year_reward_point": 0,
                      "master_id": null,
                      "name": "13631293532",
                      "notify_email": "807683752@example.com",
                      "notify_phone": "13631293532",
                      "real_name": "张三",
                      "reg_identity": "13631293532",
                      "reg_type": "mobile",
                      "reward_point": 0,
                      "sex": "",
                      "social_accounts": [],
                      "social_avatar_url": null,
                      "social_type": "",
                      "total_credit": 0,
                      "trade_total_amount": 210,
                      "trade_total_count": -11,
                      "updated_at": "2021-07-06T11:39:06.298+08:00"
                  },
                  "customer_shipment": null,
                  "customer_shipment_no": null,
                  "id": 881,
                  "items": [
                      {
                          "trade_item_id": 156386,
                          "refund_amount": 2,
                          "refund_count": 1
                      }
                  ],
                  "order": {
                      "id": 146452,
                      "status": 0,
                      "payment_status": 2,
                      "shipment_status": "sending",
                      "payment_method_type": 1,
                      "total_amount": 200,
                      "auto_total_amount": 200,
                      "item_amount": 200,
                      "discount_amount": 0,
                      "shipment_amount": 0,
                      "customer_remarks": "",
                      "purchase_ip": "",
                      "processed_at": "2021-07-06T11:39:06.044+08:00",
                      "close_at": null,
                      "processing_method": 0,
                      "created_at": "2021-07-06T11:39:06.194+08:00",
                      "updated_at": "2021-07-06T11:39:21.330+08:00",
                      "device": "pc",
                      "webanalytics_context": "{\"uid\":\"c5a9e815-5062-3ef4-4643-e6defb005f40\",\"sid\":\"c053437701244573af38d53e000eb845\",\"order_no\":\"2021070615890606352\",\"host\":\"cydauqiia.t.yurl.vip\",\"ip\":\"\",\"referer_url\":\"http://cydauqiia.t.yurl.vip/center/main/\",\"page_url\":\"http://cydauqiia.t.yurl.vip/products/p000002\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36\"}",
                      "pay_at": null,
                      "shipment_at": "2021-07-06T11:39:21.330+08:00",
                      "receive_at": null,
                      "extra_amount": 0,
                      "enable_extra_amount": false,
                      "is_star": false,
                      "star_color": null
                  },
                  "order_items": [
                      {
                          "barcode": "",
                          "created_at": "2021-07-06T11:39:06.165+08:00",
                          "discount_amount": 0,
                          "id": 156386,
                          "image": null,
                          "name": "123",
                          "options_desc": "颜色:21",
                          "price": 2,
                          "product_id": 153064,
                          "quantity": 1,
                          "updated_at": "2021-07-06T11:39:06.233+08:00",
                          "variant_id": 259885,
                          "volume": 0,
                          "weight": 0
                      }
                  ],
                  "refund_amount": 2,
                  "trackers": [
                      {
                          "type": 1,
                          "title": "商家同意退货退款,待买家发货",
                          "detail": "【退货地址】收件人:chen,收件人联系电话:13322211122,收件人地址:广东省,广州市,天河区 思成路宏泰智慧谷 商家备注:确认商品收到以及无损 我们会在两个工作日内进行退款",
                          "created_at": "2021-07-06T11:40:29.784+08:00"
                      },
                      {
                          "type": 1,
                          "title": "商家拒绝退货退款",
                          "detail": "拒绝原因:驳回",
                          "created_at": "2021-07-06T11:40:25.453+08:00"
                      },
                      {
                          "type": 0,
                          "title": "买家发起退货退款申请",
                          "detail": "退款原因:我不想要了顾客留言:不想要",
                          "created_at": "2021-07-06T11:40:02.562+08:00"
                      }
                  ],
                  "updated_at": "2021-07-06T11:40:29.794+08:00",
                  "status": 11
              }
          }
      

GET /after_sale

获取售后单列表

    • GET /after_sale
    • HTTP/1.1 200 OK
    
              "after_sales": [
                  {
                      "id": 883,
                      "after_sale_type": 0,
                      "after_sale_reason": null,
                      "refund_amount": 0.1,
                      "customer_shipment_no": null,
                      "customer_shipment": null,
                      "consignee_name": null,
                      "consignee_mobile": null,
                      "consignee_detail": null,
                      "consignee_area_description": null,
                      "consignee_remark": null,
                      "created_at": "2021-07-06T16:14:41.191+08:00",
                      "updated_at": null,
                      "status": 4,
                      "customer": {
                          "id": 18055,
                          "name": "13631293532",
                          "reg_type": "mobile",
                          "social_type": "",
                          "social_avatar_url": null,
                          "last_in": "2021-07-06T14:53:23.671+08:00",
                          "notify_email": "807683752@example.com",
                          "notify_phone": "13631293532",
                          "real_name": "张三",
                          "identity_card": "3622**********2933",
                          "created_at": "2021-06-08T17:56:33.267+08:00",
                          "updated_at": "2021-07-06T17:46:15.912+08:00",
                          "trade_total_count": -13,
                          "trade_total_amount": 190,
                          "total_credit": 0,
                          "black_list": false,
                          "birthday": "1990-01-01T00:00:00.000+08:00",
                          "applet_type": false,
                          "sex": "",
                          "master_id": null
                      },
                      "order": {
                          "id": 146455,
                          "status": "refunded",
                          "payment_status": "paid",
                          "shipment_status": "sending",
                          "payment_method_type": "online",
                          "total_amount": 0.1,
                          "auto_total_amount": 0.1,
                          "item_amount": 0.1,
                          "discount_amount": 0,
                          "shipment_amount": 0,
                          "customer_remarks": "",
                          "purchase_ip": "",
                          "processed_at": "2021-07-06T16:08:05.749+08:00",
                          "close_at": null,
                          "processing_method": "direct",
                          "created_at": "2021-07-06T16:08:05.843+08:00",
                          "updated_at": "2021-07-06T16:10:49.779+08:00",
                          "device": "pc",
                          "webanalytics_context": "{\"uid\":\"c5a9e815-5062-3ef4-4643-e6defb005f40\",\"sid\":\"c053437701244573af38d53e000eb845\",\"order_no\":\"2021070615890680497\",\"host\":\"cydauqiia.t.yurl.vip\",\"ip\":\"\",\"referer_url\":\"http://cydauqiia.t.yurl.vip/center/main/\",\"page_url\":\"http://cydauqiia.t.yurl.vip/products/p000002\",\"user_agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36\"}",
                          "pay_at": null,
                          "shipment_at": "2021-07-06T16:10:49.779+08:00",
                          "receive_at": null,
                          "extra_amount": 0,
                          "enable_extra_amount": false,
                          "is_star": false,
                          "star_color": null
                      },
                      "trackers": [
                          {
                              "created_at": "2021-07-06T16:14:44.847+08:00",
                              "detail": "退款原因:快递/物流一直未送到",
                              "title": "买家发起退款",
                              "type": 0
                          },
                          {
                              "created_at": "2021-07-06T16:22:02.081+08:00",
                              "detail": "",
                              "title": "商家同意退款",
                              "type": 1
                          },
                          {
                              "created_at": "2021-07-06T16:22:02.548+08:00",
                              "detail": "失败原因:",
                              "title": "系统退款失败",
                              "type": 1
                          }
                      ],
                      "items": [
                          {
                              "refund_amount": 0.1,
                              "refund_count": 1
                          }
                      ],
                      "order_items": [
                          {
                              "id": 156389,
                              "quantity": 1,
                              "price": 0.1,
                              "name": "a",
                              "options_desc": null,
                              "weight": 0,
                              "volume": 0,
                              "barcode": "",
                              "variant_id": 259881,
                              "product_id": 153061,
                              "created_at": "2021-07-06T16:08:05.798+08:00",
                              "updated_at": "2021-07-06T16:08:05.922+08:00",
                              "discount_amount": 0
                          }
                      ]
                  }
              ]
    

PUT /after_sale/:id

修改售后单(该接口仅支持退货退款/换货中的 同意/驳回退货或者换货的操作 不包括退款 所有类型的退款均走售后单退款接口)

    • status
    • 售后单状态 支持传入驳回状态(3, 15, 26) 同意状态(11, 21, 23, 24)
    • consignee_name
    • 退货退款/换货下,由顾客退还给商家的商家名称, 当传入status=11或status=12时 该字段必传
    • consignee_mobile
    • 退货退款/换货下,由顾客退还给商家的商家手机, 当传入status=11或status=12时 该字段必传
    • consignee_detail
    • 退货退款/换货下,由顾客退还给商家的退货地址详情, 当传入status=11或status=12时 该字段必传
    • consignee_area_description
    • 退货退款/换货下,由顾客退还给商家的退货地址, 当传入status=11或status=12时 该字段必传
    • consignee_remark
    • 退货退款/换货下,由顾客退还给商家的商家备注, 当传入status=11或status=12时 该字段必传
    • customer_shipment
    • 换货(即after_sale_type = 2)下 商家确认收货后 寄回给买家的快递所使用物流商 该信息只记录在trackers 与属性中customer_shipment不相同
    • customer_shipment_no
    • 换货(即after_sale_type = 2)下 商家确认收货后 寄回给买家的快递所使用物流单号 该信息只记录在trackers 与属性中customer_shipment_no不相同

POST /after_sale/:id/refund_amount

售后单退款

    • 售后单退款
    • POST /after_sale/:id/refund_amount
    • HTTP/1.1 200 OK
免费领取15天试用
立即注册
联系客服
微信咨询
微信二维码

领取免费试用资格

姓名 *

电话 *

公司名称

所在地区

意向产品

提交

提交成功

你好, XXX女士/先生 ,你的需求已提交成功,后续会有专门的客户经理与你电话联系。谢谢!