# 订单查询


接口地址: http://www.damaijia168.com/vv/external/order_get_list


请求方式: POST


传参方式: JSON


返回格式: JSON


# 请求头参数

参数 类型 必选 示例
Authorization string 授权 access_token 1798c6aadec33d1bc2f5b707f1049aefexxxx

# 请求参数

参数 类型 必选 描述
filter object 筛选条件
—create_time string[] 创建日期
—order_sn string 订单编号
range array 页码(前面是第几页,后面是一页有多少条 )
条件筛选任意选择 上面页码 订单编号 创建日期(什么都不传默认返回10条数据)

# 请求示例

{
  "filter": {
    "create_time": ["2021-08-05","2021-08-06"],
    "order_sn": "12347"
  },
  "range": [1,10]
}


# 请求代码示例

cURL请求代码示例

curl --location --request POST 'http://www.damaijia168.com/vv/external/order_get_list' \--header 'Authorization: 0b1e37721ae86d31a18a68xxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
  "filter": {
    "create_time": [""],
    "order_sn": ""
  },
  "range": [1,10]
}'

PHP请求代码示例

<?php

$curl = curl_init();

curl_setopt_array($curl, array(  CURLOPT_URL => "http://www.damaijia168.com/vv/external/order_get_list",  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"{\r\n  \"filter\": {\r\n    \"create_time\": [],\r\n    \"order_sn\": \"\"\r\n  },\r\n  \"range\": [1,10]\r\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: 0b1e37721ae86d31a18a686xxxxxxxx",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

JAVA请求代码示例

OkHttpClient client = new OkHttpClient().newBuilder()  .build();MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n  \"filter\": {\r\n    \"create_time\": [],\r\n    \"order_sn\": \"\"\r\n  },\r\n  \"range\": [1,10]\r\n}");
Request request = new Request.Builder()
  .url("http://www.damaijia168.com/vv/external/order_get_list")
  .method("POST", body)
  .addHeader("Authorization", "0b1e37721ae86d31a18a68xxxxxxxx")
  .addHeader("Content-Type", "application/json")
  .build();
Response response = client.newCall(request).execute();

Python请求代码示例

import requests
import json

url = "http://www.damaijia168.com/vv/external/order_get_list"
headers = {
  'Authorization': '1798c6aadec33d1bc2f5b707f1049aefexxxx',
  'Content-Type': 'application/json'
}
payload = json.dumps({
  "filter": {
    "create_time": [""],
    "order_sn": ""
  },
  "range": [1,10]
})
response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

# 响应参数

参数 类型 描述
data object 执行任务
index int 索引
list object 结果集合
—current_page int 目前页码
—data array 结果数据
—id int 订单id
—order_sn string 订单编号
—page_number int 每个订单包裹数
—source string 来源 taobao: 淘宝 tmall: 天猫 jd: 京东 pdd: 拼多多 other: 其他
—remark string 备注(创建订单时填写的备注)
—order_status string 订单状态
f:待支付
p:支付成功
s:支付失败
c:取消订单
b:部分取消
—create_time string 创建时间
—total_price int 总价(不含运费)(点券)
—name string 商品名字
—amount int 消耗点券
—total int 数据总数
status int 状态码,0为成功

# 返回数据

{
    "data": {
        "index": 1,
        "list": {
            "current_page": 1,
            "data": [
                {
                    "id": 1,
                    "order_sn": "1202007030807311988",
                    "page_number": 0,
                    "source": "taobao",
                    "remark": null,
                    "order_status":"p",
                    "create_time": "2020-07-03 16:33:31",
                    "total_price": 0,
                    "name": "小老鼠皮皮虾"
                },
                {
                    "id": 2,
                    "order_sn": "1202007030807311819",
                    "page_number": 0,
                    "source": "taobao",
                    "order_status":"p",
                    "remark": null,
                    "create_time": "2020-07-03 16:33:31",
                    "total_price": 0,
                    "name": "小老鼠皮皮虾"
                }
            ]

        },
        "total": 192
    },
    "status": 0
}

# 错误码(更多错误码请进入获取token页面查看公共错误码)

状态码(status)) 错误说明
132 请求格式必须为JSON
422 参数列表不合法,在err中会给出提示
200 认证失败