List a platform's campaigns
GET
/api/v1/ads/accounts/{platform}/campaigns
const url = 'https://digize.com/api/v1/ads/accounts/google/campaigns';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/ads/accounts/google/campaigns \ --header 'x-api-key: <x-api-key>'The campaigns in a platform’s connected ad account, asked of the platform now, with their last 30 days and whether each is in Digize already. For choosing ones to import.
Needs the ads:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”platform
required
string
Responses
Section titled “Responses”Done
Media typeapplication/json
object
data
required
Array<object>
object
externalId
required
Its id on the platform.
string
name
required
string
type
required
The platform’s name for its type, such as Search or Display.
string
status
required
string
dailyBudget
required
number
impressions
required
Last 30 days.
number
clicks
required
Last 30 days.
number
spend
required
Last 30 days.
number
campaignId
required
Digize’s id for it once it’s here, imported or published from Digize.
string | null
reason
required
Why it can’t be imported; null when it can.
string | null
Example
{ "data": [ { "format": "google_search", "status": "active" } ]}What was sent isn’t valid (invalid).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}