Personvernvalg

Nødvendige funksjoner

Kreves for sikkerhet og grunnleggende nettstedsfunksjoner.

Alltid på

Landing-diagnostikk og maskerte opptak

Måler offentlige besøk, frafall og interaksjoner med registreringslenker med en anonym ID bare for denne fanen, uten kontokobling. All tekst maskeres, og skjemaer blokkeres.

Valgfri bruksanalyse

Tillate bruksanalyse med PostHog? Du kan endre valget når som helst i bunnteksten.

Tillat også øktopptak på dette offentlige nettstedet

Øktopptak i valgfri modus på tvers av nettsteder viser offentlige sider og interaksjoner, mens inndata og privat innhold skjules. Øktopptak i appen er et separat valg.

Krever valgfri analyse; opptak i denne modusen på tvers av nettsteder er avslått som standard. Landing-modusen ovenfor kjører separat.

Nettleseranalyse aktiverer ikke kontoanalyse.

Søk lastes bare når du bruker det. Bla gjennom alle kategoriene nedenfor.

Annonsering

Analyser annonseresultater

Analyser en avgrenset betalt annonserapport levert av kunden, med eksplisitt attribusjon og nøyaktig kildehash. Gir ingen leverandørtilgang eller påstand om årsaksbestemt lønnsomhet.

POST /advertising-api/performance/analyze

Kontrakt gjennomgått: · sha256:9aedef8d43dd4514

Oversikt

Analyser en avgrenset betalt annonserapport levert av kunden, med eksplisitt attribusjon og nøyaktig kildehash. Gir ingen leverandørtilgang eller påstand om årsaksbestemt lønnsomhet.

Et vellykket HTTP-svar kan bety at en forespørsel er akseptert fremfor fullført. For bakgrunnsarbeid, lagre returnert ID og kontroller samme operasjon til den er ferdig. Et planlagt eller akseptert innlegg er først publisert når plattformen bekrefter det; et klienttidsavbrudd fastslår ikke resultatet.

Autentisering og tillatelser

Godtatte legitimasjonsklasser
user_session, delegated_oauth, personal_access_token
Delegert funksjon
agent:advertising_read
Minste arbeidsområderolle
viewer
Tilgangsomfang
Ressurser denne brukeren er autorisert til å bruke
Samtykke for alle arbeidsområder kreves
Nei
Endrer tilstand
Nei
Når operasjonen er fullført
synchronous_http_response

Et token kan bare bruke rettighetene eieren har. Hver forespørsel kontrollerer arbeidsområdemedlemskap, ressurseierskap, valgte arbeidsområder og gitte funksjoner. Profilene core og full endrer hvilke verktøy som vises; de gir ikke tilgang.

Forespørselsfelter

Påkrevd betyr påkrevd i foreldreobjektet og valgt gren. Et påkrevd underfelt gjør ikke en valgfri forelder påkrevd. Reglene og feltnavnene nedenfor er kopiert fra kontrakten.

Forespørselsfelter
Felt / grenType / påkrevdBegrensninger
$objectPåkrevd i forelder
  • additionalProperties: false
workspace_idstringPåkrevd i forelder
  • 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)$"
source_kindstringPåkrevd i forelder
  • enum: ["customer_import","official_meta_api"]
source_idstringPåkrevd i forelder
  • minLength: 1
  • maxLength: 100
provider_api_versionstringPåkrevd i forelder
  • const: "v26.0"
provider_account_idstringPåkrevd i forelder
  • pattern: "^[1-9]\\d{1,24}$"
currencystringPåkrevd i forelder
  • pattern: "^[A-Z]{3}$"
timezonestringPåkrevd i forelder
  • minLength: 1
  • maxLength: 100
levelstringPåkrevd i forelder
  • enum: ["campaign","adset","ad"]
start_datestringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
end_datestringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
action_attribution_windowsarrayPåkrevd i forelder
  • minItems: 1
  • maxItems: 1
