List goals sent to ads
GET
/api/v1/ads/goals
const url = 'https://digize.com/api/v1/ads/goals';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/goals \ --header 'x-api-key: <x-api-key>'The form goals sent to the ad platforms (Analytics › Settings › Goals, with an ad category) and, for each platform whose conversion tracking is on, whether its conversion goal is made and how many conversions went there this week.
Needs the ads:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
Array<object>
object
id
required
string
name
required
string
form
required
The form whose posts count.
string
category
required
string
value
required
number | null
createdAt
required
string format: date-time
platforms
required
Each platform whose conversion tracking is on.
Array<object>
object
platform
required
string
state
required
ready: its conversion goal is made, or the platform needs none; making: it’s being made; refused: the platform wouldn’t, and error says why.
string
error
required
string | null
sent
required
Conversions sent over the last 7 days.
number
Example
[ { "category": "lead", "platforms": [ { "platform": "google", "state": "ready" } ] }]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" }}