巨量星图 / 全部接口
入门指南
快速入门
术语解释
接口清单(Scope权限点)
Oauth2.0授权
简版授权流程说明
授权管理说明
新版授权常见问题
OAuth2.0原理及Marketing-API使用
回调地址怎么设置和使用
Token管理
获取Access Token
刷新Refresh Token
获取已授权账户
获取授权User信息
获取APP Access Token
账号服务
代理商账号管理
代理商管理账户列表
获取代理商信息
二级代理商列表
巨量星图
获取星图客户任务列表
获取星图客户任务订单列表
获取订单投后分析报表
获取订单投后受众报表
获取星图订单投后线索
频控限制
最佳实践
附录
枚举值
返回码
过滤条件
获取星图客户任务订单列表

此接口用于根据星图id和星图任务id,获取星图客户所发布任务的订单列表,包含订单总数、订单id、订单创建时间、订单状态、作品名称、作品封面图、视频id、视频链接、接单的达人id、达人名称、达人头像。

请求地址

https://ad.oceanengine.com/open_api/2/star/demand/order/list/

请求方法

GET

请求头

字段类型描述
Access-Token必填
string
授权access-token,获取方法见接口文档【获取Access-Token】
X-Debug-Mode
number
允许值:1(开启);Debugger模式仅适用于接口测试使用(不适合线上生产环境),目前频控限制为20次/分钟,建议在遇到调用接口报错后,在header中传入此段,以获取错误help message

请求参数

字段类型描述
star_id 必填
number
星图id,星图客户授权后,通过“获取已授权账户”接口,查询到账号角色为”6-星图账号“的账户id,即为星图id
demand_id 必填
string
任务id,可通过“获取星图客户任务列表”获取
filtering
object
过滤条件,若此字段不传,或传空则视为无限制条件
universal_order_status
string
任务订单状态
枚举值详见【附录-枚举值-星图任务订单状态】,默认为ALL不限
page
number
页码,默认为1
page_size
number
页面大小,默认10,最大值50

请求示例

