time | status | user agent | |
---|---|---|---|
Retrieving recent requests… |
Benefits Endpoint Examples
The Benefits endpoint allows you to retrieve a list of benefits supported by the Miracle API Protocol. These benefits can include airdrops, event tickets, exclusive content, and more, associated with specific NFT collections across different chains. This endpoint includes all benefits gathered from sources coming from Official, Third Party, and Community Sources.
Important Notes
validFrom
andvalidTo
:validFrom
: The date when the benefit becomes active and trackable on the Miracle.validTo
: The date when the benefit expires and is no longer available.
- Action Date:
- Represents the deadline for the user to take a specific action, such as claiming or minting a benefit.
- May differ from
validTo
in cases like events where tickets need to be claimed by a certain date (actionDate
), but the event occurs later (validTo
).
Enhancing Your Product with Benefits
By leveraging the Benefits endpoint, you can enhance your web3 applications in various ways:
- New Benefits Feed: Display the latest benefits added.
- Last Chance: Highlight benefits that are expiring soon, creating urgency.
- Collection Highlights: Showcase benefits associated with specific NFT collections.
- Personalized Experiences: Present benefits available to individual users based on their wallet holdings.
Thumbnail Guidelines
For optimal visual presentation across various devices and interfaces, we advise using a 16:9 thumbnail ratio for all benefit visuals. This recommended ratio ensures:
- Optimal Fit: Thumbnails render properly on different screen sizes including desktop, tablet, and mobile devices.
- Consistent Appearance: Maintaining a standard 16:9 aspect ratio across your application helps preserve a unified and professional look.
- Enhanced User Experience: A predictable and balanced thumbnail size boosts visual clarity and focus, especially when displaying multiple benefits.
Examples
New Benefits Feed
Display the most recently added benefits:
Request:
curl GET "https://www.themiracle.io/api/v1/benefits?sortBy=validFrom&sortDirection=DESC&limit=20"
New Benefits Feed
Display the most recently added benefits:
Request
curl GET "https://www.themiracle.io/api/v1/benefits?sortBy=validFrom&sortDirection=DESC&limit=20"
Explanation
- sortBy=validFrom: Sorts benefits by the date they became active.
- sortDirection=DESC: Displays the newest benefits first.
- limit=20: Returns up to 20 benefits.
Last Chance
Show benefits that are expiring soon:
Request
curl GET "https://www.themiracle.io/api/v1/benefits?sortBy=validTo&sortDirection=ASC&limit=20"
Explanation
- sortBy=validTo: Sorts benefits by their expiration date.
- sortDirection=ASC: Displays benefits that will expire soonest.
- limit=20: Returns up to 20 benefits.