action_attribution_windows[]stringValgfritt / element
  • enum: ["1d_click","7d_click","1d_view"]
action_report_timestringPåkrevd i forelder
  • enum: ["impression","conversion"]
conversion_action_typestringPåkrevd i forelder
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
revenue_action_typestringPåkrevd i forelder
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
completebooleanPåkrevd i forelder—
rowsarrayPåkrevd i forelder
  • maxItems: 500
rows[]objectValgfritt / element
  • additionalProperties: false
rows[].account_idstringPåkrevd i forelder
  • pattern: "^[1-9]\\d{1,24}$"
rows[].account_currencystringPåkrevd i forelder
  • pattern: "^[A-Z]{3}$"
rows[].campaign_idstringPåkrevd i forelder
  • pattern: "^[1-9]\\d{1,24}$"
rows[].campaign_namestringValgfritt / element
  • maxLength: 200
rows[].adset_idstringValgfritt / element
  • pattern: "^[1-9]\\d{1,24}$"
rows[].ad_idstringValgfritt / element
  • pattern: "^[1-9]\\d{1,24}$"
rows[].date_startstringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
rows[].date_stopstringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
rows[].spendstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].clicksstringValgfritt / element
  • pattern: "^\\d{1,15}$"
rows[].actionsarrayValgfritt / element
  • maxItems: 100
rows[].actions[]objectValgfritt / element
  • additionalProperties: false
rows[].actions[].action_typestringPåkrevd i forelder
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
rows[].actions[].valuestringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].1d_clickstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].7d_clickstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].1d_viewstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_valuesarrayValgfritt / element
  • maxItems: 100
rows[].action_values[]objectValgfritt / element
  • additionalProperties: false
rows[].action_values[].action_typestringPåkrevd i forelder
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
rows[].action_values[].valuestringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].1d_clickstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].7d_clickstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].1d_viewstringValgfritt / element
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
Fullstendig 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)$"
    },
    "source_kind": {
      "type": "string",
      "enum": [
        "customer_import",
        "official_meta_api"
      ]
    },
    "source_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "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",
      "minLength": 1,
      "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",
      "pattern": "^[a-z][a-z0-9_.]{0,99}$"
    },
    "revenue_action_type": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_.]{0,99}$"
    },
    "complete": {
      "type": "boolean"
    },
    "rows": {
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "pattern": "^[1-9]\\d{1,24}$"
          },
          "account_currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          },
          "campaign_id": {
            "type": "string",
            "pattern": "^[1-9]\\d{1,24}$"
          },
          "campaign_name": {
            "type": "string",
            "maxLength": 200
          },
          "adset_id": {
            "type": "string",
            "pattern": "^[1-9]\\d{1,24}$"
          },
          "ad_id": {
            "type": "string",
            "pattern": "^[1-9]\\d{1,24}$"
          },
          "date_start": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "date_stop": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "spend": {
            "type": "string",
            "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
          },
          "clicks": {
            "type": "string",
            "pattern": "^\\d{1,15}$"
          },
          "actions": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "action_type": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.]{0,99}$"
                },
                "value": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "1d_click": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "7d_click": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "1d_view": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                }
              },
              "required": [
                "action_type"
              ],
              "additionalProperties": false
            }
          },
          "action_values": {
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "action_type": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_.]{0,99}$"
                },
                "value": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "1d_click": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "7d_click": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                },
                "1d_view": {
                  "type": "string",
                  "pattern": "^\\d{1,12}(?:\\.\\d{1,6})?$"
                }
              },
              "required": [
                "action_type"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "account_id",
          "account_currency",
          "campaign_id",
          "date_start",
          "date_stop"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "workspace_id",
    "source_kind",
    "source_id",
    "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",
    "rows"
  ],
  "additionalProperties": false
}

Svar og fullføring

HTTP-statuser ved suksess: 200. Når operasjonen er fullført: synchronous_http_response.

