העדפות פרטיות

תכונות חיוניות

נדרשות לאבטחה ולפעולות הבסיסיות של האתר.

פעילות תמיד

אבחון Landing והקלטת הפעלות עם הסתרת תוכן

מדידת ביקורים ציבוריים, נטישה ואינטראקציות עם קישורי הרשמה באמצעות מזהה אנונימי ללשונית בלבד, ללא קישור לחשבון. כל הטקסט מוסתר והטפסים חסומים.

ניתוח שימוש אופציונלי

לאפשר ניתוח שימוש באמצעות PostHog? אפשר לשנות את הבחירה בכל עת בתחתית האתר.

לאפשר גם הקלטת הפעלות באתר הציבורי הזה

הקלטת ההפעלות במצב האופציונלי בין אתרים מציגה עמודים ציבוריים ואינטראקציות, תוך הסתרת שדות קלט ותוכן פרטי. הקלטת הפעלות באפליקציה היא בחירה נפרדת.

נדרש ניתוח שימוש אופציונלי; הקלטת הפעלות במצב זה בין אתרים כבויה כברירת מחדל. מצב Landing שלמעלה פועל בנפרד.

ניתוח השימוש בדפדפן אינו מפעיל ניתוח שימוש בחשבון.

החיפוש נטען רק כשמשתמשים בו. עיינו בכל הקטגוריות שלהלן.

פרסום

שאילתת נתוני פרסום

אחזור מוגבל של ביצועי פרסום ממומן ממקור רשמי, עם תאריכים, אזור זמן, מטבע, חלון ייחוס ופעולת המרה מפורשים. מדדים חסרים נשארים חסרים.

POST /advertising-api/insights/query

החוזה נבדק: · sha256:9aedef8d43dd4514

סקירה

אחזור מוגבל של ביצועי פרסום ממומן ממקור רשמי, עם תאריכים, אזור זמן, מטבע, חלון ייחוס ופעולת המרה מפורשים. מדדים חסרים נשארים חסרים.

תגובת HTTP מוצלחת עשויה לציין שבקשה התקבלה, ולא שהושלמה. בעבודת רקע, שמרו את המזהה שהוחזר ובדקו את אותה פעולה עד שתסתיים. פוסט שתוזמן או התקבל נחשב שפורסם רק כשהפלטפורמה מאשרת זאת; חריגה מזמן ההמתנה אצל הלקוח אינה קובעת מה התוצאה.

אימות והרשאות

סוגי אמצעי גישה מתקבלים
user_session, delegated_oauth, personal_access_token
יכולת מואצלת
agent:advertising_read
תפקיד מינימלי בסביבת העבודה
viewer
היקף הגישה
משאבים שהמשתמש הזה מורשה לגשת אליהם
נדרשת הסכמה לכל סביבות העבודה
לא
משנה מצב
לא
מתי הפעולה הושלמה
synchronous_http_response

אסימון יכול להשתמש רק בזכויות שיש לבעליו. כל בקשה בודקת חברות בסביבת העבודה, בעלות על משאבים, סביבות עבודה נבחרות ויכולות שהוענקו. הפרופילים core ו-full משנים אילו כלים מוצגים; הם אינם מעניקים גישה.

שדות הבקשה

שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.

שדות הבקשה
שדה / ענףסוג / חובהאילוצים
$objectחובה באובייקט האב
  • additionalProperties: false
workspace_idstringחובה באובייקט האב
  • 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_idstringחובה באובייקט האב
  • 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)$"
levelstringחובה באובייקט האב
  • enum: ["campaign","adset","ad"]
start_datestringחובה באובייקט האב
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
end_datestringחובה באובייקט האב
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
action_attribution_windowsarrayחובה באובייקט האב
  • minItems: 1
  • maxItems: 1
action_attribution_windows[]stringרשות / פריט
  • enum: ["1d_click","7d_click","1d_view"]
action_report_timestringחובה באובייקט האב
  • enum: ["impression","conversion"]
conversion_action_typestringחובה באובייקט האב
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
revenue_action_typestringחובה באובייקט האב
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
afterstringרשות / פריט
  • maxLength: 2048
