プライバシー設定

必須機能

セキュリティとサイトの基本機能に必要です。

常に有効

Landing 診断とマスクされたリプレイ

このタブ専用の匿名 ID を使用し、アカウントと関連付けずに、公開サイトへの訪問、離脱、登録リンクの操作を測定します。すべてのテキストをマスクし、フォームは記録対象から除外します。

任意の利用状況解析

PostHogの利用状況解析を許可しますか?フッターでいつでも変更できます。

この公開サイトでのセッションリプレイも許可する

任意のサイト横断モードのリプレイには公開ページと操作が表示され、入力内容や非公開コンテンツはマスクされます。Appのリプレイは別途選択します。

任意の利用状況解析の許可が必要です。このサイト横断モードのリプレイは初期設定では無効です。上の Landing モードは別途動作します。

ブラウザーの分析設定でアカウントの分析が有効になることはありません。

検索は使用時のみ読み込みます。以下ですべてのカテゴリを閲覧できます。

広告

広告実績を分析

明示的なアトリビューションと正確なソースハッシュに基づき、顧客が提供した有料広告レポートを範囲制限付きで分析します。プラットフォームへのアクセスや、利益に関する因果関係の主張は行いません。

POST /advertising-api/performance/analyze

契約確認日: · sha256:9aedef8d43dd4514

概要

明示的なアトリビューションと正確なソースハッシュに基づき、顧客が提供した有料広告レポートを範囲制限付きで分析します。プラットフォームへのアクセスや、利益に関する因果関係の主張は行いません。

HTTP成功は完了ではなく受理の場合があります。バックグラウンド処理はIDを保存し、同じ処理を完了まで確認します。予約・受理された投稿はプラットフォーム確認後のみ公開済みです。タイムアウトだけでは結果を判断できません。

認証と権限

受け付ける認証情報の種類
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)$"
source_kindstring親要素内で必須
  • enum: ["customer_import","official_meta_api"]
source_idstring親要素内で必須
  • minLength: 1
  • maxLength: 100
provider_api_versionstring親要素内で必須
  • const: "v26.0"
provider_account_idstring親要素内で必須
  • pattern: "^[1-9]\\d{1,24}$"
currencystring親要素内で必須
  • pattern: "^[A-Z]{3}$"
timezonestring親要素内で必須
  • minLength: 1
  • maxLength: 100
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}$"
completeboolean親要素内で必須—
rowsarray親要素内で必須
  • maxItems: 500
rows[]object任意/項目
  • additionalProperties: false
rows[].account_idstring親要素内で必須
  • pattern: "^[1-9]\\d{1,24}$"
rows[].account_currencystring親要素内で必須
  • pattern: "^[A-Z]{3}$"
rows[].campaign_idstring親要素内で必須
  • pattern: "^[1-9]\\d{1,24}$"
rows[].campaign_namestring任意/項目
  • maxLength: 200
rows[].adset_idstring任意/項目
  • pattern: "^[1-9]\\d{1,24}$"
rows[].ad_idstring任意/項目
  • pattern: "^[1-9]\\d{1,24}$"
rows[].date_startstring親要素内で必須
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
rows[].date_stopstring親要素内で必須
  • pattern: "^\\d{4}-\\d{2}-\\d{2}$"
rows[].spendstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].clicksstring任意/項目
  • pattern: "^\\d{1,15}$"
rows[].actionsarray任意/項目
  • maxItems: 100
rows[].actions[]object任意/項目
  • additionalProperties: false
rows[].actions[].action_typestring親要素内で必須
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
rows[].actions[].valuestring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].1d_clickstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].7d_clickstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].actions[].1d_viewstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_valuesarray任意/項目
  • maxItems: 100
rows[].action_values[]object任意/項目
  • additionalProperties: false
rows[].action_values[].action_typestring親要素内で必須
  • pattern: "^[a-z][a-z0-9_.]{0,99}$"
rows[].action_values[].valuestring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].1d_clickstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].7d_clickstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
rows[].action_values[].1d_viewstring任意/項目
  • pattern: "^\\d{1,12}(?:\\.\\d{1,6})?$"
完全な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
}

レスポンスと完了条件

成功時のHTTPステータス: 200. 操作完了時: synchronous_http_response.

HTTP成功は完了ではなく受理の場合があります。バックグラウンド処理はIDを保存し、同じ処理を完了まで確認します。予約・受理された投稿はプラットフォーム確認後のみ公開済みです。タイムアウトだけでは結果を判断できません。

必須とは、親オブジェクトと選択分岐内で必須という意味です。必須の子があっても任意の親は必須になりません。以下のルールとフィールド名は契約から転記しています。

レスポンスと完了条件
フィールド/分岐型/必須制約
$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."
完全な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"
  ]
}

エラーと安全な再試行

HTTPステータスとレスポンス本文を確認します。400の検証エラーにはZodErrorが含まれる場合があります。ハンドラーエラーはerror、message、codeを使用します。診断用にrequest_idまたはx-request-idを保持し、認証情報は含めないでください。401/403はアクセス問題を解消してから再試行し、429はRetry-Afterに従います。書き込み結果が不確か、または5xxの場合は、まず既存の結果を取得してください。冪等性キーは対応する操作でのみ再利用します。再試行の挙動は操作ごとに異なり、厳密に一回の配信は保証しません。

トラブルシューティングガイド

例

スキーマ確認済みの架空値の例です。認可されたID、準備済みメディア、確認済みの公開日時に置き換え、書き込み前に適格性を確認してください。このページはAPIを呼びません。

サーバーのSOSOAPI_ACCESS_TOKENに操作が受け付ける認証情報を設定し、ブラウザーコードに含めないでください。AIエージェントはsosoapi auth loginでブラウザーログインし、CLIに更新を任せます。

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

合成レスポンス例

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