Datenschutzeinstellungen

Notwendige Funktionen

Für Sicherheit und grundlegende Website-Funktionen erforderlich.

Immer aktiv

Landing-Diagnose und maskierte Aufzeichnungen

Misst öffentliche Besuche, Absprünge und Interaktionen mit Registrierungslinks mit einer anonymen ID nur für diesen Tab, ohne Kontoverknüpfung. Alle Texte werden maskiert und Formulare ausgeschlossen.

Optionale Nutzungsanalyse

PostHog-Nutzungsanalyse erlauben? Du kannst deine Wahl jederzeit in der Fußzeile ändern.

Auch Sitzungsaufzeichnungen auf dieser öffentlichen Website erlauben

Aufzeichnungen im optionalen websiteübergreifenden Modus zeigen öffentliche Seiten und Interaktionen; Eingaben und private Inhalte werden maskiert. App-Aufzeichnungen sind eine separate Auswahl.

Erfordert optionale Analysen; Aufzeichnungen in diesem websiteübergreifenden Modus sind standardmäßig deaktiviert. Der Landing-Modus oben läuft separat.

Browser-Analysen aktivieren keine Kontoanalysen.

Die Suche lädt erst bei Nutzung. Durchsuche unten alle Kategorien.

Werbung

Werbe-Insights abfragen

Rufe begrenzte offizielle Ergebnisse bezahlter Werbung mit ausdrücklichen Datumsangaben, Zeitzone, Währung, Attributionsfenster und Conversion-Aktion ab. Fehlende Kennzahlen bleiben fehlend.

POST /advertising-api/insights/query

Vertrag geprüft: · sha256:9aedef8d43dd4514

Überblick

Rufe begrenzte offizielle Ergebnisse bezahlter Werbung mit ausdrücklichen Datumsangaben, Zeitzone, Währung, Attributionsfenster und Conversion-Aktion ab. Fehlende Kennzahlen bleiben fehlend.

Eine erfolgreiche HTTP-Antwort kann Annahme statt Abschluss bedeuten. Speichere bei Hintergrundarbeit die ID und prüfe dieselbe Operation bis zum Abschluss. Geplante oder angenommene Beiträge gelten erst nach Plattformbestätigung als veröffentlicht; ein Client-Timeout klärt das Ergebnis nicht.

Authentifizierung und Berechtigungen

Akzeptierte Zugangsdatenklassen
user_session, delegated_oauth, personal_access_token
Delegierte Funktion
agent:advertising_read
Minimale Workspace-Rolle
viewer
Zugriffsumfang
Ressourcen, auf die dieser Nutzer zugreifen darf
Zustimmung für alle Workspaces erforderlich
Nein
Ändert Zustand
Nein
Nach Abschluss der Operation
synchronous_http_response

Ein Token nutzt nur Eigentümerrechte. Jede Anfrage prüft Workspace-Mitgliedschaft, Ressourceneigentum, gewählte Workspaces und Funktionen. core und full ändern sichtbare Tools; sie erteilen keinen Zugriff.

Anfragefelder

Erforderlich bedeutet innerhalb des übergeordneten Objekts und gewählten Zweigs erforderlich. Ein erforderliches Kind macht kein optionales Elternobjekt erforderlich. Regeln und Feldnamen unten stammen aus dem Vertrag.

Anfragefelder
Feld / VarianteTyp / erforderlichEinschränkungen
$objectIm Elternobjekt erforderlich
  • additionalProperties: false
workspace_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
advertising_account_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
levelstringIm Elternobjekt erforderlich
  • enum: ["campaign","adset","ad"]
start_datestringIm Elternobjekt erforderlich
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
end_datestringIm Elternobjekt erforderlich
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
action_attribution_windowsarrayIm Elternobjekt erforderlich
  • minItems: 1
  • maxItems: 1
action_attribution_windows[]stringOptional / Element
  • enum: ["1d_click","7d_click","1d_view"]
action_report_timestringIm Elternobjekt erforderlich
  • enum: ["impression","conversion"]
conversion_action_typestringIm Elternobjekt erforderlich
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
revenue_action_typestringIm Elternobjekt erforderlich
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
afterstringOptional / Element
  • maxLength: 2048
limitintegerOptional / Element
  • minimum: 1
  • maximum: 50
  • default: 25
