← 返回目录
📁 API Reference › BC Invoices › Download the invoices of a BC › Download asynchronously

获取异步下载任务列表

您可以使用本接口查询BILLING_REPORT、INVOICE_LIST和INVOICE_BATCH类型任务状态。如果任务顺利完成,可以通过返回里的URL下载文件。

代理商商务中心和直客商务中心都能执行发票相关操作。

注意
只有拥有财务经理或财务分析师权限的用户才能在商务中心执行资金管理和发票的相关操作。您可以使用/bc/member/invite/ 和 /bc/member/update/设置或更改成员权限。

v1.2与v1.3版本对比

以下表格概括了 v1.2与v1.3接口的变化。 ``xtable |变化内容{30%}|v1.2{35%}|v1.3{35%}| |---|---|---| |接口路径|/v1.2/bc/invoice/task/list/| /v1.3/bc/invoice/task/list/| |请求参数类型|bc_id: number |bc_id: string | |返回参数类型|bc_id: number |bc_id: string | |返回参数名称|url|download_url` |


## 请求

**地址** https://business-api.tiktok.com/open_api/v1.3/bc/invoice/task/list/

**方法** GET

**Header**

``` xtable
|字段{30%}|类型{35%}|描述{35%}|
|---|---|---|
|Access-Token{必填}|string|授权访问令牌。可以通过[获取访问令牌](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162)接口获取。|

参数

|字段|类型|描述|
|---|---|---|
|bc_id {必填}|string| 商务中心ID。|
|page |number|当前页数。默认值: 1。|
|page_size |number|分页大小,默认值: 10,取值范围:1-50。 |

示例

(code curl http)
curl --location --request GET https://business-api.tiktok.com/open_api/v1.3/bc/invoice/task/list/?bc_id={{bc_id}}
--header 'Access-Token: {{Access-Token}}'
(/code)

返回

|字段|类型|描述|
|---|---|---|
|code |number|返回码,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。  |
|message |string|返回信息,详见[附录-返回码](https://ads.tiktok.com/marketing_api/docs?id=1737172488964097)。  |
|request_id |string|请求的日志id,唯一标识一个请求。  |
|data |object|返回数据。  |
#|list|object[]|任务列表。|
##|bc_id|string|商务中心ID。|
##|task_id|string|任务ID。|
##|status|string|任务状态。<br><br>枚举值:`CREATED`(已创建)(<span style="color:Red">已废弃</span>), `FAILED`(失败), `RUNNING`(运行中), `SUCCEED`(成功), `POLLING`(等待中)(<span style="color:Red">已废弃</span>)。|
##|create_time|string|创建时间。|
##|update_time|string|更新时间。|
##|download_url|string|如果任务成功,将生成下载任务任务文件的url。 |
##|download_type|string|下载类型。<br><br>枚举值:`INVOICE_LIST`, `INVOICE_BATCH`。|
#|page_info|object| 分页信息。 |
##|page|number| 当前页数。 |
##|page_size|number| 分页大小。 |
##|total_number|number| 总数。 |
##|total_page|number| 总页数。 |

示例

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "list": [
            {
                "bc_id": "{{bc_id}}",
                "create_time": "{{timestamp}}",
                "download_type": "INVOICE_BATCH",
                "download_url": "{{download_url}}",
                "status": "SUCCEED",
                "task_id": "{{task_id}}",
                "update_time": "{{timestamp}}"
            },
            {
                "bc_id": "{{bc_id}}",
                "create_time": "{{timestamp}}",
                "download_type": "INVOICE_BATCH",
                "download_url": null,
                "status": "FAILED",
                "task_id": "{{task_id}}",
                "update_time": "{{timestamp}}"
            },
            {
                "bc_id": "{{bc_id}}",
                "create_time": "{{timestamp}}",
                "download_type": "BILLING_REPORT",
                "download_url": "{{download_url}}",
                "status": "SUCCEED",
                "task_id": "{{task_id}}",
                "update_time": "{{timestamp}}"
            }
        ],
        "page_info": {
            "page": 1,
            "page_size": 10,
            "total_number": 11,
            "total_page": 2
        }
    }
}
(/code)

内容来源:TikTok API for Business 官方文档 · 本地归档

在接这个接口时卡住了?
Stuck wiring this API into production? We build ad-delivery tooling on these platforms — campaign automation, reporting pipelines, error-handling and migration between API versions.
联系我们 · Talk to us 每日平台更新简报 →