Skip to main content
POST
Upsert hourly spend records

Headers

Body

FieldTypeDescription
data requiredobject[]
Field
Type
Description
Example
hour_start_iso required
string (date-time)
The date-time of spend entry to upsert in UTC, required
”1970-01-01T00:00:00-0000”
platform_account_id
string
The Ad Platform Account ID to upsert, used for segregating ad objects per ad platform account
Default: ""
"12345”
platform_name required
string
The Ad Platform Name to upsert, required
”Facebook”
campaign_id required
string
The Ad Platform’s Campaign ID (utm_campaign, if known) to upsert, required
”12345”
campaign_name required
string
The Ad Platform Campaign Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as campaign_id
”Banana Festival Awareness Campaign”
adset_id
string
The Ad Platform’s Adset ID (utm_term, if known) to upsert, defaults to ” if empty (not all platforms support adsets)
Default: ""
"12345”
adset_name
string
The Ad Platform Adset Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as adset_id - defaults to ” if empty
Default: ""
"Banana Adset”
ad_id
string
The Ad Platform’s Ad ID (utm_content, if known) to upsert, defaults to ” if empty (not all platforms support ads)
Default: ""
"12345”
ad_name
string
The Ad Platform Ad Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as adset_id - defaults to ” if empty
Default: ""
"Banana Ad”
spend required
number
Amount (in currency) spent on ad object to upsert, defaults to 0 if empty
Required range: x >= 0
123.5
spend_currency required
string
The Currency of the Spend per ISO 4217 to upsert, required
Required string length: 3 - 3
”USD”
impressions
number
The amount of impressions the ad object received on a given date, defaults to 0 if empty
Required range: x >= 0
Default: 0
299
clicks
number
The amount of clicks the ad object received on a given date, defaults to 0 if empty
Required range: x >= 0
Default: 0
0

Responses

201 response body

FieldTypeDescription
data requiredobject[]
Field
Type
Description
Example
hour_start_iso required
string (date-time)
The date-time of spend entry to upsert in UTC, required
”1970-01-01T00:00:00-0000”
platform_account_id
string
The Ad Platform Account ID to upsert, used for segregating ad objects per ad platform account
Default: ""
"12345”
platform_name required
string
The Ad Platform Name to upsert, required
”Facebook”
campaign_id required
string
The Ad Platform’s Campaign ID (utm_campaign, if known) to upsert, required
”12345”
campaign_name required
string
The Ad Platform Campaign Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as campaign_id
”Banana Festival Awareness Campaign”
adset_id
string
The Ad Platform’s Adset ID (utm_term, if known) to upsert, defaults to ” if empty (not all platforms support adsets)
Default: ""
"12345”
adset_name
string
The Ad Platform Adset Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as adset_id - defaults to ” if empty
Default: ""
"Banana Adset”
ad_id
string
The Ad Platform’s Ad ID (utm_content, if known) to upsert, defaults to ” if empty (not all platforms support ads)
Default: ""
"12345”
ad_name
string
The Ad Platform Ad Name to upsert - will be as Ad Name in the Northbeam Dashboard - can be the same as adset_id - defaults to ” if empty
Default: ""
"Banana Ad”
spend required
number
Amount (in currency) spent on ad object to upsert, defaults to 0 if empty
Required range: x >= 0
123.5
spend_currency required
string
The Currency of the Spend per ISO 4217 to upsert, required
Required string length: 3 - 3
”USD”
impressions
number
The amount of impressions the ad object received on a given date, defaults to 0 if empty
Required range: x >= 0
Default: 0
299
clicks
number
The amount of clicks the ad object received on a given date, defaults to 0 if empty
Required range: x >= 0
Default: 0
0
created_at required
string (date-time)
updated_at required
string (date-time)

401 response body

FieldTypeDescription
errorsobject[], nullable
message requiredstring
request_idstring (uuid), nullable

422 response body

FieldTypeDescription
errorsobject[], nullable
message requiredstring
request_idstring (uuid), nullable

4XX response body

FieldTypeDescription
errorsobject[], nullable
message requiredstring
request_idstring (uuid), nullable

5XX response body

FieldTypeDescription
errorsobject[], nullable
message requiredstring
request_idstring (uuid), nullable

Authorizations

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

Body

application/json
data
Spend Hourly Entry · object[]
required

Response

The hourly spend records were successfully upserted.

data
Spend Entry Return · object[]
required