← 返回目录
📁 API Reference › BC Payments

获取商务中心或广告账户交易记录

您可以使用本接口获取商务中心或商务中心中广告账户的交易记录。

使用前需知

需确保您对商务中心有必要的财务权限(“财务经理”或“财务分析员”)。若想查看您对某一商务中心的财务权限,请使用/bc/get/接口,检查返回的finance_role字段。

请求

地址 https://business-api.tiktok.com/open_api/v1.3/bc/account/transaction/get/

方法 GET

Header

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

参数

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
| bc_id {必填} | string | 商务中心 ID。 <br><br>若想获取您有权限访问的商务中心列表,请使用[/bc/get/](1737115687501826.html)。 |
| transaction_level | string | 想要获取的交易记录的层级。<br><br>枚举值:<ul><li> `BC` :商务中心(`bc_id`)。</li><li> `ADVERTISER`: 商务中心(`bc_id`)中的广告账户。 </li><li>`PAYMENT_PORTFOLIO`:财务资产组合。 </li></ul><br>默认值:`ADVERTISER`。<br><br><p><span style="color:darkred"><b>注意</b></span>:若商务中心已启用财务资产组合,则不会返回由其他商务中心共享的广告账户的交易记录。 |
| filtering | object | 筛选条件。 |
#| transaction_types| string[] | 交易类型。  <br><br>枚举值:<ul><li>`BILL_PAYMENT`:账单支付。</li><li> `ADD_BALANCE`: 充值。</li><li> `CANCELLATION`:取消。</li><li>`PROMOTION_ISSUED`:促销活动已发放,即广告赠款的发放。</li><li> `PROMOTION_EXPIRED`:促销活动已过期,即广告赠款的过期。</li><li>`INCREASE_BALANCE`:增加余额。</li><li> `DECREASE_BALANCE`:扣减余额。</li><li>`CARD_VERIFICATION`:银行卡验证。</li><li> `CARD_VERIFICATION_REFUND`:银行卡验证扣费退款。</li><li> `ORDER_CREATION_PAYMENT`:订单创建支付。</li><li>`ORDER_EDIT_PAYMENT`:订单修改支付。</li><li> `RETURN_OF_REMAINING_BUDGET` :剩余预算返还。</li><li> `REFUND`:退款。</li></ul>|
#| owner_of_account | string[] | 仅当 `transaction_level` 为 `ADVERTISER` 或未传入时生效。 <br><br>广告账户所有者。<br><br>枚举值:<ul><li>`OWNED_BY_CURRENT_BUSINESS_CENTER`:归当前商务中心所有。</li><li>`SHARED_BY_OTHER_BUSINESS_CENTER`:由其他商务中心共享。</li></ul><br>默认值: `OWNED_BY_CURRENT_BUSINESS_CENTER`。<br><br>若您想获取由其他商务中心共享的广告账户的资金流水,您需对这些广告账户有管理员权限。<br>若想确认对广告账号是否有管理员权限,需使用 [/bc/asset/get/](1739432717798401.html)。 `asset_type` 为 `ADVERTISER` 的 `asset_id` (即广告账户)对应的 `advertiser_role` 应为 `ADMIN`。 <br><p><span style="color:darkred"><b>注意</b></span>:若您的商务中心存在 200 个以上由其他商务中心共享的广告账户,则不支持将本字段设置为`SHARED_BY_OTHER_BUSINESS_CENTER` 筛选共享的广告账户。此时,建议您同时传入筛选字段`account_ids`或筛选字段`account_ids`和`account_name`,从而缩小查询的范围。 |
#| account_ids | string[] | 仅当 `transaction_level` 为 `ADVERTISER` 或未传入时生效。<br><br>广告账号 ID 列表。<br><br>最大数量:100。 |
#| account_name | string | 仅当 `transaction_level` 为 `ADVERTISER` 或未传入时生效。<br><br>广告账号名称。<br><br>支持模糊搜索。 |
#| start_time | string | 查询起始时间,闭区间,格式为 `YYYY-MM-DD HH:MM:SS`(广告账户时区或商务中心时区)。<br><br>示例:`2024-01-01 00:00:00`。<br><br>允许通过`start_time` 和 `end_time` 指定的最大查询时间区间为 365 天。 <br>若未传入`start_time` 和 `end_time`,将默认返回过去 90 天的资金流水。 |
#| end_time | string | 查询结束时间,闭区间,格式为 `YYYY-MM-DD HH:MM:SS`(广告账户时区或商务中心时区)。<br><br>示例:`2024-01-01 00:00:00`。<br><br> 允许通过`start_time` 和 `end_time` 指定的最大查询时间区间为 365 天。<br>若未传入`start_time` 和 `end_time`,将默认返回过去 90 天的资金流水。 |
#|billing_types | string[] | 账单类型。 <br><br>枚举值:<ul><li>`CASH`:现金。</li><li>`CREDIT`:广告赠款。</li></ul>  |
| page | integer | 当前页数。<br><br>默认值: 1。 <br> 取值范围: ≥ 1。 |
| page_size | integer | 分页大小。<br><br>默认值: 10。 <br>取值范围: 1-50。 |

