1. MarketPlace
Game Loom
  • Game Loom
    • 👋 Welcome to Game Loom
  • Getting started
    • Introduction
    • 👤 Authentication
  • User Registration
    • Introduction
    • Get Countries
      GET
    • Get Cities
      GET
    • Single user registration
      POST
    • Bulk Register Users
      POST
  • Notifications
    • Overview
    • Receiving Event Notifications via Webhooks
    • Get All notifications for specific user
      GET
  • Rewards
    • Overview
    • Integrate with you reward system
    • Points
      • Record user point event
      • Get user points
      • Get Specific user point
    • Levels
      • Record user level event
      • Get user levels
      • Get Specific user level
    • Badges
      • Award badge to user
      • Get user badges
      • Get Specific user badge
  • Challenges (Gamification elements)
    • Introduction
    • Leaderboard
      • Get available leaderboards for user
      • Submit score to a leaderboard
      • Get user's leaderboard participation history
      • Get leaderboard details
      • Get leaderboard ranking
      • Get user's record for a leaderboard
      • Get user's entry history for a leaderboard
    • Survey
      • Overview
      • Get available surveys for user
      • Start a new survey participation
      • Get detailed user participation
      • Get user's survey participation history
      • Abandon survey participation
      • Save individual answer to survey question
      • Submit completed survey
      • Submit Survey with answers (One-Step Submission)
    • Quiz
      • Get available quizzes for user
      • Submit complete quiz answers
      • Get comprehensive user quiz history
      • Get comprehensive quiz attempt details
    • Open Challenge
      • Overview
      • Get available open challenges for user
      • Complete an open challenge
      • Get user's open challenge participation history
      • Get user open challenge by ID
    • Streak
      • Create a streak by external Id
      • Get a streak by ExternalId
      • Update own streak
      • Enable or disable own streak
      • Get User Streak Progress.
      • Post Streak Activity
    • Schemas
      • Survey Schame
  • MarketPlace
    • Overview
    • Flutter SDK
    • Marketplace
      • Browse available gifts for user
      • Get gift details
      • Redeem a gift
      • Get user's redemption history
    • Schemas
      • ProblemDetails
      • Pagination
  1. MarketPlace

Overview

Integrate the Marketplace into Your App#

Let your users browse and redeem gifts using their earned points — directly from your application.
GameLoom handles everything: stock management, point deduction, eligibility filtering, delivery tracking, and localization. You just need to call the API and display the results.

Integration Flow#

Here's the typical flow for integrating the marketplace into your app:

1. Show Available Gifts#

Call the browse endpoint to get gifts your user can see:
GET /api/v1/marketplace/user/{userKey}/gifts
Query parameters:
pageNumber (default: 1)
pageSize (default: 10, max: 100)
categoryId — filter by category (optional)
language — language code such as en or ar (optional). When set, name and imageUrl are resolved to that language. Falls back to the default value when no translation exists.
We automatically filter out gifts that are:
Out of stock or expired
Inactive or deleted
Targeted to a different user segment (based on their profile)
You'll get back a list of gifts with name, image, price (in points and/or SAR), stock info, and display settings.

2. Show Gift Details#

When the user taps on a gift, fetch the full details:
GET /api/v1/marketplace/user/{userKey}/gifts/{id}?language=ar
The response includes everything you need to build your detail page:
Price and stock information
Redemption message and redemption value (resolved to the requested language)
Whether customer info or delivery address is required
Important: Check these two flags before showing the redeem button:
collectCustomerInfo — if true, you'll need to collect the user's name and phone number
deliveryRequired — if true, you'll need to collect delivery name, phone, city, and address
If either flag is true, show the appropriate form fields before allowing redemption.

3. Redeem a Gift#

