Offers API
Overview
Section titled “Overview”Offers represent the monetization endpoints (affiliate links) in your campaigns. Each offer defines a destination URL, payout amount, and optional capping rules.
Authentication
Section titled “Authentication”All endpoints require either a JWT token or an API key (gf_...) in the Authorization header.
Endpoints
Section titled “Endpoints”| Method | Path | Scope | Description |
|---|---|---|---|
| GET | /api/v1/offers | read:offers | List all offers |
| POST | /api/v1/offers | write:offers | Create an offer |
| GET | /api/v1/offers/{id} | read:offers | Get offer details |
| PATCH | /api/v1/offers/{id} | write:offers | Update an offer |
| DELETE | /api/v1/offers/{id} | write:offers | Delete an offer |
Examples
Section titled “Examples”Create an Offer
Section titled “Create an Offer”curl -X POST https://devcore.getghostflow.io/api/v1/offers \ -H "Authorization: Bearer gf_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "name": "Weight Loss US", "url": "https://affiliate.example.com/offer/123?sub1={click_id}", "networkId": "019d4e56-3d6f-7be2-a77e-000000000010", "payout": 12.50, "payoutCurrency": "USD", "countries": ["US", "CA"] }'const response = await fetch('https://devcore.getghostflow.io/api/v1/offers', { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json', }, body: JSON.stringify({ name: 'Weight Loss US', url: 'https://affiliate.example.com/offer/123?sub1={click_id}', networkId: '019d4e56-3d6f-7be2-a77e-000000000010', payout: 12.50, payoutCurrency: 'USD', countries: ['US', 'CA'], }),});const offer = await response.json();import requests
resp = requests.post( "https://devcore.getghostflow.io/api/v1/offers", headers={"Authorization": f"Bearer {api_key}"}, json={ "name": "Weight Loss US", "url": "https://affiliate.example.com/offer/123?sub1={click_id}", "networkId": "019d4e56-3d6f-7be2-a77e-000000000010", "payout": 12.50, "payoutCurrency": "USD", "countries": ["US", "CA"], },)offer = resp.json()List Offers
Section titled “List Offers”curl https://devcore.getghostflow.io/api/v1/offers \ -H "Authorization: Bearer gf_your_api_key"