Skip to main content
POST
Create a data export

Autorizações

Authorization
string
header
obrigatório

A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.

Corpo

application/json

The data you want to export.

dataset
enum<string>
obrigatório

The dataset to export. The datasets endpoint lists the ones you can request.

Opções disponíveis:
monitoring_metrics
Exemplo:

"monitoring_metrics"

dimensions
enum<string>[]
obrigatório

Dimensions to group the rows by; each one becomes a column in the file. Send each value once. Columns appear in the order you send them: dimensions first, then metrics.

Required array length: 1 - 26 elements

Dimensions you can group an export by; each one becomes a column in the file.

Opções disponíveis:
vendor_id,
campaign_id,
entity_type,
entity_id,
day_local,
device_type,
page_id,
page_type,
page_value,
placement_page,
auction_device,
auction_location,
auction_page_type,
auction_page_id,
auction_page_value,
auction_search_query,
auction_category,
currency_code,
vendor_name,
campaign_name,
external_campaign_id,
status,
campaign_type,
ad_format,
charge_type,
is_active
Exemplo:
metrics
enum<string>[]
obrigatório

Metrics to include in each row; each one becomes a column in the file. Send each value once.

Required array length: 1 - 19 elements

Metrics you can include in an export; each one becomes a column in the file.

Opções disponíveis:
impressions,
clicks,
charged_clicks,
charged_impressions,
charged_attributed_purchases,
quantity,
purchase_count,
ad_spent_clicks,
ad_spent_impressions,
ad_spent_exclusive_campaign,
ad_spent_attributed_purchases,
ad_spend,
total_purchase_amount,
ctr,
conversion_rate,
cpc,
cpm,
roas,
acos
Exemplo:
granularity
enum<string>
obrigatório

How the rows are grouped in time, one of the dataset's granularities. day_local gives one row per local day and adds day_local as the first column if dimensions leaves it out. total gives one row of totals for the whole window per combination of the other dimensions, so dimensions cannot include day_local.

Opções disponíveis:
day_local,
total
Exemplos:

"day_local"

"total"

startDate
string<date>
obrigatório

First local day to export (YYYY-MM-DD, inclusive). By default it can be at most 120 days before today in UTC; your limit may differ, and the error for an older date states it.

Exemplo:

"2026-09-01"

endDate
string<date>
obrigatório

Last local day to export (YYYY-MM-DD, inclusive). It must be on or after startDate, and by default the window can cover up to 31 days counting both; your limit may differ, and the error for a longer window states it.

Exemplo:

"2026-09-07"

vendorIds
string[]

The vendor_id of each vendor to export, up to 100. It only narrows the export and does not restrict access: leave it out or empty to export every vendor. An unknown ID rejects the request.

Maximum array length: 100
Required string length: 1 - 255
Exemplo:
entityTypes
enum<string>[]

The entity_type values to export. It only narrows the export: leave it out or empty to export every entity type.

Maximum array length: 4

Entity types you can filter an export by, as they appear in the entity_type column.

Opções disponíveis:
halo-product,
product,
url,
vendor
Exemplo:

Resposta

Your export was accepted and is pending. Check it with the returned exportId until it is completed or failed.

The export you requested, which runs in the background.

exportId
string<uuid>
obrigatório

ID of your export. Use it to check the export's status.

Exemplo:

"218ad339-00cd-4e11-aeaa-8d96694908a0"

status
enum<string>
obrigatório

Always pending: your export starts in the background.

Opções disponíveis:
pending,
running,
completed,
failed
Exemplo:

"pending"

dataset
enum<string>
obrigatório

The dataset being exported.

Opções disponíveis:
monitoring_metrics
Exemplo:

"monitoring_metrics"

createdAt
string<date-time>
obrigatório

When you requested the export.

Exemplo:

"2026-09-08T14:03:12Z"