Overview
Campaigns are promotional offers that bundle a plan and, optionally, a coupon. They let you run targeted acquisition, renewal, cancellation, or creation flows and surface the right plan and discount to a customer at the right time.
The Open API exposes a single, read-only endpoint for resolving a campaign and its attached offer from your front end before starting a checkout.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | (ref:get-campaign-by-id-or-key) | Retrieve campaigns for a site by campaign ID or campaign key. |
How it works
- A campaign is always scoped to a site, so every request must include
site_id. - Look a campaign up by
campaign_id(returns at most one) or bycampaign_key(matched through campaign runs; may return several). - The response embeds the campaign's full plan (with its parent product) and its coupon when one is attached.
- A valid request that matches nothing returns an empty
campaignsarray with HTTP200— it is not an error.
