- Getting Started
- Architecture
- User
- Reward
- Collection
- Collectible
- Quest
- Leaderboard
- Leveling
Get rewards
Staging
https://testserver.loyi.io/public/api
Staging
https://testserver.loyi.io/public/api
GET
/collection/{id}/rewards
Collection
Request
Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Path Params
id
string <uuid>
required
Header Params
Origin
string
required
Default:
<WHITELISTED_URL>
Example:
https://example.com
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://testserver.loyi.io/public/api/collection//rewards' \
--header 'Origin;' \
--header 'x-api-key;'
Responses
🟢200OK
application/json
Body
array[null (Reward) {3}]
optional
object
CouponLinkUnique
Example:
{"id":"123e4567-e89b-12d3-a456-426655440000","code":null,"title":"Unique Coupon","description":"A special reward with unique coupons","instruction":"Use these coupons to get discounts","type":"CouponLinkUnique","link":"https://example.com","coupons":[{"code":"coupon1"},{"code":"coupon2"}],"createdAt":"2022-01-01T00:00:00.000Z","updatedAt":"2022-01-01T00:00:00.000Z"}
title
string
required
description
string
required
instruction
string
required
link
string <uri>
required
id
string <uuid>
required
type
enum<string>
required
Allowed value:
CouponLinkUnique
coupons
array [object {1}]
required
createdAt
string <date-time>
required
updatedAt
string <date-time>
required
object
CouponLinkGeneric
Example:
{"id":"123e4567-e89b-12d3-a456-426655440000","code":"GENERICCODE123","title":"Generic Coupon","description":"A general reward with a coupon code","instruction":"Use this coupon to get a discount","type":"CouponLinkGeneric","link":"https://example.com","createdAt":"2022-01-01T00:00:00.000Z","updatedAt":"2022-01-01T00:00:00.000Z"}
title
string
required
description
string
required
instruction
string
required
link
string <uri>
required
id
string <uuid>
required
type
enum<string>
required
Allowed value:
CouponLinkGeneric
code
string
required
createdAt
string <date-time>
required
updatedAt
string <date-time>
required
object
EntryPass
Example:
{"id":"123e4567-e89b-12d3-a456-426655440000","title":"Event Entry Pass","description":"An entry pass for the event","instruction":"Show this pass at the event entrance","type":"EntryPass","createdAt":"2022-01-01T00:00:00.000Z","updatedAt":"2022-01-01T00:00:00.000Z"}
title
string
required
description
string
required
instruction
string
required
id
string <uuid>
required
type
enum<string>
required
Allowed value:
EntryPass
createdAt
string <date-time>
required
updatedAt
string <date-time>
required
Example
[
{
"id": "123e4567-e89b-12d3-a456-426655440000",
"code": null,
"title": "Unique Coupon",
"description": "A special reward with unique coupons",
"instruction": "Use these coupons to get discounts",
"type": "CouponLinkUnique",
"link": "https://example.com",
"coupons": [
{
"code": "coupon1"
},
{
"code": "coupon2"
}
],
"createdAt": "2022-01-01T00:00:00.000Z",
"updatedAt": "2022-01-01T00:00:00.000Z"
}
]
🟠401Unauthorized
🟠404Record Not Found
Modified at 2025-06-19 21:23:41