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
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 |
|---|---|---|
|
| Rename campaign ID. |
|
| Rename campaign name. |
| Same names | Continue using these fields. |
|
| Display requirements for each event. |
|
| Keep displaying the additional terms. |
|
| Category label, such as |
|
| Internal category mapping remains 0 through 11. |
|
| Sum of event rewards in wall display units; allow fractions. |
|
| Publisher USD payout is per event. |
|
| Use desktop and per-mobile-platform enabled flags. |
| Per-platform | Also read |
| Same names | Preserve targeting checks; |
|
| Boolean minimum user-revenue or completed-offer-count restriction, not a general eligibility result. |
|
| Read lead, click and publisher cap objects. |
|
| Allow Daily, Weekly and other configured delay labels, including empty. |
| Same names | Historical seven-day performance metrics; support nullable values. |
|
| Width and height remain numeric. |
|
| Set |
|
| 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 |
|---|---|
|
|
|
|
|
|
|
|
|
|
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 | Stop showing when |
|---|---|---|
Lead | A cap is configured. |
|
Click | A cap is configured. |
|
Publisher | This publisher has reached its cap. |
|
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:
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
Change the endpoint and key parameter or header; retain the existing account key.
Update the response envelope and choose explicit pagination or an unlimited request.
Apply field mappings, platform checks, cap handling and user-specific eligibility checks.
Iterate events, preserving
sid4andevent_idindependently, including empty values.Handle fractions, nullable deadlines, errors and rate limiting.
Set
sid2on click templates and check callback processing using the API Setup variables.
Share feedback on this documentation