Vollständiges JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "advertising_account_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "level": {
      "type": "string",
      "enum": [
        "campaign",
        "adset",
        "ad"
      ]
    },
    "start_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "end_date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "action_attribution_windows": {
      "minItems": 1,
      "maxItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "1d_click",
          "7d_click",
          "1d_view"
        ]
      }
    },
    "action_report_time": {
      "type": "string",
      "enum": [
        "impression",
        "conversion"
      ]
    },
    "conversion_action_type": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_.]{0,99}$"
    },
    "revenue_action_type": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_.]{0,99}$"
    },
    "after": {
      "type": "string",
      "maxLength": 2048
    },
    "limit": {
      "default": 25,
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "required": [
    "workspace_id",
    "advertising_account_id",
    "level",
    "start_date",
    "end_date",
    "action_attribution_windows",
    "action_report_time",
    "conversion_action_type",
    "revenue_action_type"
  ],
  "additionalProperties": false
}

Antwort und Abschluss

HTTP-Erfolgsstatus: 200. Wenn die Operation abgeschlossen ist: synchronous_http_response.

Eine erfolgreiche HTTP-Antwort kann Annahme statt Abschluss bedeuten. Speichere bei Hintergrundarbeit die ID und prüfe dieselbe Operation bis zum Abschluss. Geplante oder angenommene Beiträge gelten erst nach Plattformbestätigung als veröffentlicht; ein Client-Timeout klärt das Ergebnis nicht.

Erforderlich bedeutet innerhalb des übergeordneten Objekts und gewählten Zweigs erforderlich. Ein erforderliches Kind macht kein optionales Elternobjekt erforderlich. Regeln und Feldnamen unten stammen aus dem Vertrag.

Antwort und Abschluss
Feld / VarianteTyp / erforderlichEinschränkungen
$objectIm Elternobjekt erforderlich—
contract_versionstringIm Elternobjekt erforderlich
  • const: "ad-performance/v1"
source_idstringIm Elternobjekt erforderlich
  • maxLength: 100
source_sha256stringIm Elternobjekt erforderlich
  • pattern: "^[a-f0-9]{64}$"
identity_verificationstringIm Elternobjekt erforderlich
  • enum: ["customer_supplied","accepted_provider_grant"]
currencystringIm Elternobjekt erforderlich
  • pattern: "^[A-Z]{3}$"
timezonestringIm Elternobjekt erforderlich
  • maxLength: 100
selectionobjectIm Elternobjekt erforderlich—
selection.provider_api_versionstringIm Elternobjekt erforderlich
  • const: "v26.0"
selection.provider_account_idstringIm Elternobjekt erforderlich
  • pattern: "^[1-9]\\d{1,24}$"
selection.currencystringIm Elternobjekt erforderlich
  • pattern: "^[A-Z]{3}$"
selection.timezonestringIm Elternobjekt erforderlich
  • maxLength: 100
selection.levelstringIm Elternobjekt erforderlich
  • enum: ["campaign","adset","ad"]
selection.start_datestringIm Elternobjekt erforderlich
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.end_datestringIm Elternobjekt erforderlich
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.action_attribution_windowsarrayIm Elternobjekt erforderlich
  • minItems: 1
  • maxItems: 1
selection.action_attribution_windows[]stringOptional / Element
  • enum: ["1d_click","7d_click","1d_view"]
selection.action_report_timestringIm Elternobjekt erforderlich
  • enum: ["impression","conversion"]
selection.conversion_action_typestringIm Elternobjekt erforderlich
  • maxLength: 100
selection.revenue_action_typestringIm Elternobjekt erforderlich
  • maxLength: 100
completebooleanIm Elternobjekt erforderlich—
rowsarrayIm Elternobjekt erforderlich
  • maxItems: 500
rows[]objectOptional / Element—
rows[].row_idstringIm Elternobjekt erforderlich
  • maxLength: 100
rows[].metricsobjectIm Elternobjekt erforderlich—
rows[].metrics.spendobjectIm Elternobjekt erforderlich—
rows[].metrics.spend.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.spend.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.spend.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.spend.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.spend.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.spend.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.spend.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.spend.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.spend.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.spend.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.clicksobjectIm Elternobjekt erforderlich—
rows[].metrics.clicks.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.clicks.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.clicks.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.clicks.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.clicks.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.clicks.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.clicks.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.clicks.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.clicks.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.clicks.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.conversionsobjectIm Elternobjekt erforderlich—
rows[].metrics.conversions.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.conversions.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.conversions.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.conversions.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.conversions.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.conversions.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.conversions.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.conversions.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.conversions.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.conversions.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.attributed_revenueobjectIm Elternobjekt erforderlich—
rows[].metrics.attributed_revenue.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_revenue.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_revenue.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_revenue.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_revenue.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_revenue.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_revenue.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.attributed_revenue.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_revenue.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.attributed_revenue.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.cpcobjectIm Elternobjekt erforderlich—
rows[].metrics.cpc.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.cpc.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpc.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.cpc.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpc.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpc.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.cpc.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.cpc.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.cpc.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.cpc.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.cpaobjectIm Elternobjekt erforderlich—
rows[].metrics.cpa.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.cpa.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpa.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.cpa.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpa.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpa.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.cpa.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.cpa.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.cpa.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.cpa.input_refs[]stringOptional / Element
  • maxLength: 300
