Pull spend from an ad network
pull_network_spendFetch and import creative-level ad spend from Meta, Google, or TikTok connections on demand for immediate or extended reporting windows beyond the automatic 6-hour sync.
Instructions
Fetch and import creative-level spend from a configured Meta, Google or TikTok connection. AttriKit already pulls every enabled connection every 6 hours, covering today and the 3 days before; call this for an immediate pull or a longer window. Report rows are kept only for campaigns whose network id AttriKit knows (create_campaign_link.network_campaign_id); if none match, the call fails and imports nothing. A network reports rows only for ads that have delivered, so the first useful pull is after the ads start spending.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"app_id": "<app_id>",
"network": "<network>",
"covers_from": "<covers_from>",
"covers_to": "<covers_to>"
},
"name": "pull_network_spend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | The AttriKit app id. | |
| network | Yes | ||
| covers_to | Yes | ||
| covers_from | Yes | ||
| connection_id | No | ||
| idempotency_key | No | Stable retry key for this exact mutation. |