示例

获取商务中心的交易记录

(code curl http)
curl --location --request GET 'https://business-api.tiktok.com/open_api/v1.3/bc/account/transaction/get/?bc_id={{bc_id}}&transaction_level=BC&filtering={"start_time": "2023-01-01 00:00:00","end_time": "2024-01-01 00:00:00"}&page_size=50' \
--header 'Access-Token: {{Access-Token}}' 
(/code)

获取广告账户的交易记录

(code curl http)
curl --location --request GET  'https://business-api.tiktok.com/open_api/v1.3/bc/account/transaction/get/?bc_id={{bc_id}}&filtering={"start_time": "2023-01-01 00:00:00","end_time": "2024-01-01 00:00:00"}&page_size=50' \
--header 'Access-Token: {{Access-Token}}' 
(/code)

获取财务资产组合的交易记录

(code curl http)
curl --location  --request GET 'https://business-api.tiktok.com/open_api/v1.3/bc/account/transaction/get/?bc_id={{bc_id}}&filtering={"start_time":"2024-10-01 00:00:00","end_time":"2024-11-01 23:59:59","billing_types": ["CASH"]}&transaction_level=PAYMENT_ACCOUNT' \
--header 'Access-Token: {{Access-Token}}'
(/code)

返回

|字段{30%}|类型{15%}|描述{55%}|
|---|---|---|
|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| 返回数据。 |
#| transaction_list | object[] | 资金流水列表。 |
##| transaction_id | string | 交易 ID,即此次交易的唯一标识符。 |
##| payment_portfolio_id | string | 与本次交易相关联的财务资产组合的 ID。 <br>仅当 `transaction_level` 为 `PAYMENT_PORTFOLIO` 时,本字段返回非 null 值。 <br> <br><p><span style="color:darkred"><b>注意</b></span>:若想管理财务资产组合的预算,可使用[/advertiser/update/](1739939050770434.html)中的`advertiser_budgets`字段。 `advertiser_budgets` 字段中的`budget_mode` 默认值将为`CUSTOM`。 |
##| payment_portfolio_name | string | 与本次交易相关联的财务资产组合的名称。 <br>仅当 `transaction_level` 为 `PAYMENT_PORTFOLIO` 时,本字段返回非 null 值。|
##| account_id | string | 与本次交易相关联的广告账户 ID。 <br><br>请求中的 `transaction_level` 设置为 `BC` 时,本字段的值将为 null。 |
##| account_name | string | 与本次交易相关联的广告账户的名称。<br><br>请求中的 `transaction_level` 设置为 `BC` 时,本字段的值将为 null。 |
##| bc_id | string | 商务中心 ID。 |
##| bc_name | string | 商务中心名称。 |
##| amount | number | 交易的总金额,包括小计和税费。<br><br>例如,若除税金额为 50 USD,税费为 5 USD,则总金额为 55 USD。<br><br>示例:55。 |
##| subtotal | number | 交易的小计金额(除税金额)。 <br><br>示例:50。 |
##| tax_amount | number | 交易的税费金额。 <br><br>示例:5。 |
##| currency | string | 金额(即`amount`, `subtotal` 和 `tax_amount`)对应的币种代码。<br><br>示例:USD。 |
##| amount_type | string | 金额类型。 <br><br>枚举值:<ul><li> `POSITIVE` :此类型代表与该交易关联的金额为正,例如充值。</li><li>`NEGATIVE`:此类型代表与该交易关联的金额为负,例如订单创建支付。</li><li>`OTHER`:此类型代表与该交易关联的金额无正负,例如银行卡验证扣费退款。</li></ul>  |
##| transaction_type | string | 交易类型。 <br><br>枚举值:<ul><li>`BILL_PAYMENT`:账单支付。</li><li> `ADD_BALANCE`: 充值。</li><li> `CANCELLATION`:取消。</li><li>`PROMOTION_ISSUED`:促销活动已发放,即广告赠款的发放。</li><li> `PROMOTION_EXPIRED`:促销活动已过期,即广告赠款的过期。</li><li>`INCREASE_BALANCE`:增加余额。</li><li> `DECREASE_BALANCE`:扣减余额。</li><li>`CARD_VERIFICATION`:银行卡验证。</li><li> `CARD_VERIFICATION_REFUND`:银行卡验证扣费退款。</li><li> `ORDER_CREATION_PAYMENT`:订单创建支付。</li><li>`ORDER_EDIT_PAYMENT`:订单修改支付。</li><li> `RETURN_OF_REMAINING_BUDGET` :剩余预算返还。</li><li> `REFUND`:退款。</li></ul> |
##|billing_type | string | 账单类型。 <br><br>枚举值:<ul><li>`CASH`:现金。</li><li>`CREDIT`:广告赠款。</li></ul>  |
##| timezone | string | 交易发生的时区,格式为`UTC±HH:MM`。 <br><br>示例:`"UTC+07:00"`。 |
##| create_time | string | 交易记录生成的时间,格式为 `"YYYT-MM-DD HH:MM:SS"`。 <br><br>示例:`2024-01-01 00:00:01`。 |
##| invoice_id | string | 发票 ID。 <br><br><ul><li>若想同步下载该发票,可将发票 ID 传入 [/bc/invoice/download/](1754000198430722.html)。 </li><li>若想异步下载该发票,可将发票 ID 传入[/bc/invoice/task/create/](1754000448122882.html)。</li></ul> |
##| serial_number | string | 发票编号。 |
#| 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": {
        "transaction_list": [
            {
                "transaction_id": "{{transaction_id}}",
                "subtotal": 280000,
                "amount_type": "NEGATIVE",
                "billing_type": "CASH",
                "serial_number": "",
                "bc_name": "{{bc_name}}",
                "tax_amount": 0,
                "amount": 280000,
                "transaction_type": "DECREASE_BALANCE",
                "invoice_id": "",
                "create_time": "{{create_time}}",
                "account_name": null,
                "bc_id": "{{bc_id}}",
                "timezone": "UTC+07:00",
                "currency": "VND",
                "account_id": null
            },
            {
                "transaction_id": "{{transaction_id}}",
                "subtotal": 280000,
                "amount_type": "POSITIVE",
                "billing_type": "CASH",
                "serial_number": "{{serial_number}}",
                "bc_name": "Phụ kiện oto VIP",
                "tax_amount": 30249,
                "amount": 310249,
                "transaction_type": "ADD_BALANCE",
                "invoice_id": "{{invoice_id}}",
                "create_time": "{{create_time}}",
                "account_name": null,
                "bc_id": "{{bc_id}}",
                "timezone": "UTC+07:00",
                "currency": "VND",
                "account_id": null
            }
        ],
        "page_info": {
            "total_number": 2,
            "total_page": 1,
            "page_size": 50,
            "page": 1
        }
    }
}
(/code)

