Start here
API Documentation
Bring Clean Sweeps into your storefront. Retrieve sweepstakes rules, build custom product entry displays, and help customers find their entries through one GraphQL API.
https://backend.cleansweeps.app/graphqlWant to display entries in real time?
Design your own entry badges, product cards, and storefront displays. Use the Clean Sweeps API to retrieve your sweepstakes rules, calculate entry values, and refresh your displays when settings change in the admin app.
You control the appearance. Our example checks Clean Sweeps for new settings every 60 seconds while the page is visible, then updates the entry count and multiplier. Changes you make in the admin app appear after the next successful check.
Connect this display to the APIChoose the right API
These four references cover product entry displays, organization-wide settings, customer entry totals, and the settings for a single sweepstake. Choose the data you need, then present it in your own design.
Product Entry Display API
Show how many entries a product earns, including its multipliers and bonuses, in your own product badges and cards.
GraphQL queryOrganization Query API
Retrieve your organization’s settings and its sweepstakes settings to build custom configuration views and displays across multiple sweepstakes.
GraphQL queryCustomer Entry Lookup API
Display a customer’s earned entries using their logged-in email address or an email search—like the email lookup widget, with your own design.
GraphQL helperQuery Sweepstake by ID
Get the settings for one sweepstake by its ID. Build a dedicated display using its title, dates, entry rules, product overrides, and scheduled bonuses.
From API response to storefront
- Choose your data. Use product rules for entry badges, the organization query for settings across your account, customer lookup for earned entries, or querySweepstake() for one sweepstake’s settings.
- Send a GraphQL request. Use HTTPS POST with Content-Type: application/json and a JSON body containing query and variables.
- Render your own UI. Check HTTP status and GraphQL errors, parse serialized settings carefully, then update your display.
Examples use placeholder IDs and sample responses. They do not run against your store from this website.
Query a sweepstake by ID →
