API Integration (Advanced)

Get Offers API - Migrate from All Offers

This guide covers moving from All Offers v4, /affiliates/api.php?action=offers&version=4, to Get Offers. Keep your existing publisher account API key. Update the endpoint, response parsing and event identifiers as described below.

Endpoint and authentication

curl --get 'https://publishers.revenueuniverse.com/api/v1/offers' \
  --header 'X-API-Key: YOUR_ACCOUNT_API_KEY' \
  --data-urlencode 'wall=YOUR_WALL_ID' \
  --data-urlencode 'limit=100'
curl --get 'https://publishers.revenueuniverse.com/api/v1/offers' \
  --header 'X-API-Key: YOUR_ACCOUNT_API_KEY' \
  --data-urlencode 'wall=YOUR_WALL_ID' \
  --data-urlencode 'limit=100'
curl --get 'https://publishers.revenueuniverse.com/api/v1/offers' \
  --header 'X-API-Key: YOUR_ACCOUNT_API_KEY' \
  --data-urlencode 'wall=YOUR_WALL_ID' \
  --data-urlencode 'limit=100'

Use GET over HTTPS. The legacy Get Offers route /getoffers_api.php also remains supported, including offer_id lookup. Remove the old action and version parameters. If using query authentication, rename key to api_key, keeping the same value. Supported header alternatives are X-API-Key, Authorization: ApiKey YOUR_KEY, and Authorization: Bearer YOUR_KEY.

Response and pagination

Read publisher_id instead of affiliate_id. The envelope contains status, publisher_id, wall_id, total, offset, limit and offers.

Pagination is optional. Omitting limit applies no limit and returns limit: null; there is no default page size of 100. Supplied limits are clamped to 1 through 10000. Offset defaults to 0 and also works without a limit. For explicit paging, increase offset by your requested page size until it reaches total, the count before pagination.

Filtering and single-offer lookup

Use offer_id=OFFER_ID on either Get Offers route to request one offer. It replaces the old offer=OFFER_ID use case. An offer unavailable to the wall or excluded by filters returns 404 OFFER_NOT_FOUND.

Supported filters include filter[tag], filter[tags], filter[platform], filter[category], filter[country], filter[conversion_type], filter[is_sequential] and filter[capped_only]. The filter[cap] name remains a compatibility alias for filter[capped_only]; the canonical name takes precedence. False selects offers with capacity, true selects capped-out offers. Apply returned state and dayparting restrictions in your integration.

filter[is_sequential] checks single-event offers as well as multi-event offers. For multi-event offers it excludes the synthetic base event from the match. See the technical documentation for all filter values and matching rules.

Field mapping

All Offers v4

Get Offers

Migration action

cid

offer_id

Rename campaign ID.

name

offer_name

Rename campaign name.

headline, description, preview_url

Same names

Continue using these fields.

requirements

events[].event_description

Display requirements for each event.

extra_terms

offer_terms

Keep displaying the additional terms.

category, a string

offer_type, a string

Category label, such as Mobile Apps.

offer_type, an integer

offer_category, an integer

Internal category mapping remains 0 through 11.

currency, currency_with_tiers

total_user_reward

Sum of event rewards in wall display units; allow fractions.

rate

events[].payout

Publisher USD payout is per event.

platform, a string

platform, an object

Use desktop and per-mobile-platform enabled flags.

min_os_version

Per-platform os_version_min

Also read os_version_max; null means no restriction.

countries, states

Same names

Preserve targeting checks; states: ["*"] means all.

user_level

user_restricted

Boolean minimum user-revenue or completed-offer-count restriction, not a general eligibility result.

cap

capping

Read lead, click and publisher cap objects.

reporting

reporting

Allow Daily, Weekly and other configured delay labels, including empty.

epc, conversion_rate

Same names

Historical seven-day performance metrics; support nullable values.

creatives[].image

creatives[].url

Width and height remain numeric.

url

click_url_base

Set sid2 to the user's ID before serving the URL.

app_store_id

mobile_package_id

Mobile app identifier.

Other current fields include tag, tags, offer_flow, payment_model, text-or-null multiple_leads and reward_window_days. There is no offer_conversion_window field. Get Offers always returns null for offer-level and event-level reward_expiration_date because this catalog has no user click anchor. Read offer-level reward_window_days for the user-facing duration in days; an event's non-null duration is its own override, and null uses the offer duration. Do not create a deadline from response time.

Modern-response migration history

If you already consumed an earlier Get Offers response, update parsers and cached records for the repeat-field and reward-window changes. The earlier frequency_limit response field was removed, and numeric multiple_leads was replaced by the named text policy. See the current technical guide for the allowed values. Existing endpoints now return the current contract; there is no new Get Offers version parameter to select the old fields.