rows[].metrics.attributed_roasobjectIm Elternobjekt erforderlich—
rows[].metrics.attributed_roas.valuestring | nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_roas.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_roas.valueanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_roas.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_roas.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_roas.reasonstring | nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_roas.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
rows[].metrics.attributed_roas.reasonanyOf 2nullIm Elternobjekt erforderlich—
rows[].metrics.attributed_roas.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
rows[].metrics.attributed_roas.input_refs[]stringOptional / Element
  • maxLength: 300
totalsobjectIm Elternobjekt erforderlich—
totals.spendobjectIm Elternobjekt erforderlich—
totals.spend.valuestring | nullIm Elternobjekt erforderlich—
totals.spend.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.spend.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.spend.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.spend.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.spend.reasonstring | nullIm Elternobjekt erforderlich—
totals.spend.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.spend.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.spend.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.spend.input_refs[]stringOptional / Element
  • maxLength: 300
totals.clicksobjectIm Elternobjekt erforderlich—
totals.clicks.valuestring | nullIm Elternobjekt erforderlich—
totals.clicks.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.clicks.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.clicks.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.clicks.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.clicks.reasonstring | nullIm Elternobjekt erforderlich—
totals.clicks.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.clicks.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.clicks.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.clicks.input_refs[]stringOptional / Element
  • maxLength: 300
totals.conversionsobjectIm Elternobjekt erforderlich—
totals.conversions.valuestring | nullIm Elternobjekt erforderlich—
totals.conversions.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.conversions.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.conversions.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.conversions.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.conversions.reasonstring | nullIm Elternobjekt erforderlich—
totals.conversions.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.conversions.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.conversions.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.conversions.input_refs[]stringOptional / Element
  • maxLength: 300
totals.attributed_revenueobjectIm Elternobjekt erforderlich—
totals.attributed_revenue.valuestring | nullIm Elternobjekt erforderlich—
totals.attributed_revenue.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_revenue.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.attributed_revenue.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_revenue.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_revenue.reasonstring | nullIm Elternobjekt erforderlich—
totals.attributed_revenue.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.attributed_revenue.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.attributed_revenue.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.attributed_revenue.input_refs[]stringOptional / Element
  • maxLength: 300
totals.cpcobjectIm Elternobjekt erforderlich—
totals.cpc.valuestring | nullIm Elternobjekt erforderlich—
totals.cpc.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpc.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.cpc.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpc.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpc.reasonstring | nullIm Elternobjekt erforderlich—
totals.cpc.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.cpc.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.cpc.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.cpc.input_refs[]stringOptional / Element
  • maxLength: 300
totals.cpaobjectIm Elternobjekt erforderlich—
totals.cpa.valuestring | nullIm Elternobjekt erforderlich—
totals.cpa.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpa.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.cpa.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpa.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpa.reasonstring | nullIm Elternobjekt erforderlich—
totals.cpa.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.cpa.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.cpa.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.cpa.input_refs[]stringOptional / Element
  • maxLength: 300
totals.attributed_roasobjectIm Elternobjekt erforderlich—
totals.attributed_roas.valuestring | nullIm Elternobjekt erforderlich—
totals.attributed_roas.valueanyOf 1stringIm Elternobjekt erforderlich
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_roas.valueanyOf 2nullIm Elternobjekt erforderlich—
totals.attributed_roas.unitstringIm Elternobjekt erforderlich
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_roas.availabilitystringIm Elternobjekt erforderlich
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_roas.reasonstring | nullIm Elternobjekt erforderlich—
totals.attributed_roas.reasonanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 300
totals.attributed_roas.reasonanyOf 2nullIm Elternobjekt erforderlich—
totals.attributed_roas.input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
totals.attributed_roas.input_refs[]stringOptional / Element
  • maxLength: 300
gapsarrayIm Elternobjekt erforderlich
  • maxItems: 1000
gaps[]stringOptional / Element
  • maxLength: 300
suggestionsarrayIm Elternobjekt erforderlich
  • maxItems: 3