When the user confirms, call the redeem endpoint:
POST /api/v1/marketplace/user/{userKey}/redeem?language=ar
Each gift has a single linked point type. The system uses that point type automatically — no need to pass pointId.
Minimal request (no customer info or delivery needed):
{
  "giftId": "{{gift-id}}"
}
With customer info (when collectCustomerInfo: true):
{
  "giftId": "{{gift-id}}",
  "customerName": "Ahmed",
  "customerPhone": "+966501234567"
}
With delivery (when deliveryRequired: true):
{
  "giftId": "{{gift-id}}",
  "customerName": "Ahmed",
  "customerPhone": "+966501234567",
  "deliveryName": "Ahmed",
  "deliveryPhone": "+966501234567",
  "deliveryCity": "Riyadh",
  "deliveryAddress": "King Fahd Road, Building 42"
}
What happens on our side:
1.
We verify the user exists and is active
2.
We check the gift is available, in stock, and the user is eligible
3.
We check any per-user redemption limits
4.
We deduct points from the user's balance automatically
5.
We create a redemption record and return it to you
What you get back:
redemptionMessage — a success message to show the user (resolved to the requested language if localized)
redemptionValue — if the merchant set a coupon code, voucher, or link, it's here. Show it to the user.
deliveryStatus — "Pending" if the gift requires delivery, null if it doesn't
Full snapshot of the gift at the time of redemption (name, image, points spent)

4. Show Redemption History#

Let users view their past redemptions:
GET /api/v1/marketplace/user/{userKey}/redemptions
Each redemption includes the gift name, points spent, order status, and delivery status. Use this to build a "My Rewards" or "Order History" page.

Localization#

All user-facing endpoints accept an optional language query parameter (e.g. ?language=ar).
When a gift has localized content, the top-level fields (name, description, imageUrl, redemptionMessage) are resolved to the requested language. If no translation exists for that language, the default value is returned.
User endpoints return only the resolved strings — no raw localization map is exposed to end users.

What You Need to Handle#

Before Redeeming#

Check the gift's requirements from the detail endpoint:
FlagWhat to do
collectCustomerInfo: trueShow name + phone fields in your redeem form
deliveryRequired: trueShow delivery address fields in your redeem form
Neither is trueJust show a confirm button — no extra fields needed

Error Responses#

All errors return a standard format with an error code:
{
  "type": "GIFT_OUT_OF_STOCK",
  "title": "Gift is out of stock",
  "status": 400,
  "detail": "Gift is out of stock"
}
Set Accept-Language: ar to get Arabic error messages.
Error codes you should handle:
Error CodeWhen it happensSuggested UX
GIFT_NOT_FOUNDGift doesn't exist or was removedRemove from your list, show "no longer available"
GIFT_NOT_AVAILABLEGift is inactive or expiredDisable the redeem button, show "not available"
GIFT_OUT_OF_STOCKStock ran outDisable the redeem button, show "out of stock"
INSUFFICIENT_POINTSUser doesn't have enough pointsShow current balance and required points
MAX_REDEEM_LIMIT_REACHEDUser already redeemed the max timesHide redeem button, show "already redeemed"
CUSTOMER_INFO_REQUIREDMissing name/phoneShow the customer info form
DELIVERY_INFO_REQUIREDMissing delivery addressShow the delivery form
GIFT_NOT_TARGETED_FOR_USERUser isn't eligible for this targeted giftDon't show the gift (this shouldn't happen if you use the browse endpoint, which filters automatically)
USER_NOT_FOUND_OR_INACTIVEUser does not exist or is inactiveShow an error, verify user registration

API Reference#

MethodPathDescription
GET/api/v1/marketplace/user/{userKey}/giftsBrowse available gifts
GET/api/v1/marketplace/user/{userKey}/gifts/{id}Get gift details
POST/api/v1/marketplace/user/{userKey}/redeemRedeem a gift
GET/api/v1/marketplace/user/{userKey}/redemptionsGet redemption history
For full request/response schemas, see the individual endpoint pages.
Modified at 2026-04-17 18:39:35
Previous
MarketPlace
Next
Flutter SDK
Built with