.png)
The Trade Desk Integration Guide
Connect The Trade Desk partner APIs with enterprise planning, marketing, finance, and analytics systems through secure, orchestrated workflows.
The Trade Desk integration options at a glance
The Trade Desk provides partner-facing REST APIs for advertisers, campaigns, ad groups, creatives, audience segments, and reporting. OAuth 2.0-style bearer-token authentication controls access according to partner permissions. Reporting is commonly asynchronous: a client submits a report request, stores its identifier, polls for completion, and retrieves the result. General-purpose webhooks, SOAP, GraphQL, direct database access, and broad bulk operations were not confirmed. Martini can consume the REST APIs, manage protected configuration, orchestrate scheduled and multi-step workflows, paginate through resources, transform JSON or report output, and load results into databases, files, analytics platforms, or internal APIs.
Common The Trade Desk integration patterns
Common The Trade Desk data objects used in integrations
Authentication and security considerations
OAuth-based partner access
The Trade Desk APIs use OAuth 2.0-style access tokens for approved API clients. Access is controlled by partner account permissions and may be limited to specific advertisers, resources, and operations.
Credential protection
Store client credentials and tokens in Martini secrets or secure environment configuration. Do not embed credentials in workflow definitions, mappings, source control, or operational logs.
Scope and token handling
- Confirm client registration, token lifetime, advertiser access, and reporting entitlements with The Trade Desk.
- Reuse tokens until expiration where appropriate and reacquire them when required.
- Do not log bearer tokens or sensitive request content.
- Separate unauthorized responses from transient server and network failures.
Operational considerations for The Trade Desk integrations
Rate limits and concurrency
Quotas may vary by account, endpoint, API version, and partner status. Use controlled concurrency, bounded exponential backoff, retry limits, and scheduling that avoids unnecessary polling.
Pagination and volume
Do not assume that one response contains all Advertisers, Campaigns, AdGroups, Creatives, or AudienceSegments. Preserve page state, process incrementally, and use stable identifiers for restartable upserts.
Asynchronous reporting
Store the report identifier, request parameters, date range, advertiser scope, submission time, poll count, status, and processing result. Add timeout and dead-letter paths for reports that remain incomplete.
Idempotency and schema changes
Use vendor identifiers as external keys and composite keys for report loads. Validate required fields, handle null and absent values, and version mappings when statuses, enumerations, or downstream schemas change.
Testing and observability
Test representative advertisers, resource permissions, pagination, empty results, large reports, throttling, authentication failures, and destination errors. Log correlation identifiers, endpoint names, resource scopes, and report identifiers without exposing secrets.
Why use Martini instead of scripts or point-to-point integrations?
Orchestrated integration logic
Martini coordinates token acquisition, dependent REST calls, pagination, asynchronous report polling, transformation, target writes, and failure paths in workflows rather than scattering behavior across scripts.
Reusable and maintainable assets
Teams can centralize mappings, validation, business rules, authentication configuration, and report-processing logic. Martini can also expose controlled APIs that abstract The Trade Desk operations for internal applications.
Reliable data movement
Scheduled execution, state tracking, idempotent processing, bounded retries, and operational monitoring provide a stronger foundation for campaign synchronization and high-volume reporting than isolated point-to-point scripts.
Flexible enterprise delivery
Martini can transform The Trade Desk data and deliver it to databases, files, warehouses, analytics platforms, or other APIs while preserving the option to add custom logic when vendor-specific rules require it.