Perkswall API
The MomentScience Perkswall API facilitates the integration of a curated "perks gallery" into your application or website through RESTful calls. This API is designed to provide you with access to Perkswall-enabled offers, enabling a highly customizable and branded Perkswall experience.
By utilizing the Perkswall API, you can fetch all available offers configured for your account. These offers can then be used to construct a dynamic and engaging Perkswall that aligns with your brand’s identity and enhances user interaction.
- To use the Perkswall API, you must first have the Perkswall feature activated for your account. Contact your account manager to request activation.
- Once the Perkswall feature is enabled, obtain your API key from your MomentScience dashboard. The API key is required to authenticate all requests made to the Perkswall API. Learn more about how to obtain your API key.
Try our Perkswall API live now and experience the response in real time! Test it below to see how it works and explore the data it returns.
Method: POST Base URL: https://api.adspostx.com/native/v4/perkswall.json
Parameter | Type | Description |
---|---|---|
Content-Type Required | String | Specifies the media type of the request. Must be set to application/json |
Parameter | Description | Type | Example |
---|---|---|---|
api_key Required | Your API Key. Learn how to obtain your key from the dashboard.
| String | 4bbdefc2-b130-424d-8170-54bdcb98e64e |
loyaltyboost Optional | Include LoyaltyBoost offers in the response.
| String | 0/ 1/ 2 |
creative Optional | Returns offers with at least one creative (image) if set to 1.
| String | 0/ 1 |
Parameter | Description | Type | Example |
---|---|---|---|
ua Recommended | The User-Agent string of the end-user, required for proper targeting. If proxying requests via a server, ensure the User-Agent of the end-user is passed through. | String | Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.43 Mobile Safari/537.36 |
ip Recommended | The IP address of the end user for targeting purposes. | String | |
adpx_fp Recommended | A unique identifier for the end user. This is not required, but highly recommended for accurate tracking. More information is provided below. | String | 1234abcd-5678-efgh-9101-ijklmnopqrst |
dev Optional | Enables a test response. When set to 1, the sandbox environment is activated, allowing for testing without recording any activity in production. In this mode, geo-restrictions are ignored, and all Offers are returned in the response, providing a comprehensive testing experience.
| String | 0|1 |
subid Optional | An ID used to identify specific usages of the Fetch Perkswall Offers API. | String | mobile_android_app_post_transaction |
<string> Optional | Custom key-value payload attributes. You can add any number of custom attributes for additional details. These attributes are included in conversion reports and can be tracked in relation to impressions and clicks. | String | membershipID: "A45GRE987343PKD" |
The adpx_fp attribute is a special parameter used in the body of the Fetch Perkswall Offers calls to enhance Offer performance. It should be populated with a unique alphanumeric string that identifies the end-user.
MomentScience leverages the adpx_fp value for frequency capping—ensuring that Offers are displayed to users within predefined limits. Additionally, it prevents Offers from being shown again once a user has opted out of a specific Offer, ensuring a more personalized and seamless experience.
Upon a successful response from the Fetch Perkswall Offers API, the body will include a dataobject containing an array of Offer objects. These objects provide all the necessary details to construct the Offers for your Perkswall. Below are the relevant attributes within the Offer objects.
offers(Array of Offer Objects)
An array of objects containing the details for each available Offer. Each Offer object contains the following attributes:
settings Object
The settings object allows for customization of the Perkswall’s appearance and behavior. However, for integration purposes, the only essential attribute to focus on is:
count Integer
Number of Offers returned from the call.
When you receive a successful response from the Fetch Perkswall Offers API, follow these steps to construct and display offers using the provided data.
For more information about how to make the most of the API response, please refer to the Perkswall Anatomy documentation.
- Extract Offer Data Parse the response to retrieve the offers array, which contains the necessary attributes for constructing each offer.
- Generate Offers Use the following attributes from each offer object to display the offer:
- title: Offer headline (recommended for larger formats). If a shorter version is available, use short_headlinefor smaller formats.
- advertiser_name: Name of the advertiser.
- description: Detailed offer description (max length: 220 characters). If a shorter version is available, use short_descriptionfor smaller formats.
- click_url: Destination URL when the user interacts with the offer.
- image: Primary image for visual representation.
- pixel: Impression beacon URL for tracking.
- Implement Impression Tracking For each displayed offer:
- Make a GET request to the pixelURL.
- This ensures the MomentScience Dashboard logs the impression and tracks performance metrics such as:
- Click-Through Rate (CTR)
- Effective Cost Per Thousand Impressions (eCPM)
- Display Offers Sequentially
- Render the first offer and trigger its pixel URL.
- Proceed to display subsequent offers in sequence, ensuring each impression is tracked.
Each offer includes a creativesattribute that contains an array of images. Leverage this data as follows:
- Primary Creative Identify the primary creative using the is_primaryboolean attribute. Use this by default if no other creative is specified.
- Creatives Types: we support multiple creatives types,
- offer_image: Displays an image relevant to the offer, size based on design requirements.
- hero_image: Represents the offer in the Perkswall Featured Section, with only one hero image allowed (1000 × 280 px, ±10% size variation). This image can also be used to populate larger "interstitial" offer modals or similar bigger units if implemented.
- icon_image: Represents the offer's icon or brand logo, with only one icon image allowed (250 × 250 px, ±10% size variation).
- Creative Selection Choose creatives that best suit your platform (e.g., desktop, mobile). Consider aspect ratios:
- 1: Square
- < 1: Portrait
- > 1: Landscape
- Image Transformations Optimize images for different devices using query parameters:
- width=XXX: Adjust the width.
- height=XXX: Adjust the height.
- aspect_ratio=X:Y: Specify the aspect ratio.
To ensure a smooth integration:
- Confirm implementation of all required attributes (title, click_url, pixel, etc.).
- Verify that all beacon URLs (pixel, close, no_thanks_click, etc.) are functional.
- Test creative transformations and rendering on various devices.
For a complete list of integration steps, refer to the Perkswall API Integration Checklist.
📢 If you're running into any issues while going through the integration process, feel free to contact us at [email protected]