API Integration (Advanced)
Get Offers API - Migrate from All Offers
This guide walks you through migrating from the legacy All Offers API (api.php?action=offers&version=4) to the new Get Offers API.
The two APIs return the same kind of data (your wall's offer catalog) but Get Offers standardizes the response, renames fields to be self-explanatory, and adds pagination and richer targeting/capping detail. Most migrations are a field-rename exercise plus a few structural changes described below.
Note
Your API key does not change. The Get Offers API uses the same account API key you already have. There is nothing to regenerate.
At a glance
All Offers (v4) | Get Offers | |
|---|---|---|
Endpoint |
|
|
Required params |
|
|
Auth key parameter |
|
|
Response wrapper |
|
|
Pagination | none |
|
Errors |
|
|
Multi-reward |
|
|
Platform | string ( | structured |
Caps |
|
|
1. Endpoint, method, and authentication
Before
After
What changed:
New base URL:
getoffers_api.php(no longer under/affiliates/).key→api_key. The value is the same; only the parameter name changed. You can also pass it as a header:X-API-Key,Authorization: ApiKey <key>, orAuthorization: Bearer <key>.actionandversionare no longer used. The endpoint itself is dedicated to offers.
2. Pagination (new)
The catalog is now paged. Use limit (default 100, max 10000) and offset (default 0), and read total from the response to know when to stop:
If you previously assumed a single response contained the entire catalog, add a paging loop.
3. Server-side filtering (new)
Where v4 required you to pull everything and filter in code, Get Offers can filter for you with query parameters: filter[tag], filter[platform] (desktop/android/ios), filter[category] (matches offer_type), filter[country] (ISO alpha-2), and filter[cap] (false = has capacity, true = capped out).
State targeting (states) and dayparting are still evaluated on your side.
4. Response envelope
Before
After
affiliate_id→publisher_idNew:
total,offset,limit
5. Field mapping
Identity & content
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| |
|
| |
|
| unchanged |
|
| unchanged |
|
| Now lives on each event (see §6). |
|
| |
|
| unchanged |
N/A |
| New campaign label. |
Categorization (note the rename)
The two category fields effectively swapped names and types — read this carefully:
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| The human-readable label. Values: |
|
| Same internal mapping as before (0 = Undefined, 1 = Casino/Gambling, … 11 = Social Casinos). |
In short: the old string category is now offer_type, and the old integer offer_type is now offer_category. The integer mapping table is unchanged.
Rewards & payouts
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| Sum of all events' |
|
| Payout now lives per event; there is no single offer-level payout. |
|
| Same concept, now the standard total for every offer. |
N/A |
| New: base attribution window in days. |
Targeting & eligibility
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
|
|
|
| Now per-platform, with a max as well. |
|
| Same ISO alpha-2 list; global offers return the full country list. |
|
| Unchanged; |
|
| See §8. |
Capping & reporting
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| Plus a new |
|
| |
|
| |
| (derive) | Use |
|
| Unchanged: |
Performance & creatives
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| Unchanged (network-wide, last 7 days). |
|
| Unchanged (network-wide, last 7 days). |
|
| Renamed |
|
| unchanged |
|
| unchanged |
URLs & mobile
All Offers (v4) | Get Offers | Notes |
|---|---|---|
|
| Same |
|
| Store ID / package name. |
6. Multi-reward offers: tiers → events
In v4, multi-reward offers used tiers: true with a tiers_list[]. In Get Offers, every offer exposes its steps as an events[] array. Single-step offers simply have one event.
v4 tier field | Get Offers event field |
|---|---|
|
|
|
|
|
|
|
|
|
|
New per-event fields: conversion_type, event_conversion_window, event_order (false for an independent step, or a 1-based integer for ordered steps), and non_linear.
Migration tips:
Stop branching on
tiers: true. Always iterateevents[].A single-reward offer is just an offer with one event.
7. Platform: string → object
Before: "platform": "iOS" (or "Android", "All").
After:
Replace string comparisons:
OS version targeting that used to come from min_os_version is now per-platform (os_version_min / os_version_max), with null meaning no restriction.
8. Eligibility: user_level → user_restricted
In v4, user_level > 0 meant an offer required eligibility confirmation. That is now a simple boolean:
user_restricted: false: serve normally.user_restricted: true: only show the offer to a user after confirming their eligibility via the Get Personalized API.
9. Caps: cap → capping
Before
After
The old
cap.position(current usage) maps tolead_cap.current_lead_count.The old
cap.maximumis now expressed ascurrent_lead_count + remaining_leads_available.cap.typestrings map tocapping_periodvalues (unlimited,hourly,daily_cst,daily_est,daily_pst,daily_gmt,weekly,monthly,total).New: a separate
click_cap. When disabled it is{ "enabled": false }; when enabled it addsremaining_clicks_available,current_clicks_count, andcapping_period.
To skip exhausted offers, check remaining_leads_available (and remaining_clicks_available where the click cap is enabled), or use filter[cap]=false to have the server exclude capped-out offers for you.
10. Click URL & postback tracking
Click URL: unchanged mechanism. As in v4, append the user's ID to sid2= on the click URL (now named click_url_base):
You may optionally also append idfa= (the user's IDFA, iOS only) and sid3= / sid5= / sid6= (any URL-safe value up to 255 characters, returned to you on the postback). Do not set sid4= — it is reserved for the event identifier.
Postback / tier tracking: unchanged, with a new alias. The tier identifier you used to read from sid4 is now the event's event_id. Your existing postback macro continues to work exactly as before; a new $eventid$ macro is also being added as a clearer alias for the same value. No change is required to keep working, but you may switch to $eventid$ for readability.
11. Error handling
Before
After
Update your error handling to read status and message instead of a bare error string. Responses use standard HTTP status codes: 400 (bad request), 401 (missing key), 403 (invalid key / account not eligible), 404 (wall or affiliate not found/inactive), and 405 (only GET is supported).
12. A note on getting a single offer
The v4 offer=OFFER_ID parameter (fetch one offer by ID) has no equivalent in Get Offers. To work with a specific offer, fetch the catalog and match on offer_id in your code.
Migration checklist
Point requests at
getoffers_api.phpand dropaction/version.Rename
key→api_key(same value), or move it to a header.Add pagination using
limit/offset/total.Update the response wrapper read (
affiliate_id→publisher_id; handletotal/offset/limit).Apply the field renames in §5.
Swap the categorization fields (
category→offer_type, integeroffer_type→offer_category).Replace
tiers/tiers_listhandling withevents[].Replace platform string checks with the
platformobject.Replace
user_levellogic withuser_restricted(+ Get Personalized API for restricted offers).Replace
caplogic withcapping(lead + click caps).Update error handling to
{ status, message }.Confirm click-URL
sid2=handling is intact; optionally adoptidfa=/sid3,5,6and the$eventid$postback macro.
Support
For help with your migration, contact your account manager or sales contact.
Share feedback on this documentation