API
Shared Sweeps API
Version 1.0 · Last updated March 2026
The Shared Sweeps API lets your Shopify store display entry counts, retrieve product giveaway settings, and look up order-level entry breakdowns — all in real time.
https://api.sharedsweepsapp.com
https://api-qa.sharedsweepsapp.com
The QA app and its corresponding base URL are intended for internal beta testing only — it may receive breaking changes at any time and is not recommended for building against. Only use it if you have been explicitly asked to test a pre-release feature.
Authentication
The Authorization header is required by the API schema but
authentication is not enforced yet. For now, simply pass
any non-empty string as the Bearer token — the value will be ignored.
Authorization: Bearer any-valueCommon Request Headers
| Header | Required | Description | Example |
|---|---|---|---|
Authorization |
Yes | JWT Bearer token | Bearer eyJhbGc... |
X-Shopify-Shop-Domain |
Yes | Your Shopify store domain | yourstore.myshopify.com |
Content-Type |
POST only | Must be application/json for POST requests |
application/json |
X-Order-Id |
Endpoint-specific | Shopify order GID (required by order endpoints) | gid://shopify/Order/123 |
Error Handling
All errors return a JSON body with an error field:
{ "error": "Description of what went wrong" }
| Error Message | Cause | Action |
|---|---|---|
Unauthorized |
Invalid or missing JWT token | Check your Authorization header |
Missing shop domain |
Missing X-Shopify-Shop-Domain
|
Add the required header |
Order not found |
Order doesn't exist in Shopify | Verify the order ID |
No active giveaway found for the shop |
No active giveaway configured | Contact support to set up a giveaway |
Endpoints
/products/settings
Returns the giveaway settings for all products in your store, including per-product entry multipliers, bonus entry amounts, active discount-code bonuses, and cart-subtotal thresholds.
giveawayId parameter will return settings specific to that
giveaway rather than the global shared settings.
| Parameter | Type | Required | Description |
|---|---|---|---|
giveawayId |
integer | optional | Fetch settings for a specific giveaway. Defaults to the currently active giveaway. |
curl -X GET
"https://api-qa.sharedsweepsapp.com/products/settings?giveawayId=1" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "X-Shopify-Shop-Domain:
yourstore.myshopify.com"
{ "giveawayMultiplier": 1, "products": [ { "productId":
"gid://shopify/Product/123456", "multiplier": 2, "bonusEntries": 10,
"isEligible": true, "updatedAt": "2025-12-08T00:00:00.000Z" } ],
"couponCodes": { "SAVE10": 5, "WELCOME": 10 },
"activeBonusEntryThresholds": [ { "subtotal": 100, "bonusEntries": 50,
"startDate": "2025-01-01T00:00:00.000Z", "endDate":
"2025-12-31T23:59:59.000Z" } ], "isActive": true, "shop":
"yourstore.myshopify.com" }
| Field | Type | Description |
|---|---|---|
giveawayMultiplier |
number | Global entry multiplier applied to all purchases |
products |
array | Per-product settings (see below) |
products[].productId |
string | Shopify product GID |
products[].multiplier |
number | Entry multiplier for this product |
products[].bonusEntries |
number | Flat bonus entries awarded when product is purchased |
products[].isEligible |
boolean | Whether the product earns entries |
couponCodes |
object | Map of coupon code → bonus entries granted when used |
activeBonusEntryThresholds |
array | Cart subtotal thresholds that grant bonus entries |
isActive |
boolean | Whether the giveaway is currently active |
/products/settings/batch/
Retrieve settings for multiple products in a single call. Ideal for storefront apps that need to display entry information for a collection of products at once.
| Field | Type | Required | Description |
|---|---|---|---|
productIds |
string[] | required | Array of Shopify product GIDs |
giveawayId |
string | optional | Giveaway ID to scope settings to |
curl -X POST
"https://api-qa.sharedsweepsapp.com/products/settings/batch/" \ -H
"Authorization: Bearer YOUR_JWT_TOKEN" \ -H "X-Shopify-Shop-Domain:
yourstore.myshopify.com" \ -H "Content-Type: application/json" \ -d '{
"productIds": [ "gid://shopify/Product/123456",
"gid://shopify/Product/789012" ], "giveawayId": "1" }'
{ "products": [ { "productId": "gid://shopify/Product/123456",
"isEligible": true, "multiplier": 2, "bonusEntries": 10 }, {
"productId": "gid://shopify/Product/789012", "isEligible": false,
"multiplier": 1, "bonusEntries": 0 } ], "couponCodes": { "SAVE10": 5 }
}
/customers/{customerId}/entries
Returns the total entries earned by a customer, along with a transaction-level breakdown and the associated Shopify orders. Use this to power entry-count widgets on account pages or post-purchase confirmation screens.
| Parameter | Type | Description |
|---|---|---|
customerId |
string |
Shopify Customer GID — e.g.
gid://shopify/Customer/123456
|
| Parameter | Type | Required | Description |
|---|---|---|---|
giveawayId |
integer | optional | Filter results to a specific giveaway |
curl -X GET \
"https://api-qa.sharedsweepsapp.com/customers/gid://shopify/Customer/123456/entries?giveawayId=1"
\ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H
"X-Shopify-Shop-Domain: yourstore.myshopify.com"
{ "customerID": "gid://shopify/Customer/123456", "shop":
"yourstore.myshopify.com", "totalEntriesEarned": 150, "wallets": [ {
"giveawayID": 1, "entriesEarned": 50, "createdAt":
"2025-12-01T10:30:00.000Z", "orderID": "gid://shopify/Order/789012" }
], "orders": [ { "id": "gid://shopify/Order/789012", "createdAt":
"2025-12-01T10:00:00.000Z", "totalPrice": "99.99" } ] }
| Field | Type | Description |
|---|---|---|
totalEntriesEarned |
number | Sum of all entries earned across all orders |
wallets |
array | One record per qualifying order showing entries per giveaway |
orders |
array | Shopify order details corresponding to wallet entries |
/get-entries-for-order
Returns the calculated entries for a specific order without writing anything to the database. Use this for previewing entry calculations or debugging configurations.
| Header | Required | Description |
|---|---|---|
X-Order-Id |
required |
Shopify Order GID — e.g. gid://shopify/Order/123456
|
| Field | Type | Required | Description |
|---|---|---|---|
giveawayId |
integer | optional | Evaluate against a specific giveaway |
curl -X POST
"https://api-qa.sharedsweepsapp.com/get-entries-for-order" \ -H
"Authorization: Bearer YOUR_JWT_TOKEN" \ -H "X-Shopify-Shop-Domain:
yourstore.myshopify.com" \ -H "X-Order-Id: gid://shopify/Order/123456"
\ -H "Content-Type: application/json" \ -d '{ "giveawayId": 1 }'
{ "data": { "entriesEarned": 50, "orderID":
"gid://shopify/Order/123456", "breakdown": { "baseEntries": 10,
"productMultipliers": 30, "bonusEntries": 10 } } }
| Field | Type | Description |
|---|---|---|
data.entriesEarned |
number | Total entries this order earns |
data.breakdown.baseEntries |
number | Base entries from the giveaway rate |
data.breakdown.productMultipliers |
number | Entries added by product-level multipliers |
data.breakdown.bonusEntries |
number | Entries from coupon codes or subtotal thresholds |
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success — response body contains requested data |
| 204 | No Content — request succeeded but there is nothing to return (e.g. order outside giveaway period) |
| 400 | Bad Request — missing or invalid parameters |
| 401 | Unauthorized — invalid or missing token |
| 404 | Not Found — resource does not exist |
| 409 | Conflict — business logic error (e.g. no active giveaway) |
| 500 | Internal Server Error — contact support if this persists |
CORS
All endpoints support Cross-Origin Resource Sharing for use in browser-based storefronts and Shopify theme extensions.
| Property | Value |
|---|---|
| Allowed Origins | * |
| Allowed Methods |
GET, POST, OPTIONS
|
| Allowed Headers |
Content-Type, Authorization,
X-Shopify-Shop-Domain, X-Order-Id
|
| Credentials | Supported |
Support
For API access, questions, or to report an issue:
Email:
dev@sharedsweeps.com
Shared Sweeps API v1.0 · © 2026 Shared Sweeps