suggestions[]objectOptional / Element—
suggestions[].rule_idstringIm Elternobjekt erforderlich
  • enum: ["supply_revenue","review_comparable_creative_test","complete_coverage"]
suggestions[].rule_versionnumberIm Elternobjekt erforderlich
  • const: 1
suggestions[].proposalstringIm Elternobjekt erforderlich
  • maxLength: 600
suggestions[].input_refsarrayIm Elternobjekt erforderlich
  • maxItems: 2000
suggestions[].input_refs[]stringOptional / Element
  • maxLength: 300
suggestions[].limitationsstringIm Elternobjekt erforderlich
  • const: "Observational comparison only; no causal uplift or profitability claim. Human review required."
advertising_account_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
next_cursorstring | nullIm Elternobjekt erforderlich—
next_cursoranyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 2048
next_cursoranyOf 2nullIm Elternobjekt erforderlich—
Vollständiges JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "ad-performance/v1"
    },
    "source_id": {
      "type": "string",
      "maxLength": 100
    },
    "source_sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "identity_verification": {
      "type": "string",
      "enum": [
        "customer_supplied",
        "accepted_provider_grant"
      ]
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "timezone": {
      "type": "string",
      "maxLength": 100
    },
    "selection": {
      "type": "object",
      "properties": {
        "provider_api_version": {
          "type": "string",
          "const": "v26.0"
        },
        "provider_account_id": {
          "type": "string",
          "pattern": "^[1-9]\\d{1,24}$"
        },
        "currency": {
          "type": "string",
          "pattern": "^[A-Z]{3}$"
        },
        "timezone": {
          "type": "string",
          "maxLength": 100
        },
        "level": {
          "type": "string",
          "enum": [
            "campaign",
            "adset",
            "ad"
          ]
        },
        "start_date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "end_date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
        },
        "action_attribution_windows": {
          "minItems": 1,
          "maxItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "1d_click",
              "7d_click",
              "1d_view"
            ]
          }
        },
        "action_report_time": {
          "type": "string",
          "enum": [
            "impression",
            "conversion"
          ]
        },
        "conversion_action_type": {
          "type": "string",
          "maxLength": 100
        },
        "revenue_action_type": {
          "type": "string",
          "maxLength": 100
        }
      },
      "required": [
        "provider_api_version",
        "provider_account_id",
        "currency",
        "timezone",
        "level",
        "start_date",
        "end_date",
        "action_attribution_windows",
        "action_report_time",
        "conversion_action_type",
        "revenue_action_type"
      ]
    },
    "complete": {
      "type": "boolean"
    },
    "rows": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row_id": {
            "type": "string",
            "maxLength": 100
          },
          "metrics": {
            "type": "object",
            "properties": {
              "spend": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "clicks": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "conversions": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "attributed_revenue": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "cpc": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "cpa": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              },
              "attributed_roas": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "currency",
                      "count",
                      "currency_per_click",
                      "currency_per_conversion",
                      "ratio"
                    ]
                  },
                  "availability": {
                    "type": "string",
                    "enum": [
                      "available",
                      "missing_input",
                      "zero_denominator",
                      "incompatible",
                      "partial"
                    ]
                  },
                  "reason": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 300
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "input_refs": {
                    "maxItems": 2000,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "value",
                  "unit",
                  "availability",
                  "reason",
                  "input_refs"
                ]
              }
            },
            "required": [
              "spend",
              "clicks",
              "conversions",
              "attributed_revenue",
              "cpc",
              "cpa",
              "attributed_roas"
            ]
          }
        },
        "required": [
          "row_id",
          "metrics"
        ]
      }
    },
    "totals": {
      "type": "object",
      "properties": {
        "spend": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "clicks": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "conversions": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "attributed_revenue": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "cpc": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "cpa": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        },
        "attributed_roas": {
          "type": "object",
          "properties": {
            "value": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{1,24}(?:\\.\\d{1,6})?$"
                },
                {
                  "type": "null"
                }
              ]
            },
            "unit": {
              "type": "string",
              "enum": [
                "currency",
                "count",
                "currency_per_click",
                "currency_per_conversion",
                "ratio"
              ]
            },
            "availability": {
              "type": "string",
              "enum": [
                "available",
                "missing_input",
                "zero_denominator",
                "incompatible",
                "partial"
              ]
            },
            "reason": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 300
                },
                {
                  "type": "null"
                }
              ]
            },
            "input_refs": {
              "maxItems": 2000,
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 300
              }
            }
          },
          "required": [
            "value",
            "unit",
            "availability",
            "reason",
            "input_refs"
          ]
        }
      },
      "required": [
        "spend",
        "clicks",
        "conversions",
        "attributed_revenue",
        "cpc",
        "cpa",
        "attributed_roas"
      ]
    },
    "gaps": {
      "maxItems": 1000,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 300
      }
    },
    "suggestions": {
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "enum": [
              "supply_revenue",
              "review_comparable_creative_test",
              "complete_coverage"
            ]
          },
          "rule_version": {
            "type": "number",
            "const": 1
          },
          "proposal": {
            "type": "string",
            "maxLength": 600
          },
          "input_refs": {
            "maxItems": 2000,
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "limitations": {
            "type": "string",
            "const": "Observational comparison only; no causal uplift or profitability claim. Human review required."
          }
        },
        "required": [
          "rule_id",
          "rule_version",
          "proposal",
          "input_refs",
          "limitations"
        ]
      }
    },
    "advertising_account_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "contract_version",
    "source_id",
    "source_sha256",
    "identity_verification",
    "currency",
    "timezone",
    "selection",
    "complete",
    "rows",
    "totals",
    "gaps",
    "suggestions",
    "advertising_account_id",
    "next_cursor"
  ]
}

