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

…/affiliates/api.php

…/getoffers_api.php

Required params

wall, key, action=offers, version=4

wall, api_key

Auth key parameter

key

api_key (or header)

Response wrapper

status, affiliate_id, wall_id, offers

status, publisher_id, wall_id, total, offset, limit, offers

Pagination

none

limit / offset

Errors

{ "error": "…" }

{ "status": "failure", "message": "…" }

Multi-reward

tiers / tiers_list / sid4

events[] with event_id

Platform

string ("iOS"/"Android"/"All")

structured platform object

Caps

cap object

capping object (lead + click caps)

1. Endpoint, method, and authentication

Before

curl "https://publishers.revenueuniverse.com/affiliates/api.php?wall=YOUR_WALL_ID&key=YOUR_API_KEY&action=offers&version=4"
curl "https://publishers.revenueuniverse.com/affiliates/api.php?wall=YOUR_WALL_ID&key=YOUR_API_KEY&action=offers&version=4"
curl "https://publishers.revenueuniverse.com/affiliates/api.php?wall=YOUR_WALL_ID&key=YOUR_API_KEY&action=offers&version=4"

After

# Recommended: key as a header
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID"

# Or as a query parameter
curl "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID&api_key=YOUR_API_KEY"
# Recommended: key as a header
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID"

# Or as a query parameter
curl "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID&api_key=YOUR_API_KEY"
# Recommended: key as a header
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID"

# Or as a query parameter
curl "https://publishers.revenueuniverse.com/getoffers_api.php?wall=YOUR_WALL_ID&api_key=YOUR_API_KEY"

What changed:

  • New base URL: getoffers_api.php (no longer under /affiliates/).

  • keyapi_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>, or Authorization: Bearer <key>.

  • action and version are 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

{ "status": "success", "affiliate_id": 1234, "wall_id": 123, "offers": [  ] }
{ "status": "success", "affiliate_id": 1234, "wall_id": 123, "offers": [  ] }
{ "status": "success", "affiliate_id": 1234, "wall_id": 123, "offers": [  ] }

After

{ "status": "success", "publisher_id": 1234, "wall_id": 123, "total": 2080, "offset": 0, "limit": 100, "offers": [  ] }
{ "status": "success", "publisher_id": 1234, "wall_id": 123, "total": 2080, "offset": 0, "limit": 100, "offers": [  ] }
{ "status": "success", "publisher_id": 1234, "wall_id": 123, "total": 2080, "offset": 0, "limit": 100, "offers": [  ] }
  • affiliate_idpublisher_id

  • New: total, offset, limit

5. Field mapping

Identity & content

All Offers (v4)

Get Offers

Notes

cid

offer_id


name

offer_name


headline

headline

unchanged

description

description

unchanged

requirements

events[].event_description

Now lives on each event (see §6).

extra_terms

offer_terms


preview_url

preview_url

unchanged

N/A

tag

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

category (string, e.g. "Mobile Apps")

offer_type (string)

The human-readable label. Values: Undefined, Free, Purchase, Trial, Other, Mobile Apps, Clicks and Videos, Studies, Contest.

offer_type (integer 0–11)

offer_category (integer 0–11)

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

currency (offer-level virtual currency)

total_user_reward

Sum of all events' user_reward.

rate (offer-level USD payout)

events[].payout

Payout now lives per event; there is no single offer-level payout.

currency_with_tiers

total_user_reward

Same concept, now the standard total for every offer.

N/A

offer_conversion_window

New: base attribution window in days.

Targeting & eligibility

All Offers (v4)

Get Offers

Notes

platform (string)

platform (object)

{ desktop: bool, android: {enabled, os_version_min, os_version_max}, ios: {…} }. See §7.

min_os_version

platform.android.os_version_min / platform.ios.os_version_min

Now per-platform, with a max as well.

countries

countries

Same ISO alpha-2 list; global offers return the full country list.

states

states

Unchanged; ["*"] = all.

user_level (integer)

user_restricted (boolean)

See §8.

Capping & reporting

All Offers (v4)

Get Offers

Notes

cap (object)

capping.lead_cap

Plus a new capping.click_cap. See §9.

cap.type (e.g. "Daily (GMT)")

capping.lead_cap.capping_period (e.g. daily_gmt)


cap.position

capping.lead_cap.current_lead_count


cap.maximum

(derive)

Use current_lead_count + remaining_leads_available.

reporting

reporting

Unchanged: Instant, Hourly, 2-3 Days.

Performance & creatives

All Offers (v4)

Get Offers

Notes

epc

epc

Unchanged (network-wide, last 7 days).

conversion_rate

conversion_rate

Unchanged (network-wide, last 7 days).

creatives[].image

creatives[].url

Renamed imageurl.

creatives[].width

creatives[].width

unchanged

