DocsStorefront integrationGiveaway data reference
Coming soon Kwik's public API and MCP server are coming soon. These docs are an early preview, in the beginning stages: endpoints, fields and examples are samples and will change before launch. Brands on Kwik today can ask their account manager about integrations.
Read every docs page as one Markdown file, ready to paste into ChatGPT, Claude or any AI assistant.
Storefront integration · ReferenceGiveaway Data In Shopify.
The Kwik 2.0 Shopify app keeps the giveaway schedule, rates, multipliers and banners in shop metafields. Read them to build timers, badges, banners and trackers.
Before you start
- The Kwik 2.0 Shopify app installed (Kwik 1 stores don't have this data).
- A giveaway set up in Kwik with weeks, timer text and, optionally, banner images.
How the data gets to the store
- The brand sets up the giveaway in Kwik: weeks, rates, multipliers, timer text and banners.
- When those settings are saved, the Kwik 2.0 app syncs them to shop metafields, usually within a minute.
- Your theme reads them in Liquid, or your Hydrogen app reads them through the Storefront API.
The storefront never calls Kwik directly. Everything it needs is already in the store.
The namespace
Every key lives in the Kwik 2.0 app's namespace, app--330349150209. It is the same on every store. Kwik's own app blocks can use the $app shortcut, but your custom sections, snippets and Custom Liquid blocks must use the full name:
{{ shop.metafields['app--330349150209'].giveaway_entries.value | json }} The keys
| Key | Type | What it holds |
|---|---|---|
giveaway_weeks | JSON object | {version, weeks: [...]}: the running and upcoming weeks of every giveaway, with dates, timer text and banner images. |
giveaway_entries | JSON array | One object per running giveaway: this week's base rate and its multipliers. |
cashback_config | JSON object | The cashback rate and rules. |
loyalty_points | JSON array | The loyalty point earning rules. |
wavelink_required | Boolean | true when rewards should only show to shoppers who came in on a share link. |
giveaway_weeks
| Field | What it is |
|---|---|
geId, geName | The giveaway's id and name. Several giveaways can run at once. |
weekId | The week (earning period) id. |
startTs, endTs | Start and end in Unix seconds. A week is running when startTs <= now < endTs. |
startsAt, endsAt | The same moments as ISO dates in UTC. |
timeZone | The giveaway's time zone, for showing dates, like America/Denver. |
timerText | Short text for the timer or bar, like "50X Ends Tonight". |
desktopImage, mobileImage | {url, width, height}, or null. Always check before using. |
{
"version": 1,
"weeks": [
{
"geId": 11,
"geName": "Truck Giveaway",
"weekId": 204,
"startsAt": "2026-11-30T07:00:00Z",
"endsAt": "2026-12-04T07:00:00Z",
"startTs": 1796022000,
"endTs": 1796367600,
"timeZone": "America/Denver",
"timerText": "50X Ends Tonight",
"desktopImage": { "url": "https://cdn.example.com/50x-desktop.jpg", "width": 2400, "height": 800 },
"mobileImage": { "url": "https://cdn.example.com/50x-mobile.jpg", "width": 1080, "height": 1350 }
},
{
"geId": 11,
"geName": "Truck Giveaway",
"weekId": 205,
"startsAt": "2026-12-04T07:00:00Z",
"endsAt": "2026-12-07T07:00:00Z",
"startTs": 1796367600,
"endTs": 1796626800,
"timeZone": "America/Denver",
"timerText": "25X Through Sunday",
"desktopImage": null,
"mobileImage": null
}
]
}
{%- assign weeks = shop.metafields['app--330349150209'].giveaway_weeks.value.weeks -%}
{%- assign now_ts = 'now' | date: '%s' | plus: 0 -%}
{%- for week in weeks -%}
{%- if week.startTs <= now_ts and week.endTs > now_ts -%}
{{ week.timerText }}: through {{ week.endTs | minus: 1 | date: '%A, %b %-d' }}
{%- endif -%}
{%- endfor -%} Pages can be cached, so a running week picked in Liquid can be out of date. Pick it again in JavaScript on load.
giveaway_entries
One object per running giveaway, for the week running now. Between weeks there is no rate, and Kwik awards no entries. Hide entry displays then.
[
{
"geId": 11,
"geName": "Truck Giveaway",
"forEachAmt": null,
"forEachPct": 100,
"pointValue": 1,
"multipliers": [
{ "multiplierType": "purchase_multiplier", "forEachAmt": 5, "shopifyProductIds": [8100000000001],
"stkAny": false, "stkRefMulti": false, "stkMulRef": false },
{ "multiplierType": "site_wide_multiplier", "forEachAmt": 2 },
{ "multiplierType": "order_multiplier", "forEachAmt": 2, "shopifyProductIds": [8100000000001, 8100000000002],
"stkAny": false, "stkRefMulti": false, "stkMulRef": false },
{ "multiplierType": "referral_multiplier", "forEachAmt": 3 }
]
}
]
Per product, Kwik counts: entries = round(base × referral × (product or sitewide) × order). Base is the flat forEachAmt, or price × forEachPct / 100 × pointValue. Different types multiply. The same type: the highest wins. Sitewide only counts when no product multiplier matches. See the entries guide for the full walk-through.
| Multiplier flags | Who gets it |
|---|---|
| none set | The buyer |
stkRefMulti | The buyer, on a referred order only |
stkMulRef | The referrer only. Never show it to the buyer. |
stkAny | Both |
Sitewide and referral multipliers ignore the flags. A referral multiplier needs a share link. Promo-code multipliers (multiOn 5) can't be shown on the storefront.
cashback_config and loyalty_points
{ "amount": 5, "calculationMethod": "variable", "firstOrderOnly": false, "referralMultiplier": 1, "referralFirstOrderOnly": false } amountis a percentage whencalculationMethodisvariable("5% back"), and a fixed amount when it isfixed. Check before you print a % sign.loyalty_pointsrows uselpName,forEachAmt,forEachPct,pointValue,multpandcurrencyCode. Print the raw JSON on a test page to see a store's real rules before building on them.
wavelink_required
When true, show rewards only to shoppers who came in on a share link. Check the URL first (waveLink, wavelink or kwiklink), then the _kwik_waveLink cookie. Only codes of 1 to 64 letters and digits count. Liquid can't see the cookie on first paint, so render reward displays hidden and let JavaScript decide.
Native app blocks
For Liquid themes, check these before building anything. Add them from the App blocks page in the Kwik 2.0 app. They don't run on Hydrogen.
| Need | Block | Key setting |
|---|---|---|
| Weekly hero banner | Giveaway Banner | Optional link, alt text, fallback image for days between weeks |
| Countdown and timer text | Giveaway Countdown | Days, hours, minutes, seconds, optional progress bar |
| Entries on the product page and thank-you page | Giveaway entries block | Uses the running week's rate. Shows nothing between weeks. |
| A customer's own entries and history | Point Tracker, Points Overview, Loyalty popup | Show: loyalty points, giveaway entries, or both |
| Referral link and code | ShareLink | "Require promo code" is optional. Untick it on older installs. |
| Share-link tracking | Referral Attribution (app embed) | Turn it on under App embeds |
NoteA shared entries calculation that themes can call anywhere (product cards, featured products, mini cart and product pages) is in development. When it ships, prefer it to custom entry math.
Banner images
- Desktop about 2400px wide, mobile about 1080px wide, JPG or WebP at full quality.
- Public HTTPS links with no login or expiry. Upload a new file each time an image changes. Replacing a file at the same address can keep showing the old one.
- The images are outside links, not Shopify files, so use
<picture>with thewidthandheightfrom the metafield, with the mobile source atmax-width: 749px. - Keep
timerTextshort. It shows in large letters.
When the data is empty
- Check that today is inside a week. Between weeks, no rate is correct.
- Print the raw metafields on a test page to rule out a bug in your code.
- In the Kwik 2.0 app, open the Sync page and click Resync now, then check again.
- Still empty while the giveaway is clearly live? Contact Kwik with the giveaway name and dates.
- Meanwhile, show your manual fallback (a fixed title, end date and image) so the page is never blank.
Every custom display should have a manual fallback and a debug switch that prints the raw data. Turn the debug switch off before publishing.