---
id: "4a967dfb7da6c3edffdf"
url: "https://www.xmcsl.cn/project/ocean-engine-api/%E6%89%B9%E9%87%8F%E6%9B%B4%E6%96%B0%E9%A1%B9%E7%9B%AE%E6%8A%95%E6%94%BE%E6%97%B6%E9%97%B4-1779258970970184.html"
source_url: "https://open.oceanengine.com/labels/34/docs/1779258970970184?origin=left_nav"
source_date: null
checked_at: "2026-11-05T04:21:48.909937+00:00"
status: "ready"
check_scope: "structure_only; not a factual or human review"
body_sha256: "7c1e7979ba3674586ac95b496044ef4c60c75e0b7fe14d3e8d47fc95b0eb1811"
---

# 批量更新项目投放时间 — 巨量引擎 API

# 批量更新项目投放时间

 

<table><tr><th>关键信息</th><th>详情</th></tr><tr><th>文档 ID</th><td>1779258970970184</td></tr>&#10;<tr><th>标签 ID</th><td>34</td></tr>&#10;<tr><th>原始文档</th><td>&#91;https://open.oceanengine.com/labels/34/docs/1779258970970184?origin=left&#95;nav&#93;(https://open.oceanengine.com/labels/34/docs/1779258970970184?origin=left&#95;nav)</td></tr>&#10;<tr><th>接口标识</th><td>marketing.project.update</td></tr>&#10;</table>

 

💡批量更新「巨量营销升级版」项目投放时间，不允许修改搜索周期投放项目的投放时间。需通过【获取Access token】接口获取授权access\_token。返回码和返回信息详见【附录\-返回码】。 &gt; 批量更新「巨量营销升级版」项目投放时间 不允许修改搜索周期投放项目的投放时间（项目层级delivery\_type = \`DURATION\`）

 

POST \[https://api.oceanengine.com/open\_api/v3.0/project/schedule\_time/update/\](https://api.oceanengine.com/open\_api/v3.0/project/schedule\_time/update/) <a href="https://open.oceanengine.com/tools/visual_debug.html?docId=1779258970970184">🔍 可视化调试</a> <a href="https://open.oceanengine.com/labels/7/docs/1773083358100557">📦 SDK下载</a>

 

## 接口说明

 

批量更新「巨量营销升级版」项目投放时间，不允许修改搜索周期投放项目的投放时间。需通过【获取Access token】接口获取授权access\_token。返回码和返回信息详见【附录\-返回码】。

 

> 批量更新「巨量营销升级版」项目投放时间

 

不允许修改搜索周期投放项目的投放时间（项目层级delivery\_type = <code>DURATION</code>）

 

## 请求地址

 

<a href="https://api.oceanengine.com/open_api/v3.0/project/schedule_time/update/">https://api.oceanengine.com/open&#95;api/v3.0/project/schedule&#95;time/update/</a><a href="https://open.oceanengine.com/tools/visual_debug.html?docId=1779258970970184">可视化调试</a><a href="https://open.oceanengine.com/labels/7/docs/1773083358100557">SDK下载</a><a href="https://open.oceanengine.com/labels/7/docs/1847394521222599">MCP调用</a>

 

## 请求方法

 

POST

 

## Header

 

<table>&#10;<thead>&#10;<tr>&#10;<th>字段</th>&#10;<th>类型</th>&#10;<th>必填</th>&#10;<th>描述</th>&#10;</tr>&#10;</thead>&#10;<tbody>&#10;<tr>&#10;<td><code>Access-Token</code></td>&#10;<td>string</td>&#10;<td>必填</td>&#10;<td>授权access&#95;token，可以通过【<a href="https://open.oceanengine.com/labels/7/docs/1696710505596940">获取Access token</a>】接口获取</td>&#10;</tr>&#10;<tr>&#10;<td><code>Content-Type</code></td>&#10;<td>string</td>&#10;<td>必填</td>&#10;<td>请求消息类型<br>允许值: <code>application/json</code></td>&#10;</tr>&#10;</tbody>&#10;</table>

 

## 请求参数

 

<table>&#10;<thead>&#10;<tr>&#10;<th>字段</th>&#10;<th>类型</th>&#10;<th>必填</th>&#10;<th>描述</th>&#10;</tr>&#10;</thead>&#10;<tbody>&#10;<tr>&#10;<td><code>advertiser&#95;id</code></td>&#10;<td>number</td>&#10;<td>必填</td>&#10;<td>投放账户id</td>&#10;</tr>&#10;</tbody>&#10;</table>

 

<code>data</code>（object\[\]，必填） — 批量修改投放时间，限制最多批量修改10个项目

 \| 字段 \| 类型 \| 必填 \| 描述 \| \| \-\-\- \| \-\-\- \| \-\-\- \| \-\-\- \| \| \`project\_id\` \| number \| 必填 \| 项目ID \| \| \`schedule\_type\` \| string \| 必填 \| 投放时间类型，允许值：\- \`SCHEDULE\_FROM\_NOW\`从今天起长期投放（默认）  
  
\- \`SCHEDULE\_START\_END\`结束日期  
注：搜索下极速智投（原周期稳投）项目，若项目设置的原投放时间类型为7日稳投，不支持在批量更新接口中修改为其他投放时间类型  
 \| \| \`end\_time\` \| number \| 条件必填 \| 结束的投放时间，当schedule\_type 为\`SCHEDULE\_START\_END\`时必填  
时间必须到秒级，否则会报错 \|

 

## 请求示例

 

### python

 

```python
# coding=utf-8
import json
import requests