limitintegerרשות / פריט
  • minimum: 1
  • maximum: 50
  • default: 25
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
}

תגובה והשלמה

סטטוסי HTTP להצלחה: 200. מתי הפעולה הושלמה: synchronous_http_response.

תגובת HTTP מוצלחת עשויה לציין שבקשה התקבלה, ולא שהושלמה. בעבודת רקע, שמרו את המזהה שהוחזר ובדקו את אותה פעולה עד שתסתיים. פוסט שתוזמן או התקבל נחשב שפורסם רק כשהפלטפורמה מאשרת זאת; חריגה מזמן ההמתנה אצל הלקוח אינה קובעת מה התוצאה.

שדה חובה נדרש בתוך אובייקט האב והענף הנבחר שלו. צאצא נדרש אינו הופך אב אופציונלי לנדרש. הכללים ושמות השדות שלהלן מועתקים מהחוזה.

תגובה והשלמה
שדה / ענףסוג / חובהאילוצים
$objectחובה באובייקט האב—
contract_versionstringחובה באובייקט האב
  • const: "ad-performance/v1"
source_idstringחובה באובייקט האב
  • maxLength: 100
source_sha256stringחובה באובייקט האב
  • pattern: "^[a-f0-9]{64}$"
identity_verificationstringחובה באובייקט האב
  • enum: ["customer_supplied","accepted_provider_grant"]
currencystringחובה באובייקט האב
  • pattern: "^[A-Z]{3}$"
timezonestringחובה באובייקט האב
  • maxLength: 100
selectionobjectחובה באובייקט האב—
selection.provider_api_versionstringחובה באובייקט האב
  • const: "v26.0"
selection.provider_account_idstringחובה באובייקט האב
  • pattern: "^[1-9]\\d{1,24}$"
selection.currencystringחובה באובייקט האב
  • pattern: "^[A-Z]{3}$"
selection.timezonestringחובה באובייקט האב
  • maxLength: 100
selection.levelstringחובה באובייקט האב
  • enum: ["campaign","adset","ad"]
selection.start_datestringחובה באובייקט האב
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.end_datestringחובה באובייקט האב
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
selection.action_attribution_windowsarrayחובה באובייקט האב
  • minItems: 1
  • maxItems: 1
selection.action_attribution_windows[]stringרשות / פריט
  • enum: ["1d_click","7d_click","1d_view"]
selection.action_report_timestringחובה באובייקט האב
  • enum: ["impression","conversion"]
selection.conversion_action_typestringחובה באובייקט האב
  • maxLength: 100
selection.revenue_action_typestringחובה באובייקט האב
  • maxLength: 100
completebooleanחובה באובייקט האב—
rowsarrayחובה באובייקט האב
  • maxItems: 500
rows[]objectרשות / פריט—
rows[].row_idstringחובה באובייקט האב
  • maxLength: 100
rows[].metricsobjectחובה באובייקט האב—
rows[].metrics.spendobjectחובה באובייקט האב—
rows[].metrics.spend.valuestring | nullחובה באובייקט האב—
rows[].metrics.spend.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.spend.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.spend.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.spend.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.spend.reasonstring | nullחובה באובייקט האב—
rows[].metrics.spend.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.spend.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.spend.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.spend.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.clicksobjectחובה באובייקט האב—
rows[].metrics.clicks.valuestring | nullחובה באובייקט האב—
rows[].metrics.clicks.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.clicks.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.clicks.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.clicks.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.clicks.reasonstring | nullחובה באובייקט האב—
rows[].metrics.clicks.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.clicks.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.clicks.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.clicks.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.conversionsobjectחובה באובייקט האב—
rows[].metrics.conversions.valuestring | nullחובה באובייקט האב—
rows[].metrics.conversions.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.conversions.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.conversions.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.conversions.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.conversions.reasonstring | nullחובה באובייקט האב—
rows[].metrics.conversions.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.conversions.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.conversions.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.conversions.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.attributed_revenueobjectחובה באובייקט האב—
rows[].metrics.attributed_revenue.valuestring | nullחובה באובייקט האב—
rows[].metrics.attributed_revenue.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_revenue.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.attributed_revenue.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_revenue.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_revenue.reasonstring | nullחובה באובייקט האב—
rows[].metrics.attributed_revenue.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.attributed_revenue.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.attributed_revenue.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.attributed_revenue.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.cpcobjectחובה באובייקט האב—
rows[].metrics.cpc.valuestring | nullחובה באובייקט האב—
rows[].metrics.cpc.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpc.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.cpc.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpc.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpc.reasonstring | nullחובה באובייקט האב—
rows[].metrics.cpc.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.cpc.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.cpc.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.cpc.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.cpaobjectחובה באובייקט האב—
rows[].metrics.cpa.valuestring | nullחובה באובייקט האב—
rows[].metrics.cpa.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.cpa.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.cpa.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.cpa.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.cpa.reasonstring | nullחובה באובייקט האב—
rows[].metrics.cpa.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.cpa.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.cpa.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.cpa.input_refs[]stringרשות / פריט
  • maxLength: 300
