In-game Rewards
Providing In-game Rewards
Any websites can provide in-game rewards into supporting games that are published by Noctua.
Note
The following document is for reward providers. To implement on the game-side, please consult this document
Listing player accounts
To deliver a reward, your system will need to specify the player account that will receive the reward. The following endpoint will provide a list of player accounts for a combination of game-id
and user-id
.
- Endpoint
https://sdk-api-v2.noctuaprojects.com/api/v1/players/{game-id}/{user-id}
- Method
GET
- Headers
X-API-KEY: <your-API-KEY>
Example response:
{
"success": true,
"data": [
{
"player_id": 485934,
"ingame_server_id": "srv8976",
"ingame_server_name": "Midgard",
"ingame_role_id": "gmu8950",
"ingame_username": "ZeroTwo"
}
]
}
Submitting rewards
Once you have the required information, you can submit rewards.
- Endpoint
https://sdk-api-v2.noctuaprojects.com/api/v1/rewards
- Method
POST
- Headers
X-API-KEY: <your-API-KEY>
Example request payload
{
"reference_id": "123", // E.g., DB record ID for cross check and audit
"game_id": 777,
"user_id": 678,
"player_id": 485934,
"role_id": "gmu8950",
"server_id": "srv8976",
"title": "Birthday Reward",
"body": "This is our gift to you.",
"type": "ingame_item",
"items": [
{
"id": "ingame_reward_id_123",
"product_id": "foobar.pack1",
"image_url": "https://upload.wikimedia.org/wikipedia/en/6/63/Feels_good_man.jpg",
"quantity": 1
}
]
}
Example response
{
"id": 12345678
}