Resources/API Documentation

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.

POSThttps://backend.cleansweeps.app/graphql

Want 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 API

Choose 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.

From API response to storefront

  1. 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.
  2. Send a GraphQL request. Use HTTPS POST with Content-Type: application/json and a JSON body containing query and variables.
  3. 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 →