rows[].metrics.attributed_roasobjectחובה באובייקט האב—
rows[].metrics.attributed_roas.valuestring | nullחובה באובייקט האב—
rows[].metrics.attributed_roas.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
rows[].metrics.attributed_roas.valueanyOf 2nullחובה באובייקט האב—
rows[].metrics.attributed_roas.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
rows[].metrics.attributed_roas.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
rows[].metrics.attributed_roas.reasonstring | nullחובה באובייקט האב—
rows[].metrics.attributed_roas.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
rows[].metrics.attributed_roas.reasonanyOf 2nullחובה באובייקט האב—
rows[].metrics.attributed_roas.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
rows[].metrics.attributed_roas.input_refs[]stringרשות / פריט
  • maxLength: 300
totalsobjectחובה באובייקט האב—
totals.spendobjectחובה באובייקט האב—
totals.spend.valuestring | nullחובה באובייקט האב—
totals.spend.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.spend.valueanyOf 2nullחובה באובייקט האב—
totals.spend.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.spend.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.spend.reasonstring | nullחובה באובייקט האב—
totals.spend.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.spend.reasonanyOf 2nullחובה באובייקט האב—
totals.spend.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.spend.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.clicksobjectחובה באובייקט האב—
totals.clicks.valuestring | nullחובה באובייקט האב—
totals.clicks.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.clicks.valueanyOf 2nullחובה באובייקט האב—
totals.clicks.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.clicks.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.clicks.reasonstring | nullחובה באובייקט האב—
totals.clicks.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.clicks.reasonanyOf 2nullחובה באובייקט האב—
totals.clicks.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.clicks.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.conversionsobjectחובה באובייקט האב—
totals.conversions.valuestring | nullחובה באובייקט האב—
totals.conversions.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.conversions.valueanyOf 2nullחובה באובייקט האב—
totals.conversions.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.conversions.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.conversions.reasonstring | nullחובה באובייקט האב—
totals.conversions.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.conversions.reasonanyOf 2nullחובה באובייקט האב—
totals.conversions.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.conversions.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.attributed_revenueobjectחובה באובייקט האב—
totals.attributed_revenue.valuestring | nullחובה באובייקט האב—
totals.attributed_revenue.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_revenue.valueanyOf 2nullחובה באובייקט האב—
totals.attributed_revenue.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_revenue.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_revenue.reasonstring | nullחובה באובייקט האב—
totals.attributed_revenue.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.attributed_revenue.reasonanyOf 2nullחובה באובייקט האב—
totals.attributed_revenue.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.attributed_revenue.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.cpcobjectחובה באובייקט האב—
totals.cpc.valuestring | nullחובה באובייקט האב—
totals.cpc.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpc.valueanyOf 2nullחובה באובייקט האב—
totals.cpc.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpc.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpc.reasonstring | nullחובה באובייקט האב—
totals.cpc.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.cpc.reasonanyOf 2nullחובה באובייקט האב—
totals.cpc.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.cpc.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.cpaobjectחובה באובייקט האב—
totals.cpa.valuestring | nullחובה באובייקט האב—
totals.cpa.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.cpa.valueanyOf 2nullחובה באובייקט האב—
totals.cpa.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.cpa.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.cpa.reasonstring | nullחובה באובייקט האב—
totals.cpa.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.cpa.reasonanyOf 2nullחובה באובייקט האב—
totals.cpa.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.cpa.input_refs[]stringרשות / פריט
  • maxLength: 300