Et vellykket HTTP-svar kan bety at en forespørsel er akseptert fremfor fullført. For bakgrunnsarbeid, lagre returnert ID og kontroller samme operasjon til den er ferdig. Et planlagt eller akseptert innlegg er først publisert når plattformen bekrefter det; et klienttidsavbrudd fastslår ikke resultatet.

Påkrevd betyr påkrevd i foreldreobjektet og valgt gren. Et påkrevd underfelt gjør ikke en valgfri forelder påkrevd. Reglene og feltnavnene nedenfor er kopiert fra kontrakten.

Svar og fullføring
Felt / grenType / påkrevdBegrensninger
$objectPåkrevd i forelder—
contract_versionstringPåkrevd i forelder
  • const: "ad-performance/v1"
source_idstringPåkrevd i forelder
  • maxLength: 100
source_sha256stringPåkrevd i forelder
  • pattern: "^[a-f0-9]{64}$"
identity_verificationstringPåkrevd i forelder
  • enum: ["customer_supplied","accepted_provider_grant"]
currencystringPåkrevd i forelder
  • pattern: "^[A-Z]{3}$"
timezonestringPåkrevd i forelder
  • maxLength: 100
selectionobjectPåkrevd i forelder—
selection.provider_api_versionstringPåkrevd i forelder
  • const: "v26.0"
selection.provider_account_idstringPåkrevd i forelder
  • pattern: "^[1-9]\\d{1,24}$"
selection.currencystringPåkrevd i forelder
  • pattern: "^[A-Z]{3}$"
selection.timezonestringPåkrevd i forelder
  • maxLength: 100
selection.levelstringPåkrevd i forelder
  • enum: ["campaign","adset","ad"]
selection.start_datestringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.end_datestringPåkrevd i forelder
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.action_attribution_windowsarrayPåkrevd i forelder
  • minItems: 1
  • maxItems: 1
selection.action_attribution_windows[]stringValgfritt / element
  • enum: ["1d_click","7d_click","1d_view"]
selection.action_report_timestringPåkrevd i forelder
  • enum: ["impression","conversion"]
selection.conversion_action_typestringPåkrevd i forelder
  • maxLength: 100
selection.revenue_action_typestringPåkrevd i forelder
  • maxLength: 100
completebooleanPåkrevd i forelder—
rowsarrayPåkrevd i forelder
  • maxItems: 500
rows[]objectValgfritt / element—
rows[].row_idstringPåkrevd i forelder
  • maxLength: 100
rows[].metricsobjectPåkrevd i forelder—
rows[].metrics.spendobjectPåkrevd i forelder—
rows[].metrics.spend.valuestring | nullPåkrevd i forelder—
rows[].metrics.spend.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.spend.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.spend.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.spend.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.spend.reasonstring | nullPåkrevd i forelder—
rows[].metrics.spend.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.spend.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.spend.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.spend.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.clicksobjectPåkrevd i forelder—
rows[].metrics.clicks.valuestring | nullPåkrevd i forelder—
rows[].metrics.clicks.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.clicks.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.clicks.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.clicks.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.clicks.reasonstring | nullPåkrevd i forelder—
rows[].metrics.clicks.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.clicks.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.clicks.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.clicks.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.conversionsobjectPåkrevd i forelder—
rows[].metrics.conversions.valuestring | nullPåkrevd i forelder—
rows[].metrics.conversions.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.conversions.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.conversions.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.conversions.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.conversions.reasonstring | nullPåkrevd i forelder—
rows[].metrics.conversions.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.conversions.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.conversions.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.conversions.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.attributed_revenueobjectPåkrevd i forelder—
rows[].metrics.attributed_revenue.valuestring | nullPåkrevd i forelder—
rows[].metrics.attributed_revenue.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_revenue.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.attributed_revenue.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_revenue.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_revenue.reasonstring | nullPåkrevd i forelder—
rows[].metrics.attributed_revenue.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.attributed_revenue.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.attributed_revenue.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.attributed_revenue.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.cpcobjectPåkrevd i forelder—
rows[].metrics.cpc.valuestring | nullPåkrevd i forelder—
rows[].metrics.cpc.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpc.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.cpc.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpc.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpc.reasonstring | nullPåkrevd i forelder—
rows[].metrics.cpc.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.cpc.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.cpc.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.cpc.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.cpaobjectPåkrevd i forelder—
rows[].metrics.cpa.valuestring | nullPåkrevd i forelder—
rows[].metrics.cpa.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpa.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.cpa.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpa.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpa.reasonstring | nullPåkrevd i forelder—
rows[].metrics.cpa.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.cpa.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.cpa.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.cpa.input_refs[]stringValgfritt / element
  • maxLength: 300