Events and postback identifiers

Always iterate events[]. Single-step offers have one event; multi-reward offers have multiple events.

All Offers v4 tier field

Get Offers field

tiers_list[].requirements

events[].event_description

tiers_list[].currency

events[].user_reward

tiers_list[].rate

events[].payout

tiers_list[].sid4

events[].sid4

currency_with_tiers

total_user_reward

Keep using sid4 for the raw offer/tier identifier that conversions are matched on. It corresponds to $sid4$ in postbacks. event_id is a separate, configured RevU event identifier, returned as stored and possibly empty. It corresponds to $event_id$, whose valid alias is $eventid$. Neither event macro is an alias of $sid4$, and no base_<offer_id> identifier is generated.

Read conversion_type, nullable reward_window_days, always-null reward_expiration_date, event_order, is_sequential and is_non_crediting on each event. event_order is a one-based integer for an ordered event or false for an independent one. There are no event_conversion_window or non_linear fields.

Targeting and eligibility

Use platform.ios.enabled, platform.android.enabled and platform.desktop, with the applicable minimum and maximum OS versions. Evaluate returned state restrictions and dayparting times in their declared time zone.

user_restricted: true means a positive minimum user-revenue or completed-offer-count requirement is configured. False does not rule out other restrictions. Get Offers is a static catalog; use Get Personalized for user-specific eligibility.

Capping

Read capping.lead_cap, capping.click_cap and capping.publisher_cap. Their enabled flags do not have identical meanings.

Cap

Meaning of enabled: true

Stop showing when

Lead

A cap is configured.

enabled == true and remaining_leads_available <= 0.

Click

A cap is configured.

enabled == true and remaining_clicks_available <= 0.

Publisher

This publisher has reached its cap.

enabled == true. No count check is needed or possible.

Combine the three stop-showing conditions with OR. A lead or click cap with enabled: false has no cap and returns only that flag. For a publisher cap, {"enabled": false} means either no cap or a configured cap with room left. The API cannot distinguish those two states. When reached, the entire publisher object is {"enabled": true, "cap_scope": "publisher", "capping_period": "daily_cst"}. It never returns a remaining count, current count or configured maximum.

An enabled lead cap returns cap_scope: all_conversions, event_id: null, current_lead_count, remaining_leads_available and capping_period. The old position maps to current_lead_count. Enabled click caps return current_clicks_count, remaining_clicks_available and capping_period: daily_cst. Remaining counts are clamped to zero, so current plus remaining cannot reliably reconstruct the configured maximum after overdelivery.

Use filter[capped_only]=false to exclude offers capped by any of the three checks. It is not a user-eligibility or repeat-availability filter. Responses may be cached for up to 120 seconds when server caching is active, and capacity can change before a click. See the technical documentation for complete cap-state and response examples.

Click URLs and tracking limits

Set the user’s ASCII ID, at most 255 characters, on the returned template:

const clickUrl = new URL(offer.click_url_base);
clickUrl.searchParams.set('sid2', userId);
const clickUrl = new URL(offer.click_url_base);
clickUrl.searchParams.set('sid2', userId);
const clickUrl = new URL(offer.click_url_base);
clickUrl.searchParams.set('sid2', userId);

You can also append idfa for iOS and correlation values sid3, sid5 and sid6. Before URL encoding, limit ASCII SID3 values to 200 characters and SID5/SID6 to 255 each. The complete encoded callback URL must fit the delivery and receiver limits. Do not set SID4 yourself; it is reserved for offer/tier attribution.

Error handling and rate limits

Most errors return status: failure and message. An unavailable specific offer returns status: error with error.code: OFFER_NOT_FOUND. HTTP 405 includes both status: failure/message and a nested error with code METHOD_NOT_ALLOWED.

Handle HTTP 400 for invalid inputs, 401 for missing keys, 403 for invalid keys or account restrictions, 404 for unavailable walls/publishers/offers, and 405 for unsupported methods. The account restriction text is This API is incompatible with your affiliate account status.

Get Offers permits five requests per minute per API key, with a burst allowance of five. HTTP 429 returns HTML, so inspect the status before parsing JSON and back off before retrying. Share this budget across both routes and all clients using the key.

Migration checklist

  1. Change the endpoint and key parameter or header; retain the existing account key.

  2. Update the response envelope and choose explicit pagination or an unlimited request.

  3. Apply field mappings, platform checks, cap handling and user-specific eligibility checks.

  4. Iterate events, preserving sid4 and event_id independently, including empty values.

  5. Handle fractions, nullable deadlines, errors and rate limiting.

  6. Set sid2 on click templates and check callback processing using the API Setup variables.

Share feedback on this documentation

On this page

On this page