Fehler und sichere Wiederholungen

Prüfe HTTP-Status und Antwortinhalt. Ein 400-Validierungsfehler kann einen ZodError enthalten; Handler-Fehler verwenden die Felder error, message und code. Bewahre request_id oder x-request-id zur Diagnose ohne Zugangsdaten auf. Behebe 401/403-Zugriffsfehler vor einem erneuten Versuch und beachte Retry-After bei 429. Ist ein Schreibvorgang ungewiss oder liefert 5xx, lies zuerst das bestehende Ergebnis. Verwende einen Idempotenzschlüssel nur wieder, wo dies unterstützt wird; Wiederholungen unterscheiden sich je nach Operation und garantieren keine genau einmalige Zustellung.

Anleitung zur Fehlerbehebung

Beispiele

Diese Beispiele nutzen anhand der Schemas geprüfte fiktive Werte. Ersetze IDs durch autorisierte IDs, Medien durch bereite Assets und Daten durch bestätigte Veröffentlichungszeiten. Prüfe Kontoeignung vor Schreibvorgängen. Diese Seite sendet keine API-Anfragen.

Setze SOSOAPI_ACCESS_TOKEN auf deinem Server auf akzeptierte Zugangsdaten dieser Operation und halte es aus Browsercode heraus. Für KI-Agenten nutze sosoapi auth login zur Browseranmeldung und lass die CLI Zugangsdaten erneuern.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "advertising_account_id": "11111111-1111-4111-8111-111111111111",
  "level": "campaign",
  "start_date": "2099-01-15",
  "end_date": "2099-01-15",
  "action_attribution_windows": [
    "1d_click"
  ],
  "action_report_time": "impression",
  "conversion_action_type": "example",
  "revenue_action_type": "example"
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/advertising-api/insights/query" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

JavaScript

// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/advertising-api/insights/query", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "advertising_account_id": "11111111-1111-4111-8111-111111111111",
  "level": "campaign",
  "start_date": "2099-01-15",
  "end_date": "2099-01-15",
  "action_attribution_windows": [
    "1d_click"
  ],
  "action_report_time": "impression",
  "conversion_action_type": "example",
  "revenue_action_type": "example"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /advertising-api/insights/query < request.json

Synthetisches Antwortbeispiel

{
  "contract_version": "ad-performance/v1",
  "source_id": "example",
  "source_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "identity_verification": "customer_supplied",
  "currency": "USD",
  "timezone": "UTC",
  "selection": {
    "provider_api_version": "v26.0",
    "provider_account_id": "12345",
    "currency": "USD",
    "timezone": "UTC",
    "level": "campaign",
    "start_date": "2099-01-15",
    "end_date": "2099-01-15",
    "action_attribution_windows": [
      "1d_click"
    ],
    "action_report_time": "impression",
    "conversion_action_type": "example",
    "revenue_action_type": "example"
  },
  "complete": false,
  "rows": [],
  "totals": {
    "spend": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "clicks": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "conversions": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "attributed_revenue": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "cpc": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "cpa": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    },
    "attributed_roas": {
      "value": null,
      "unit": "currency",
      "availability": "available",
      "reason": null,
      "input_refs": []
    }
  },
  "gaps": [],
  "suggestions": [],
  "advertising_account_id": "11111111-1111-4111-8111-111111111111",
  "next_cursor": null
}

MCP: sosoapi_ads_insights_query