Skip to main content
POST
Create a Sales Attribution export (attributed performance metrics)

Headers

Body

Send one of the following 3 shapes.

Export to Northbeam documents

FieldTypeDescription
export_file_namestringName of the exported file, if not provided, default one will be used.
Minimum string length: 3
Pattern: ^[A-Za-z0-9_-]+$
levelstringLevel of metrics to export.
Available options: “platform”, “campaign”, “adset”, “ad”
Default: “platform”
time_granularitystringData time granularity.
Available options: “MONTHLY”, “WEEKLY”, “DAILY”, “HOURLY”
Default: “DAILY”
period_typestringTime period to be exported. It can be either a relative window or a fixed window. If you choose to export a fixed window, the period_options property must be set.
Available options: “FIXED”, “TODAY”, “YESTERDAY”, “YESTERDAY_AND_TODAY”, “LAST_3_DAYS”, “LAST_7_DAYS”, “LAST_14_DAYS”, “LAST_28_DAYS”, “LAST_30_DAYS”, “LAST_60_DAYS”, “LAST_90_DAYS”, “LAST_180_DAYS”, “MONTH_TO_DATE”, “LAST_MONTH”, “THIS_WEEK”, “LAST_WEEK”, “THIS_WEEK_AND_LAST_WEEK”, “LAST_3_WEEKS”, “LAST_4_WEEKS”, “LAST_7_WEEKS”, “LAST_12_WEEKS”, “LAST_14_WEEKS”, “LAST_26_WEEKS”, “LAST_28_WEEKS”, “LAST_52_WEEKS”, “THIS_MONTH”, “THIS_MONTH_AND_LAST_MONTH”, “LAST_3_MONTHS”, “LAST_6_MONTHS”, “LAST_9_MONTHS”, “LAST_12_MONTHS”, “YEAR_TO_DATE”, “LAST_YEAR”, “LAST_3_YEARS”, “LAST_5_YEARS”
Default: “LAST_7_DAYS”
period_optionsobjectTime frame to be exported if period_type is set to “FIXED”. The time period cannot be greater than 2 years.
Field
Type
Description
period_starting_at
string (date-time)
period_ending_at
string (date-time)
breakdownsobject[]Labels used to breakdown the data. If you are unsure which breakdowns to use, you can fetch them using the /breakdowns endpoint.
Field
Type
Description
key
string
values
string[]
optionsobject
Field
Type
Description
export_aggregation
string
Aggregation type.
Available options: “BREAKDOWN”, “DATE”
Default: “BREAKDOWN”
remove_zero_spend
boolean
Remove rows with zero spend.
Default: false
aggregate_data
boolean
Aggregate data, ignoring campaign, adset and ad levels.
Default: false
include_ids
boolean
Include campaign, adset and ad ids in exported data.
Default: false
include_kind_and_platform
boolean
Include campaign, adset and ad kind and platform in exported data.
Default: false
attribution_options requiredobject
Field
Type
Description
attribution_models
string[]
Attribution models to use. Check in /attribution-models for available models.
Required range: x >= 1
attribution_windows
string[]
Required range: x >= 1
accounting_modes
string[]
Required range: x >= 1
metrics requiredobject[]Metrics to export. Check in /metrics for available metrics.
Required range: x >= 1
Field
Type
Description
id required
string
Metric ID
label
string
Metric label to be used as file header. If not provided, a default label will be used.
Pattern: ^[a-zA-Z][a-zA-Z0-9_]+[a-zA-Z0-9]$

Export to GCS bucket