Java
Python
PHP
curl
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import okhttp3.*; import org.apache.http.client.utils.URIBuilder; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.List; import java.util.Map; import java.util.stream.Collectors; public class Demo { private static final String ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"; private static final String PATH = "/star/demand/order/list/"; private static final ObjectMapper mapper = new ObjectMapper(); /** * Build request URL * * @param path Request path * @return Request URL */ private static String buildUrl(String path) throws URISyntaxException { return "https://ad.oceanengine.com/open_api/2" + path; } /** * Send GET request * * @param jsonStr:Args in JSON format * @return Response in JSON format */ private static String get(String jsonStr) throws IOException, URISyntaxException { OkHttpClient client = new OkHttpClient().newBuilder().build(); URIBuilder ub = new URIBuilder(buildUrl(PATH)); Map< String, Object > map = mapper.readValue(jsonStr, Map.class); map.forEach((k, v) -> { try { ub.addParameter(k, v instanceof String ? (String) v : mapper.writeValueAsString(v)); } catch (JsonProcessingException e) { e.printStackTrace(); } }); URL url = ub.build().toURL(); Request request = new Request.Builder() .url(url) .method("GET", null) .addHeader("Access-Token", ACCESS_TOKEN) .build(); Response response = client.newCall(request).execute(); return response.body().string(); } public static void main(String[] args) throws IOException, URISyntaxException { // Args in JSON format String myArgs = "{\"demand_id\": \"DEMAND_ID\",\"filtering\": {\"universal_order_status\": \"UNIVERSAL_ORDER_STATUS\"},\"page\": \"PAGE\",\"page_size\": \"PAGE_SIZE\",\"star_id\": STAR_ID}"; System.out.println(get(myArgs)); } }
# coding=utf-8 import json import requests from six import string_types from six.moves.urllib.parse import urlencode, urlunparse # noqa ACCESS_TOKEN = "YOUR_ACCESS_TOKEN" PATH = "/star/demand/order/list/" def build_url(path, query=""): # type: (str, str) -> str """ Build request URL :param path: Request path :param query: Querystring :return: Request URL """ return urlunparse(("https","ad.oceanengine.com/open_api/2", path, "", query, "")) def get(json_str): # type: (str) -> dict """ Send GET request :param json_str: Args in JSON format :return: Response in JSON format """ args = json.loads(json_str) query_string = urlencode({k: v if isinstance(v, string_types) else json.dumps(v) for k, v in args.items()}) url = build_url(PATH, query_string) headers = { "Access-Token": ACCESS_TOKEN, } rsp = requests.get(url, headers=headers) return rsp.json() if __name__ == '__main__': # Args in JSON format my_args = "{\"demand_id\": \"DEMAND_ID\",\"filtering\": {\"universal_order_status\": \"UNIVERSAL_ORDER_STATUS\"},\"page\": \"PAGE\",\"page_size\": \"PAGE_SIZE\",\"star_id\": STAR_ID}" print(get(my_args))
$ACCESS_TOKEN = "YOUR_ACCESS_TOKEN"; $PATH = "/star/demand/order/list/"; /** * Build request URL * @param $path : Request path * @return string */ function build_url($path) { return "https://ad.oceanengine.com/open_api/2" . $path; } /** * Send GET request * @param $json_str : Args in JSON format * @return bool|string : Response in JSON format */ function get($json_str) { global $ACCESS_TOKEN, $PATH; $curl = curl_init(); $args = json_decode($json_str, true); /* Values of querystring is also in JSON format */ foreach ($args as $key => $value) { $args[$key] = is_string($value) ? $value : json_encode($value); } $url = build_url($PATH) . "?" . http_build_query( $args ); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array( "Access-Token: " . $ACCESS_TOKEN, ), )); $response = curl_exec($curl); curl_close($curl); return $response; } /* Args in JSON format */ $my_args = "{\"demand_id\": \"DEMAND_ID\",\"filtering\": {\"universal_order_status\": \"UNIVERSAL_ORDER_STATUS\"},\"page\": \"PAGE\",\"page_size\": \"PAGE_SIZE\",\"star_id\": STAR_ID}"; echo get($my_args);
curl -X GET -H "Access-Token:YOUR_ACCESS_TOKEN" \ --data-urlencode "demand_id=\"DEMAND_ID\"" \ --data-urlencode "filtering={\"universal_order_status\": \"UNIVERSAL_ORDER_STATUS\"}" \ --data-urlencode "page=\"PAGE\"" \ --data-urlencode "page_size=\"PAGE_SIZE\"" \ --data-urlencode "star_id=STAR_ID" \ https://ad.oceanengine.com/open_api/2/star/demand/order/list/

应答字段

字段类型描述
code
number
返回码,详见【附录-返回码】
message
string
返回信息,详见【附录-返回码】
request_id
string
请求日志id
data
json
返回数据
list
object[]
任务列表
author_id
number
达人id
author_name
string
达人名称
avatar_uri
string
达人头像
create_time
string
订单创建时间,格式:%Y-%m-%d %H:%M:%S
demand_id
number
任务id
head_image_uri
string
封面图
order_id
number
订单id
title
string
作品名称
universal_order_status
string
video_id
string
视频id,每个视频唯一(建议使用item_id)
item_id
number
视频id,与星图平台前端video_url中展现的视频id一致,每个视频唯一
video_url
string
视频链接
page_info
object
分页信息
page
number
页码
page_size
number
页面大小
total_number
number
总数
total_page
number
总页数

应答示例

HTTPS/1.1 200 OK { "code": 0, "message": "OK", "request_id": "202103121846590102121880451E044B15", "data": { "list": [ { "order_id": 0, "head_image_uri": "", "avatar_uri": "https://xxx.xx", "title": "", "video_id": "", "item_id": 0, "create_time": "2021-03-09 22:00:16", "universal_order_status": "RECEIVEING", "author_id": 0, "demand_id": 0, "author_name": "xxx" } ], "page_info": { "total_page": 1, "total_number": 1, "page": 1, "page_size": 10 } } }