rows[].metrics.attributed_roasobjectPåkrevd i forelder—
rows[].metrics.attributed_roas.valuestring | nullPåkrevd i forelder—
rows[].metrics.attributed_roas.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_roas.valueanyOf 2nullPåkrevd i forelder—
rows[].metrics.attributed_roas.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_roas.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_roas.reasonstring | nullPåkrevd i forelder—
rows[].metrics.attributed_roas.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
rows[].metrics.attributed_roas.reasonanyOf 2nullPåkrevd i forelder—
rows[].metrics.attributed_roas.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
rows[].metrics.attributed_roas.input_refs[]stringValgfritt / element
  • maxLength: 300
totalsobjectPåkrevd i forelder—
totals.spendobjectPåkrevd i forelder—
totals.spend.valuestring | nullPåkrevd i forelder—
totals.spend.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.spend.valueanyOf 2nullPåkrevd i forelder—
totals.spend.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.spend.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.spend.reasonstring | nullPåkrevd i forelder—
totals.spend.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.spend.reasonanyOf 2nullPåkrevd i forelder—
totals.spend.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.spend.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.clicksobjectPåkrevd i forelder—
totals.clicks.valuestring | nullPåkrevd i forelder—
totals.clicks.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.clicks.valueanyOf 2nullPåkrevd i forelder—
totals.clicks.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.clicks.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.clicks.reasonstring | nullPåkrevd i forelder—
totals.clicks.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.clicks.reasonanyOf 2nullPåkrevd i forelder—
totals.clicks.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.clicks.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.conversionsobjectPåkrevd i forelder—
totals.conversions.valuestring | nullPåkrevd i forelder—
totals.conversions.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.conversions.valueanyOf 2nullPåkrevd i forelder—
totals.conversions.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.conversions.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.conversions.reasonstring | nullPåkrevd i forelder—
totals.conversions.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.conversions.reasonanyOf 2nullPåkrevd i forelder—
totals.conversions.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.conversions.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.attributed_revenueobjectPåkrevd i forelder—
totals.attributed_revenue.valuestring | nullPåkrevd i forelder—
totals.attributed_revenue.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_revenue.valueanyOf 2nullPåkrevd i forelder—
totals.attributed_revenue.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_revenue.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_revenue.reasonstring | nullPåkrevd i forelder—
totals.attributed_revenue.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.attributed_revenue.reasonanyOf 2nullPåkrevd i forelder—
totals.attributed_revenue.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.attributed_revenue.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.cpcobjectPåkrevd i forelder—
totals.cpc.valuestring | nullPåkrevd i forelder—
totals.cpc.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpc.valueanyOf 2nullPåkrevd i forelder—
totals.cpc.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpc.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpc.reasonstring | nullPåkrevd i forelder—
totals.cpc.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.cpc.reasonanyOf 2nullPåkrevd i forelder—
totals.cpc.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.cpc.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.cpaobjectPåkrevd i forelder—
totals.cpa.valuestring | nullPåkrevd i forelder—
totals.cpa.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpa.valueanyOf 2nullPåkrevd i forelder—
totals.cpa.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpa.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpa.reasonstring | nullPåkrevd i forelder—
totals.cpa.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.cpa.reasonanyOf 2nullPåkrevd i forelder—
totals.cpa.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.cpa.input_refs[]stringValgfritt / element
  • maxLength: 300
