API Reference
Reporting

Create an async report task

POST/open_api/v1.3/report/task/create/
Base URL: https://tiktok-ads.mimicr.dev · provider: https://business-api.tiktok.com

Use this endpoint to create an asynchronous report task, with the same parameters as the synchronous report in a JSON body and no limit on the date range. output_format is CSV_STRING (default) or CSV_DOWNLOAD; XLSX_DOWNLOAD answers 40014. In Mimicr the task is QUEUING for half of asyncReportSeconds (homologation toggle, default 30) and PROCESSING until it ends.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Headers

Access-Tokenstringrequired

Authorized access token, sent in this header (not Authorization: Bearer). Marketing API tokens never expire.

Body

application/json
advertiser_idstring

Either advertiser_id or advertiser_ids has to be set. If you pass in both advertiser_id and advertiser_ids, advertiser_id will be ignored.

service_typestring

Ad service type.

AUCTIONRESERVATION
report_typestringrequired

Report type.

BASICAUDIENCEPLAYABLE_MATERIALCATALOG
data_levelstring

The data level that you'd like to query in reports. Required when report_type is BASIC,AUDIENCE or CATALOG.

AUCTION_ADAUCTION_ADGROUPAUCTION_CAMPAIGNAUCTION_ADVERTISERRESERVATION_ADRESERVATION_ADGROUPRESERVATION_CAMPAIGNRESERVATION_ADVERTISER
dimensionsstring[]required

Grouping conditions. For example: ["campaign_id", "stat_time_day"] indicates that both campaign_id and stat_time_day (days) are grouped.

metricsstring[]

Metrics to query.

start_datestring

This field is required when query_lifetime is false or not specified.

end_datestring

This field is required when query_lifetime is false or not specified.

query_lifetimeboolean

Whether to request the lifetime metrics.

order_fieldstring

Sorting field.

order_typestring

Sorting order.

ASCDESC
enable_report_title_translationboolean

Whether to enable the translation of the title row of the asynchronous report (including dimension names and metric names). For instance, if this field is set to false, a report title can be ad_id (untranslated title) rather than AD ID (translated title). Default value: true.

output_formatstring

Format of output.

CSV_STRINGCSV_DOWNLOADXLSX_DOWNLOAD
file_namestring

Customized download file name, which is optional to pass when output_format is CSV_DOWNLOAD or XLSX_DOWNLOAD. The maximum length is 255 characters. The file name needs to exclude the following special characters: ['/', '\t', '\b', '@', '#', '$', '%', '^', '&', '*', '(', ')', '[', ']'].

filteringobject[]

Filtering conditions. Supported filtering conditions vary based on service_type and data_level. For filters supported in different report types, refer to the articles under Report types.

Responses

200Response envelope {code, message, request_id, data}. code 0 (message "OK") is success. Validation and business errors also come with HTTP 200 and a non-zero code: check code, not the HTTP status.
codenumber

Return code. 0 means success; see the return codes appendix for the others.

messagestring

Return message: OK on success, otherwise the error description.

dataobject

Returned data.

Show child attributes
task_idstring

The ID of the asynchronous report task.

request_idstring

The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).

501The route or feature is documented by TikTok but outside Mimicr's integration core: code 40014 with HTTP 501.
codeinteger

Return code. 0 means success; see the return codes appendix for the others.

messagestring

Return message: OK on success, otherwise the error description.

request_idstring

The log ID of the request, which uniquely identifies it (also sent in the X-Tt-Logid header).