用户
 找回密码
 立即注册
搜索

[通用板块] 订单类接口

发表于 2016-8-17 16:37:15

1. 根据订单编号获取订单信息
1.1接口调用说明:
协议
http
HTPP请求方式
POST
请求URL
https://open.weixin12315.com/order/?type=getbyid&access_token=ACCESS_TOKEN
POST数据格式
json
1.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
POST数据
订单信息
1.3 POST数据说明:
{"order_number": "fw2014112617215289"}
参数
说明
order_number
订单编号
1.4 返回数据说明:
{
"OpenID":"os82ksdjlasdf02ljdfd",
"OrderNumber":"fw2014112617215289",
"TotalPrice":"2.00",
"Fees":"0.00",
"PayPrice":"2.00",
"OrderStatus":"已付款",
"PayStatus":"0",
"PayWay":"微信支付",
"PassTime":"2014-11-26 17:21:49",
"Consignee":"JIMLI",
"Province":"广东省",
"City":"广州市",
"County":"天河区",
"Address":"中山大道西299号大舜丽池行政楼2楼",
"Mobile":"13800138000",
"Postcode":"513000",
"VolumeDenomination":"0",
"Commission":"0.00",
"FullDiscount":"0.00",
"TotalWeight":"0.00",
"OrderTime":"2014-11-19 17:21:49",
  "Remark":"",
"Products":[
{
"Product_name":"精准粉丝营销系统(带三级分销功能)",
"Product_price":"1.00",
"Product_point":"10",
"Product_count":"1",
"Product_sku":"规格1,规格2",
"Product_img":"http://image.weixin12315.com.cn/UpLoads/ItemPic/8c27459a-862c-4639-a3ff-0e9b8744901a.jpg"

},
{
"Product_name":"精准粉丝营销系统(带三级分销功能)",
"Product_price":"1.00",
"Product_point":"10",
"Product_count":"1",
"Product_sku":"规格1,规格2",
"Product_img":"http://image.weixin12315.com.cn/UpLoads/ItemPic/8c27459a-862c-4639-a3ff-0e9b8744901a.jpg"
}
}
字段
说明
OpenID
下单人openid
OrderNumber
订单编号
TotalPrice
订单原总价
Fees
运费
PayPrice
订单商品的总金额(不含运费)
OrderStatus
订单状态(新订单,已确认(货到付款方式),已付款,已发货,已收货,完成交易,取消交易
PayStatus
支付状态(0是未支付,1是已支付
PayWay
支付方式
PassTime
付款时间
Consignee
收货人姓名
Province
收货人地址-省
City
收货人地址-市
County
收货人地址-区
Address
收货人详细地址
Mobile
手机
Postcode
邮政编码
VolumeDenomination
订单抵扣的购物券面值
Commission
订单抵扣的佣金金额
FullDiscount
订单参与促销的优惠金额
TotalWeight
总重量
OrderTime
下单时间
Remark
订单备注
Products
订单包含的商品信息
Product_name:商品名称
Product_price:商品价格
Product_point:兑换积分
Product_count:商品数量
Product_sku:商品规格
Product_sku_id:规格ID
Product_img:商品第一张图片
ProductType: 商品类型:0:正品;1:积分换购
ProductID: ProductType=0为产品ID,ProductType=1为促销ID
ProNumber: 商品编码
2. 设置订单发货信息
2.1接口调用说明:
协议
http
HTPP请求方式
POST
请求URL
https://open.weixin12315.com/order/?type=setdelivery&access_token=ACCESS_TOKEN
POST数据格式
json
2.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
POST数据
物流信息
2.3 POST数据说明:
{
"order_number":"fw2014112617215289",
"delivery_company":"圆通快递",
"delivery_track_no":"1900659372473"
}
参数
说明
order_number
订单编号
delivery_company
物流公司
delivery_track_no
物流单号
2..4返回数据说明:
{"errcode":0,"errmsg":"success"}
参数
说明
errcode
错误编码
errmsg
错误描述
3. 根据订单状态和订单时间获取订单列表
1.1接口调用说明:
协议
http
HTPP请求方式
POST
请求URL
https://open.weixin12315.com/order/?type=getbyfilte&access_token=ACCESS_TOKEN
POST数据格式
json
1.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
POST数据
订单信息
1.3 POST数据说明:
{
"status": "新订单",
"begintime": "1397130460",
"endtime": "1397130460"
}
参数
说明
status
必须值,根据订单接口获取的订单状态
begintime
非必须,订单创建开始时间戳,不传此参数则不按此条件查询
endtime
非必须,订单创建结束时间戳,不传此参数则不按此条件查询
1.4 返回数据说明:
{
"errcode": 0,
"errmsg": "success",
"order_list": [{
"OpenID":"os82ksdjlasdf02ljdfd",
"OrderNumber":"fw2014112617215289",
"TotalPrice":"2.00",
"Fees":"0.00",
"PayPrice":"2.00",
"OrderStatus":"已付款",
"PayStatus":"0",
"PayWay":"微信支付",
"PassTime":"2014-11-26 17:21:49",
"Consignee":"JIMLI",
"Province":"广东省",
"City":"广州市",
"County":"天河区",
"Address":"中山大道西299号大舜丽池行政楼2楼",
"Mobile":"13800138000",
"Postcode":"513000",
"VolumeDenomination":"0",
"Commission":"0.00",
"FullDiscount":"0.00",
"TotalWeight":"0.00",
"OrderTime":"2014-11-19 17:21:49",
"Remark":""
},
{
"OpenID":"os82ksdjlasdf02ljdfd",
"OrderNumber":"fw2014112617215289",
"TotalPrice":"2.00",
"Fees":"0.00",
"PayPrice":"2.00",
"OrderStatus":"已付款",
"PayStatus":"0",
"PayWay":"微信支付",
"PassTime":"2014-11-26 17:21:49",
"Consignee":"JIMLI",
"Province":"广东省",
"City":"广州市",
"County":"天河区",
"Address":"中山大道西299号大舜丽池行政楼2楼",
"Mobile":"13800138000",
"Postcode":"513000",
"VolumeDenomination":"0",
"Commission":"0.00",
"FullDiscount":"0.00",
"TotalWeight":"0.00",
"OrderTime":"2014-11-19 17:21:49",
"Remark":""
}
]
}
字段
说明
errcode
错误编码
errmsg
结果描述
order_list
订单集合,详细字段说明见根据订单ID获取订单信息,最大上限为500条记录;
4. 获取订单状态
4.1接口调用说明:
协议
http
HTPP请求方式
GET
请求URL
https://open.weixin12315.com/order/?type=getorderstatus&access_token=ACCESS_TOKEN
4.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
4.3返回数据说明:
{
"errcode":0,
"errmsg":"success",
"orderStatus":"新订单,待发货,完成交易"
}
参数
说明
errcode
错误编码
errmsg
错误描述
orderStatus
返回的订单状态,多个状态用逗号分隔;
5. 取消订单(暂不开放)
5.1接口调用说明:
协议
http
HTPP请求方式
POST
请求URL
https://open.weixin12315.com/order/?type=close&access_token=ACCESS_TOKEN
POST数据格式
json

5.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
POST数据
订单信息
5.3 POST数据说明:
{
"order_number": "fw2014112617215289"
}
参数
说明
order_number
订单编号
6. 根据订单编号查询退换货记录
1.1接口调用说明:
协议
http
HTPP请求方式
POST
请求URL
https://open.weixin12315.com/order/?type=getreturnorder&access_token=ACCESS_TOKEN
POST数据格式
json
1.2请求参数说明:
参数
是否必须
说明
access_token
接口调用凭证
POST数据
订单信息
1.3 POST数据说明:
{"order_number": "fw2014112617215289"}
参数
说明
order_number
订单编号
1.4 返回数据说明:
{
  "errcode": 0,
  "errmsg": "success",
  "data_list": [
    {
      "OrderNumber": "fw2016071114579443",
      "Type": "2",
      "ApplyRemark": "商品质量问题",
      "Apply_fee": "65.00",
      "Total_fee": "0.00",
      "Mobile": "15878909987",
      "Remark": "",
      "RunStatus": "5",
      "ReturnNumber": "20160711150602309574",
      "Examine": "1",
      "AddTime": "2016/7/11 15:06:02",
      "SendTime": "2016/7/11 15:00:42",
      "ReturnTime": "2016/7/11 15:00:54",
      "Reason": ""
    },
    {
      "OrderNumber": "fw2016071114579443",
      "Type": "2",
      "ApplyRemark": "未收到商品",
      "Apply_fee": "65.00",
      "Total_fee": "0.00",
      "Mobile": "15878909987",
      "Remark": "",
      "RunStatus": "6",
      "ReturnNumber": "20160711150330027726",
      "Examine": "0",
      "AddTime": "2016/7/11 15:03:30",
      "SendTime": "2016/7/11 15:00:42",
      "ReturnTime": "2016/7/11 15:00:54",
      "Reason": ""
    }
  ]
}
字段
说明
errcode
错误编码
errmsg
结果描述
data_list
返回Json 数组对象
[
{
      "OrderNumber": "fw2016071114579443",
      "Type": "2",
      "ApplyRemark": "未收到商品",
      "Apply_fee": "65.00",
      "Total_fee": "0.00",
      "Mobile": "15878909987",
      "Remark": "",
      "RunStatus": "6",
      "ReturnNumber": "20160711150330027726",
      "Examine": "0",
      "AddTime": "2016/7/11 15:03:30",
      "SendTime": "2016/7/11 15:00:42",
      "ReturnTime": "2016/7/11 15:00:54",
      "Reason": ""
    }
]
详细说明见下表data_list
data_list说明:
字段
说明
OrderNumber
订单编号
Type
处理方式
1:我要退款,但不退货
2:我要退货,退款
3:我要换货
ApplyRemark
退款原因
Apply_fee
申请退款金额
Total_fee
退款金额
Mobile
手机号
Remark
备注
RunStatus
退款状态:
1: 退款/换货 待处理
2: 退款/换货 待买家发货
3:退款/换货 待商家收货
4: 商家已换货
5:退款/换货成功
6:申请关闭
7:无需寄回商品 直接换货
ReturnNumber
退换货订单编号
Examine
审核
1:直接退款给买家
2:买家需寄回商品,再退款给买家
3:买家无需寄回商品,直接换货给买家
4:家需寄回商品,再换货给买家
5:不同意换货申请
6:不同意退换货申请
AddTime
添加时间
SendTime
发货时间
ReturnTime
退款时间(处理取消时间)
Reason
拒绝换货申请理由




使用道具 举报 回复
发新帖