totals.attributed_roasobjectחובה באובייקט האב—
totals.attributed_roas.valuestring | nullחובה באובייקט האב—
totals.attributed_roas.valueanyOf 1stringחובה באובייקט האב
  • pattern: "^\\d{1,24}(?:\\.\\d{1,6})?$"
totals.attributed_roas.valueanyOf 2nullחובה באובייקט האב—
totals.attributed_roas.unitstringחובה באובייקט האב
  • enum: ["currency","count","currency_per_click","currency_per_conversion","ratio"]
totals.attributed_roas.availabilitystringחובה באובייקט האב
  • enum: ["available","missing_input","zero_denominator","incompatible","partial"]
totals.attributed_roas.reasonstring | nullחובה באובייקט האב—
totals.attributed_roas.reasonanyOf 1stringחובה באובייקט האב
  • maxLength: 300
totals.attributed_roas.reasonanyOf 2nullחובה באובייקט האב—
totals.attributed_roas.input_refsarrayחובה באובייקט האב
  • maxItems: 2000
totals.attributed_roas.input_refs[]stringרשות / פריט
  • maxLength: 300
gapsarrayחובה באובייקט האב
  • maxItems: 1000
gaps[]stringרשות / פריט
  • maxLength: 300
suggestionsarrayחובה באובייקט האב
  • maxItems: 3
suggestions[]objectרשות / פריט—
suggestions[].rule_idstringחובה באובייקט האב
  • enum: ["supply_revenue","review_comparable_creative_test","complete_coverage"]
suggestions[].rule_versionnumberחובה באובייקט האב
  • const: 1
suggestions[].proposalstringחובה באובייקט האב
  • maxLength: 600
suggestions[].input_refsarrayחובה באובייקט האב
  • maxItems: 2000
suggestions[].input_refs[]stringרשות / פריט
  • maxLength: 300
suggestions[].limitationsstringחובה באובייקט האב
  • const: "Observational comparison only; no causal uplift or profitability claim. Human review required."
advertising_account_idstringחובה באובייקט האב
  • 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 | nullחובה באובייקט האב—
next_cursoranyOf 1stringחובה באובייקט האב
  • maxLength: 2048
next_cursoranyOf 2nullחובה באובייקט האב—
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"
  ]
}

שגיאות וניסיונות חוזרים בטוחים

בדקו את סטטוס ה-HTTP ואת גוף התגובה. שגיאת אימות 400 עשויה להכיל ZodError; שגיאות מטפל משתמשות בשדות error, ‏message ו-code. שמרו request_id או x-request-id לאבחון, ללא אמצעי גישה. תקנו שגיאות גישה 401/403 לפני ניסיון חוזר, ופעלו לפי Retry-After עבור 429. אם תוצאת כתיבה אינה ודאית או שמוחזר 5xx, קראו תחילה את התוצאה הקיימת. השתמשו שוב במפתח אידמפוטנטיות רק במקומות הנתמכים; התנהגות הניסיון החוזר משתנה בין פעולות ואינה מבטיחה מסירה בדיוק פעם אחת.

מדריך לפתרון בעיות

דוגמאות

הדוגמאות משתמשות בערכים בדויים שנבדקו מול הסכמות. החליפו את המזהים בכאלה שאתם מורשים להשתמש בהם, את המדיה בנכסים מוכנים ואת התאריכים במועד הפרסום שאישרתם. בדקו את התאמת החשבון לפני שליחת כתיבה. העמוד הזה אינו שולח בקשות API.

הגדירו בשרת שלכם SOSOAPI_ACCESS_TOKEN לאמצעי גישה שהפעולה הזו מקבלת, והשאירו אותו מחוץ לקוד הדפדפן. עבור סוכן AI, השתמשו ב-sosoapi auth login כדי להיכנס דרך הדפדפן ולאפשר ל-CLI לרענן את אמצעי הגישה שלו.

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

דוגמת תגובה סינתטית

{
  "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