获取广告账户的交易记录

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "transaction_list": [
            {
                "transaction_id": "{{transaction_id}}",
                "subtotal": 200000,
                "amount_type": "POSITIVE",
                "billing_type": "CASH",
                "serial_number": "{{serial_number}}",
                "bc_name": "{{bc_name}}",
                "tax_amount": 21607,
                "amount": 221607,
                "transaction_type": "ADD_BALANCE",
                "invoice_id": "{{invoice_id}}",
                "create_time": "{{create_time}}",
                "account_name": "{{account_name}}",
                "bc_id": "{{bc_id}}",
                "timezone": "UTC-05:00",
                "currency": "VND",
                "account_id": "{{account_id}}"
            },
            {
                "transaction_id": "{{transaction_id}}",
                "subtotal": 200000,
                "amount_type": "POSITIVE",
                "billing_type": "CASH",
                "serial_number": "{{serial_number}}",
                "bc_name": "{{bc_name}}",
                "tax_amount": 21607,
                "amount": 221607,
                "transaction_type": "ADD_BALANCE",
                "invoice_id": "{{invoice_id}}",
                "create_time": "{{create_time}}",
                "account_name": "{{account_name}}",
                "bc_id": "{{bc_id}}",
                "timezone": "UTC-05:00",
                "currency": "VND",
                "account_id": "{{account_id}}"
            }
        ],
        "page_info": {
            "total_page": 1,
            "page_size": 50,
            "page": 1,
            "total_number": 2
        }
    }
}
(/code)

获取财务资产组合的交易记录

(code Success-Response http)
HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "transaction_list": [
            {
                "payment_account_id": "{{payment_account_id}}",
                "transaction_id": "{{transaction_id}}",
                "account_name": null,
                "tax_amount": 0.94,
                "subtotal": 9.41,
                "account_id": null,
                "bc_id": null,
                "payment_account_name": "{{payment_account_name}}",
                "invoice_id": "",
                "timezone": "UTC+12:00",
                "billing_type": "CASH",
                "currency": "AUD",
                "serial_number": "",
                "amount_type": "POSITIVE",
                "amount": 10.35,
                "bc_name": null,
                "create_time": "{{create_time}}",
                "transaction_type": "INCREASE_BALANCE"
            }
        ],
        "page_info": {
            "page_size": 10,
            "total_page": 1,
            "page": 1,
            "total_number": 1
        }
    }
}
(/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 每日平台更新简报 →