creatives[].height

creatives[].height

unchanged

URLs & mobile

All Offers (v4)

Get Offers

Notes

url

click_url_base

Same sid2= mechanism (see §10).

app_store_id

mobile_package_id

Store ID / package name.

6. Multi-reward offers: tiersevents

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

tiers_list[].requirements

events[].event_description

tiers_list[].currency

events[].user_reward

tiers_list[].rate

events[].payout

tiers_list[].sid4

events[].event_id

currency_with_tiers

total_user_reward

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 iterate events[].

  • A single-reward offer is just an offer with one event.

7. Platform: string → object

Before: "platform": "iOS" (or "Android", "All").

After:

"platform": {
  "desktop": true,
  "android": { "enabled": false, "os_version_min": null, "os_version_max": null },
  "ios":     { "enabled": true,  "os_version_min": "14.0", "os_version_max": null }
}
"platform": {
  "desktop": true,
  "android": { "enabled": false, "os_version_min": null, "os_version_max": null },
  "ios":     { "enabled": true,  "os_version_min": "14.0", "os_version_max": null }
}
"platform": {
  "desktop": true,
  "android": { "enabled": false, "os_version_min": null, "os_version_max": null },
  "ios":     { "enabled": true,  "os_version_min": "14.0", "os_version_max": null }
}

Replace string comparisons:

// Before
const isIos = offer.platform === 'iOS' || offer.platform === 'All';

// After
const isIos = offer.platform.ios.enabled;
// Before
const isIos = offer.platform === 'iOS' || offer.platform === 'All';

// After
const isIos = offer.platform.ios.enabled;
// Before
const isIos = offer.platform === 'iOS' || offer.platform === 'All';

// After
const isIos = offer.platform.ios.enabled;

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_leveluser_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: capcapping

Before

"cap": { "type": "Daily (GMT)", "position": "0", "maximum": "100" }
"cap": { "type": "Daily (GMT)", "position": "0", "maximum": "100" }
"cap": { "type": "Daily (GMT)", "position": "0", "maximum": "100" }

After

"capping": {
  "lead_cap": {
    "enabled": true,
    "cap_scope": "all_conversions",
    "event_id": null,
    "remaining_leads_available": 97,
    "current_lead_count": 3,
    "capping_period": "daily_gmt"
  },
  "click_cap": { "enabled": false }
}
"capping": {
  "lead_cap": {
    "enabled": true,
    "cap_scope": "all_conversions",
    "event_id": null,
    "remaining_leads_available": 97,
    "current_lead_count": 3,
    "capping_period": "daily_gmt"
  },
  "click_cap": { "enabled": false }
}
"capping": {
  "lead_cap": {
    "enabled": true,
    "cap_scope": "all_conversions",
    "event_id": null,
    "remaining_leads_available": 97,
    "current_lead_count": 3,
    "capping_period": "daily_gmt"
  },
  "click_cap": { "enabled": false }
}
  • The old cap.position (current usage) maps to lead_cap.current_lead_count.

  • The old cap.maximum is now expressed as current_lead_count + remaining_leads_available.

  • cap.type strings map to capping_period values (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 adds remaining_clicks_available, current_clicks_count, and capping_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):

let clickUrl = offer.click_url_base.replace('&sid2=', '&sid2=' + encodeURIComponent(userId));
let clickUrl = offer.click_url_base.replace('&sid2=', '&sid2=' + encodeURIComponent(userId));
let clickUrl = offer.click_url_base.replace('&sid2=', '&sid2=' + encodeURIComponent(userId));

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

{ "error": "No eligible promo types found. You may need to specify an offer wall." }
{ "error": "No eligible promo types found. You may need to specify an offer wall." }
{ "error": "No eligible promo types found. You may need to specify an offer wall." }

After

{ "status": "failure", "message": "Missing or invalid wall parameter" }
{ "status": "failure", "message": "Missing or invalid wall parameter" }
{ "status": "failure", "message": "Missing or invalid wall parameter" }

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.php and drop action / version.

  • Rename keyapi_key (same value), or move it to a header.

  • Add pagination using limit / offset / total.

  • Update the response wrapper read (affiliate_idpublisher_id; handle total/offset/limit).

  • Apply the field renames in §5.

  • Swap the categorization fields (categoryoffer_type, integer offer_typeoffer_category).

  • Replace tiers/tiers_list handling with events[].

  • Replace platform string checks with the platform object.

  • Replace user_level logic with user_restricted (+ Get Personalized API for restricted offers).

  • Replace cap logic with capping (lead + click caps).

  • Update error handling to { status, message }.

  • Confirm click-URL sid2= handling is intact; optionally adopt idfa= / sid3,5,6 and the $eventid$ postback macro.

Support

For help with your migration, contact your account manager or sales contact.

Share feedback on this documentation