totals.attributed_roasobjectPåkrevd i forelder—
totals.attributed_roas.valuestring | nullPåkrevd i forelder—
totals.attributed_roas.valueanyOf 1stringPåkrevd i forelder
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_roas.valueanyOf 2nullPåkrevd i forelder—
totals.attributed_roas.unitstringPåkrevd i forelder
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_roas.availabilitystringPåkrevd i forelder
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_roas.reasonstring | nullPåkrevd i forelder—
totals.attributed_roas.reasonanyOf 1stringPåkrevd i forelder
  • maxLength: 300
totals.attributed_roas.reasonanyOf 2nullPåkrevd i forelder—
totals.attributed_roas.input_refsarrayPåkrevd i forelder
  • maxItems: 2000
totals.attributed_roas.input_refs[]stringValgfritt / element
  • maxLength: 300
gapsarrayPåkrevd i forelder
  • maxItems: 1000
gaps[]stringValgfritt / element
  • maxLength: 300
suggestionsarrayPåkrevd i forelder
  • maxItems: 3
suggestions[]objectValgfritt / element—
suggestions[].rule_idstringPåkrevd i forelder
  • enum: ["supply_revenue","review_comparable_creative_test","complete_coverage"]
suggestions[].rule_versionnumberPåkrevd i forelder
  • const: 1
suggestions[].proposalstringPåkrevd i forelder
  • maxLength: 600
suggestions[].input_refsarrayPåkrevd i forelder
  • maxItems: 2000
suggestions[].input_refs[]stringValgfritt / element
  • maxLength: 300
suggestions[].limitationsstringPåkrevd i forelder
  • const: "Observational comparison only; no causal uplift or profitability claim. Human review required."
Fullstendig 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"
        ]
      }
    }
  },
  "required": [
    "contract_version",
    "source_id",
    "source_sha256",
    "identity_verification",
    "currency",
    "timezone",
    "selection",
    "complete",
    "rows",
    "totals",
    "gaps",
    "suggestions"
  ]
}

Feil og trygge nye forsøk

Kontroller HTTP-status og svarinnhold. En 400-valideringsfeil kan inneholde en ZodError; håndteringsfeil bruker feltene error, message og code. Behold request_id eller x-request-id for feilsøking, uten påloggingsopplysninger. Rett 401/403-tilgangsfeil før nye forsøk, og følg Retry-After ved 429. Hvis en skriveoperasjon er usikker eller returnerer 5xx, les det eksisterende resultatet først. Gjenbruk bare en idempotensnøkkel der det støttes; virkemåten ved nye forsøk varierer mellom operasjoner og garanterer ikke levering nøyaktig én gang.

Feilsøkingsveiledning

Eksempler

Disse eksemplene bruker fiktive verdier kontrollert mot skjemaene. Erstatt ID-ene med noen du har lov til å bruke, mediene med klare ressurser og datoene med bekreftet publiseringstidspunkt. Kontroller kontoens kvalifikasjon før en skriveoperasjon sendes inn. Siden sender ingen API-forespørsler.

Angi SOSOAPI_ACCESS_TOKEN på serveren din til legitimasjon som operasjonen godtar, og hold den unna nettleserkode. For en KI-agent, bruk sosoapi auth login for innlogging gjennom nettleseren, og la CLI-et fornye legitimasjonen.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "source_kind": "customer_import",
  "source_id": "example",
  "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": []
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/advertising-api/performance/analyze" \
  -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/performance/analyze", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "source_kind": "customer_import",
  "source_id": "example",
  "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": []
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /advertising-api/performance/analyze < request.json

Syntetisk svareksempel

{
  "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": []
}

MCP: sosoapi_ads_performance_analyze