from six import string_types
from six.moves.urllib.parse import urlencode, urlunparse  # noqa

ACCESS_TOKEN = "xxx"
PATH = "/open_api/v3.0/project/schedule_time/update/"


def build_url(path, query=""):
    # type: (str, str) -> str
    """
    Build request URL
    :param path: Request path
    :param query: Querystring
    :return: Request URL
    """
    scheme, netloc = "https", "api.oceanengine.com"
    return urlunparse((scheme, netloc, path, "", query, ""))

def post(json_str):
    # type: (str) -> dict
    """
    Send POST request
    :param json_str: Args in JSON format
    :return: Response in JSON format
    """
    url = build_url(PATH)
    args = json.loads(json_str)
    headers = {
        "Access-Token": ACCESS_TOKEN,
        "Content-Type": "application/json",
    }
    rsp = requests.post(url, headers=headers, json=args)
    return rsp.json()


if __name__ == '__main__':
    advertiser_id = ADVERTISER_ID
    project_id = PROJECT_ID
    schedule_type = SCHEDULE_TYPE
    end_time = END_TIME

    # Args in JSON format
    my_args = "{\"advertiser_id\": \"%s\", \"data\": [{\"project_id\": \"%s\", \"schedule_type\": \"%s\", \"end_time\": \"%s\"}]}" % (advertiser_id, project_id, schedule_type, end_time)
    print(post(my_args))
```

 

### java

 

```java
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 = "xxx";
    private static final String PATH = "/open_api/v3.0/project/schedule_time/update/";
    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 {
        URI uri = new URI("https", "api.oceanengine.com", path, "", "");
        return uri.toString();
    }


    /**
     * Send POST request
     *
     * @param jsonStr Args in JSON format
     * @return Response in JSON format
     */
    private static String post(String jsonStr) throws IOException, URISyntaxException {
        OkHttpClient client = new OkHttpClient().newBuilder().build();
        String url = buildUrl(PATH);

        RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonStr);
        Request request = new Request.Builder()
                .url(url)
                .method("POST", body)
                .addHeader("Content-Type", "application/json")
                .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 {
        Long advertiser_id = ADVERTISER_ID;
        Long project_id = PROJECT_ID;
        String schedule_type = SCHEDULE_TYPE;
        Long end_time = END_TIME;

        // Args in JSON format
        String myArgs = String.format("{\"advertiser_id\": \"%s\", \"data\": [{\"project_id\": \"%s\", \"schedule_type\": \"%s\", \"end_time\": \"%s\"}]}",advertiser_id, project_id, schedule_type, end_time);
        System.out.println(post(myArgs));
    }
}
```

 

### php

 

```php
$ACCESS_TOKEN = "xxx";
$PATH = "/open_api/v3.0/project/schedule_time/update/";