FieldTypeDescription
bucket_name requiredstringName of the external bucket where to export your file.
export_file_namestringName of the exported file, if not provided, default one will be used. Can include subdirectory paths (e.g., folder/subfolder/file).
Minimum string length: 3
Pattern: ^(?!/)(?!.*//)[A-Za-z0-9_/-]+(?<!/)$
levelstringLevel of metrics to export.
Available options: “platform”, “campaign”, “adset”, “ad”
Default: “platform”
time_granularitystringData time granularity.
Available options: “MONTHLY”, “WEEKLY”, “DAILY”, “HOURLY”
Default: “DAILY”
period_typestringTime period to be exported. It can be either a relative window or a fixed window. If you choose to export a fixed window, the period_options property must be set.
Available options: “FIXED”, “TODAY”, “YESTERDAY”, “YESTERDAY_AND_TODAY”, “LAST_3_DAYS”, “LAST_7_DAYS”, “LAST_14_DAYS”, “LAST_28_DAYS”, “LAST_30_DAYS”, “LAST_60_DAYS”, “LAST_90_DAYS”, “LAST_180_DAYS”, “MONTH_TO_DATE”, “LAST_MONTH”, “THIS_WEEK”, “LAST_WEEK”, “THIS_WEEK_AND_LAST_WEEK”, “LAST_3_WEEKS”, “LAST_4_WEEKS”, “LAST_7_WEEKS”, “LAST_12_WEEKS”, “LAST_14_WEEKS”, “LAST_26_WEEKS”, “LAST_28_WEEKS”, “LAST_52_WEEKS”, “THIS_MONTH”, “THIS_MONTH_AND_LAST_MONTH”, “LAST_3_MONTHS”, “LAST_6_MONTHS”, “LAST_9_MONTHS”, “LAST_12_MONTHS”, “YEAR_TO_DATE”, “LAST_YEAR”, “LAST_3_YEARS”, “LAST_5_YEARS”
Default: “LAST_7_DAYS”
period_optionsobjectTime frame to be exported if period_type is set to “FIXED”. The time period cannot be greater than 2 years.
Field
Type
Description
period_starting_at
string (date-time)
period_ending_at
string (date-time)
breakdownsobject[]Labels used to breakdown the data. If you are unsure which breakdowns to use, you can fetch them using the /breakdowns endpoint.
Field
Type
Description
key
string
values
string[]
optionsobject
Field
Type
Description
export_aggregation
string
Aggregation type.
Available options: “BREAKDOWN”, “DATE”
Default: “BREAKDOWN”
remove_zero_spend
boolean
Remove rows with zero spend.
Default: false
aggregate_data
boolean
Aggregate data, ignoring campaign, adset and ad levels.
Default: false
include_ids
boolean
Include campaign, adset and ad ids in exported data.
Default: false
include_kind_and_platform
boolean
Include campaign, adset and ad kind and platform in exported data.
Default: false
attribution_options requiredobject
Field
Type
Description
attribution_models
string[]
Attribution models to use. Check in /attribution-models for available models.
Required range: x >= 1
attribution_windows
string[]
Required range: x >= 1
accounting_modes
string[]
Required range: x >= 1
metrics requiredobject[]Metrics to export. Check in /metrics for available metrics.
Required range: x >= 1
Field
Type
Description
id required
string
Metric ID
label
string
Metric label to be used as file header. If not provided, a default label will be used.
Pattern: ^[a-zA-Z][a-zA-Z0-9_]+[a-zA-Z0-9]$

Export to S3 bucket

FieldTypeDescription
aws_role requiredstringAWS role ARN with access to the S3 bucket.
region requiredstringRegion of the S3 bucket.
export_file_namestringName of the exported file, if not provided, default one will be used. Can include subdirectory paths (e.g., folder/subfolder/file).
Minimum string length: 3
Pattern: ^(?!/)(?!.*//)[A-Za-z0-9_/-]+(?<!/)$
levelstringLevel of metrics to export.
Available options: “platform”, “campaign”, “adset”, “ad”
Default: “platform”
time_granularitystringData time granularity.
Available options: “MONTHLY”, “WEEKLY”, “DAILY”, “HOURLY”
Default: “DAILY”
period_typestringTime period to be exported. It can be either a relative window or a fixed window. If you choose to export a fixed window, the period_options property must be set.
Available options: “FIXED”, “TODAY”, “YESTERDAY”, “YESTERDAY_AND_TODAY”, “LAST_3_DAYS”, “LAST_7_DAYS”, “LAST_14_DAYS”, “LAST_28_DAYS”, “LAST_30_DAYS”, “LAST_60_DAYS”, “LAST_90_DAYS”, “LAST_180_DAYS”, “MONTH_TO_DATE”, “LAST_MONTH”, “THIS_WEEK”, “LAST_WEEK”, “THIS_WEEK_AND_LAST_WEEK”, “LAST_3_WEEKS”, “LAST_4_WEEKS”, “LAST_7_WEEKS”, “LAST_12_WEEKS”, “LAST_14_WEEKS”, “LAST_26_WEEKS”, “LAST_28_WEEKS”, “LAST_52_WEEKS”, “THIS_MONTH”, “THIS_MONTH_AND_LAST_MONTH”, “LAST_3_MONTHS”, “LAST_6_MONTHS”, “LAST_9_MONTHS”, “LAST_12_MONTHS”, “YEAR_TO_DATE”, “LAST_YEAR”, “LAST_3_YEARS”, “LAST_5_YEARS”
Default: “LAST_7_DAYS”
period_optionsobjectTime frame to be exported if period_type is set to “FIXED”. The time period cannot be greater than 2 years.
Field
Type
Description
period_starting_at
string (date-time)
period_ending_at
string (date-time)
breakdownsobject[]Labels used to breakdown the data. If you are unsure which breakdowns to use, you can fetch them using the /breakdowns endpoint.
Field
Type
Description
key
string
values
string[]
optionsobject
Field
Type
Description
export_aggregation
string
Aggregation type.
Available options: “BREAKDOWN”, “DATE”
Default: “BREAKDOWN”
remove_zero_spend
boolean
Remove rows with zero spend.
Default: false
aggregate_data
boolean
Aggregate data, ignoring campaign, adset and ad levels.
Default: false
include_ids
boolean
Include campaign, adset and ad ids in exported data.
Default: false
include_kind_and_platform
boolean
Include campaign, adset and ad kind and platform in exported data.
Default: false
attribution_options requiredobject
Field
Type
Description
attribution_models
string[]
Attribution models to use. Check in /attribution-models for available models.
Required range: x >= 1
attribution_windows
string[]
Required range: x >= 1
accounting_modes
string[]
Required range: x >= 1
metrics requiredobject[]Metrics to export. Check in /metrics for available metrics.
Required range: x >= 1
Field
Type
Description
id required
string
Metric ID
label
string
Metric label to be used as file header. If not provided, a default label will be used.
Pattern: ^[a-zA-Z][a-zA-Z0-9_]+[a-zA-Z0-9]$

Responses

201 response body

FieldTypeDescription
id requiredstring (uuid)

Authorizations

Authorization
string
header
required
Data-Client-ID
string
header
required

Body

application/json
attribution_options
object
required
metrics
object[]
required

Metrics to export. Check in /metrics for available metrics.

export_file_name
string

Name of the exported file, if not provided, default one will be used.

Minimum string length: 3
Pattern: ^[A-Za-z0-9_-]+$
level
enum<string>
default:platform

Level of metrics to export.

Available options:
platform,
campaign,
adset,
ad
time_granularity
enum<string>
default:DAILY

Data time granularity.

Available options:
MONTHLY,
WEEKLY,
DAILY,
HOURLY
period_type
enum<string>
default:LAST_7_DAYS

Time period to be exported. It can be either a relative window or a fixed window. If you choose to export a fixed window, the period_options property must be set.

Available options:
FIXED,
TODAY,
YESTERDAY,
YESTERDAY_AND_TODAY,
LAST_3_DAYS,
LAST_7_DAYS,
LAST_14_DAYS,
LAST_28_DAYS,
LAST_30_DAYS,
LAST_60_DAYS,
LAST_90_DAYS,
LAST_180_DAYS,
MONTH_TO_DATE,
LAST_MONTH,
THIS_WEEK,
LAST_WEEK,
THIS_WEEK_AND_LAST_WEEK,
LAST_3_WEEKS,
LAST_4_WEEKS,
LAST_7_WEEKS,
LAST_12_WEEKS,
LAST_14_WEEKS,
LAST_26_WEEKS,
LAST_28_WEEKS,
LAST_52_WEEKS,
THIS_MONTH,
THIS_MONTH_AND_LAST_MONTH,
LAST_3_MONTHS,
LAST_6_MONTHS,
LAST_9_MONTHS,
LAST_12_MONTHS,
YEAR_TO_DATE,
LAST_YEAR,
LAST_3_YEARS,
LAST_5_YEARS
period_options
object

Time frame to be exported if period_type is set to "FIXED". The time period cannot be greater than 2 years.

breakdowns
object[]

Labels used to breakdown the data. If you are unsure which breakdowns to use, you can fetch them using the /breakdowns endpoint.

options
object

Response

Data Export created successfully

id
string<uuid>
required