> For the complete documentation index, see [llms.txt](https://thecontentforge.gitbook.io/thecontentforge-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/resorts/resort-reporting-api.md). Agents can also search and read this documentation through its [MCP server](https://thecontentforge.gitbook.io/thecontentforge-docs/~gitbook/mcp).

# Resort reporting API

Create a connection in **Resort Performance** after selecting its campaign, optional ad, source, currency, conversion definition and attribution rule/time zone. Copy its credential once. Configure it in a trusted reporting service, never a public web page or tracking pixel.

Send an HTTPS POST to the project's `/functions/v1/resort-performance-ingest` endpoint:

```http
Authorization: Bearer <connection-id>.<secret>
Content-Type: application/json
```

```json
{
  "rows": [
    {
      "date": "2026-11-03",
      "external_id": "stable-provider-ad-or-booking-series-id",
      "impressions": 300,
      "clicks": 12,
      "spend": 15,
      "conversions": 1,
      "revenue": 60,
      "evidence": "Provider daily export reference and extraction time"
    }
  ]
}
```

These numbers are examples. Use one aggregate daily row per external identity. Do not mix campaign totals and ad totals in a series. Omit unavailable metrics or use null. Impressions/clicks are nonnegative integers; spend/conversions/revenue are nonnegative finite numbers. Fractional platform attribution is supported. Use net corrected daily values for refunds, retaining the identity. Dates use the reporting time zone chosen at connection creation.

The credential fixes organization, campaign/ad, source/type, currency, conversion definition and attribution. Request fields cannot override that scope. Exclude guest names, contact details, payment information and raw booking payloads.

Success returns `accepted` and snapshot semantics. Repeat the same series, identity and date to correct or retry safely. The series includes the ad (or campaign-level scope), source, report type, currency, outcome and attribution. Changed snapshots retain a revision. Exact replays leave the existing observation intact. Duplicate identities in one payload are rejected atomically. Limit: 1–1,000 rows and 1 MB per request; 60 requests/minute per credential. Honor `retry_after` on HTTP 429. HTTP 401 means an invalid/expired/revoked credential or unavailable workspace; 400 means the report needs correction; 503 means the service needs attention/configuration.

Credentials expire in 90 days and can be revoked in Performance. Create a replacement and update the sender before expiry. Only a SHA-256 hash is stored, so the credential cannot be retrieved after creation. This API does not change ads, bids or budgets.

Schedule the reporting service to send a provider's closed daily report before the morning review. If attribution changes later, resend affected days under the same identity. Document attribution windows and delays. Verify one report and one correction before relying on automatic delivery.

## Scheduled paid-report sender

Choose an ad in Performance, save its external ad ID in Ads, then enter the currency, source, conversion and attribution rule. Create its report credential and download the sender configuration. Keep credentials on the trusted reporting host. The config contains environment-variable names. Set the named variables, put the config outside the public web root and use:

```sh
node scripts/sync-paid-reports.mjs path/to/paid-report.json
node scripts/sync-paid-reports.mjs path/to/paid-report.json --watch
```

The first command pulls once. The second reads the config again every six hours, or retries after 15 minutes following an error. A config is an array with one entry per scoped report. The receiver verifies the configured workspace, TCF ad, external ID, platform, currency, conversion and attribution before accepting these sends. Revoke its key in Performance to disconnect. A stale feed or expired key appears on Today. The cap alert starts at 85% of the total cap using the largest comparable spend series over the full ad flight, in the ad currency. The alert includes the latest spend report date for that series. The sender only reads reports.

| Platform                                                    | Read-only native mode                                                                                                                                                                    | Daily-file mode |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| Meta                                                        | Ad Insights, ad account currency/timezone, unified attribution. Set the exact `action_type` for conversion reporting.                                                                    | Supported       |
| Google Ads and YouTube                                      | Google Ads SearchStream with a reporting user, OAuth refresh token and developer token. The series represents primary account conversions. Manager accounts can set `login_customer_id`. | Supported       |
| Reddit                                                      | V3 daily ad report in UTC. Spend is converted from micros. Supply an optional documented click- or view-attributed conversion field. OAuth refresh credentials are supported.            | Supported       |
| X                                                           | OAuth 1.0a read access to the promoted tweet and account. On-X placement, link clicks, impressions and spend. Use a separate export to supply conversions.                               | Supported       |
| LinkedIn, TikTok, Microsoft, Pinterest, Snapchat and Amazon | Use a scheduled provider export or a scoped reporting integration.                                                                                                                       | Supported       |

Native pulls revisit the previous seven closed reporting dates. Meta and Google return revenue only with `conversion_values_are_revenue: true` and the appropriate account configuration. For file mode deliver a UTF-8 CSV to the configured path by atomic replacement. Use one daily ad-level row per external ID, monetary values in the stated currency, and explicit column mappings for unusual headers. Unavailable metrics stay blank. Scope each feed to its own attribution definition and reporting zone. These readers need qualification with the customer's authorized account before use for real business reporting.

Reader contracts: [Meta Ads Insights](https://developers.facebook.com/docs/marketing-api/insights/), [Google reporting](https://developers.google.com/google-ads/api/rest/common/search), [Reddit reports](https://ads-api.reddit.com/docs/v3/api/get-a-report), and the [X Ads analytics SDK](https://github.com/twitterdev/twitter-python-ads-sdk/blob/master/twitter_ads/analytics.py).