/**
 * Build request URL
 * @param $path : Request path
 * @return string
 */
function build_url($path)
{
    return "https://api.oceanengine.com" . $path;
}


/**
 * Send POST request
 * @param $json_str : Args in JSON format
 * @return bool|string : Response in JSON format
 */
function post($json_str)
{
    global $ACCESS_TOKEN, $PATH;
    $curl = curl_init();

    $url = build_url($PATH);

    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 => "POST",
        CURLOPT_POSTFIELDS => $json_str,
        CURLOPT_HTTPHEADER => array(
            "Content-Type: application/json",
            "Access-Token: " . $ACCESS_TOKEN,
        ),
    ));

    $response = curl_exec($curl);
    curl_close($curl);
    return $response;
}


$advertiser_id = ADVERTISER_ID;
$project_id = PROJECT_ID;
$schedule_type = SCHEDULE_TYPE;
$end_time = END_TIME;

/* Args in JSON format */
$my_args = sprintf("{\"advertiser_id\": \"%s\", \"data\": [{\"project_id\": \"%s\", \"schedule_type\": \"%s\", \"end_time\": \"%s\"}]}", $advertiser_id, $project_id, $schedule_type, $end_time);
echo post($my_args);
```

 

### curl

 

```curl
curl -H "Access-Token:xxx" -H "Content-Type:application/json" -X POST \
-d '{
    "advertiser_id": "ADVERTISER_ID",
    "data": [
        {
            "project_id": "PROJECT_ID",
            "schedule_type": "SCHEDULE_TYPE",
            "end_time": "END_TIME"
        }
    ]
}' \
https://api.oceanengine.com/open_api/v3.0/project/schedule_time/update/
```

 

## 应答字段

 

<table>&#10;<thead>&#10;<tr>&#10;<th>字段</th>&#10;<th>类型</th>&#10;<th>必填</th>&#10;<th>描述</th>&#10;</tr>&#10;</thead>&#10;<tbody>&#10;<tr>&#10;<td><code>code</code></td>&#10;<td>number</td>&#10;<td>否</td>&#10;<td>返回码,详见 <a href="https://open.oceanengine.com/labels/7/docs/1696710760866831">【附录-返回码】</a></td>&#10;</tr>&#10;<tr>&#10;<td><code>message</code></td>&#10;<td>string</td>&#10;<td>否</td>&#10;<td>返回信息,详见 <a href="https://open.oceanengine.com/labels/7/docs/1696710760866831">【附录-返回码】</a></td>&#10;</tr>&#10;</tbody>&#10;</table>

 

<code>data</code>（json，否） — json返回值

 \| 字段 \| 类型 \| 必填 \| 描述 \| \| \-\-\- \| \-\-\- \| \-\-\- \| \-\-\- \| \| \`project\_ids\` \| number\[\] \| 否 \| 更新成功的项目ID集合 \| 

<code>errors</code>（object\[\]，否） — 更新失败的项目ID列表

 \| 字段 \| 类型 \| 必填 \| 描述 \| \| \-\-\- \| \-\-\- \| \-\-\- \| \-\-\- \| \| \`project\_id\` \| number \| 否 \| 项目ID \| \| \`error\_message\` \| string \| 否 \| 错误信息 \|

 

<table>&#10;<thead>&#10;<tr>&#10;<th>字段</th>&#10;<th>类型</th>&#10;<th>必填</th>&#10;<th>描述</th>&#10;</tr>&#10;</thead>&#10;<tbody>&#10;<tr>&#10;<td><code>request&#95;id</code></td>&#10;<td>string</td>&#10;<td>否</td>&#10;<td>请求日志id</td>&#10;</tr>&#10;</tbody>&#10;</table>

 

## 应答示例

 

```json
HTTPS/1.1 200 OK
{
    "message": "OK",
    "code": 0,
    "data": {}
}
```
