- Last Updated
Integrated Coupon Box Redemption API
Introduction
Redeems a coupon from the coupon box.
Basic Information
text
POST /coupon/v3.0/{user_token_type}/couponbox/use
Host:
https://api.onstove.com (LIVE)
https://api.gate8.com (SB)
Content-Type: application/json
Request
Header
| Name | Type | Required | Default Value | Example | Description |
|---|---|---|---|---|---|
| Authorization | String | Y | - | Access token issued through user authentication. |
Path Variable
| Name | Type | Required | Default Value | Example | Description |
|---|---|---|---|---|---|
| user_token_type | string | Y | - | web | User token type; all token types are supported. |
Parameter
| Name | Type | Required | Default Value | Example | Description |
|---|---|---|---|---|---|
| game_code | string | Y | - | STOVE_ID | Game ID assigned by the platform. |
| coupon_box_id | Int64 | Y | - | 10169 | Coupon box serial number |
| world_no | String | N | - | 1 | Game world number |
| character_no | String | N | - | 52345642 | Member character number |
| client_ipaddr | String | Y | - | 10.5.24.52 | Member's access IP address |
| lang_code | String | Y | - | ko | Language code |
Response
Body
| Name | Type | Required | Default Value | Example | Description |
|---|---|---|---|---|---|
| result | String | Y | - | 000 | Response code |
| message | String | Y | - | OK | Response message |
| value | Boolean | Y | - | true | Response value |
Sample
Request
text
curl --location --request POST 'https://api.onstove.com/coupon/v3.0/web/couponbox/use' \
--header 'Authorization: Bearer {{access_token}}'
{
"lang_code": "KO",
"game_code" : "STOVE_ID",
"coupon_box_id":3,
"world_no":"world1",
"character_no":"456",
"client_ipaddr": "127.0.0.1"
}
Response
Successful response example
text
{
"value": true,
"result": "000",
"message": "OK"
}
Failed response example
text
{
"result": "5105",
"message": "Invalid coupon code. Please check the coupon code. (1 failed attempt)"
}
Return Code
| HTTP Status code | Code | Message | Description |
|---|---|---|---|
| 200 | 999 | unexpected error | System error |
| 401 | 999 | Authorization has been denied for this request | |
| 401 | 40101 | invalid token | Token cannot be decrypted. |
| 401 | 40102 | invalid token | Token was decrypted, but the format is invalid. |
| 401 | 40103 | expired token | Token has expired. |
| 401 | 40104 | expired token | Token expired because an administrator invalidated it. |
| 500 | 50000 | internal error | Service failure, such as a database connection failure. |
| 200 | 6007 | Coupon not found (coupon box ID does not exist). | - |
| 200 | 6008 | This coupon does not belong to the user. | - |
| 200 | 6009 | The coupon cannot be redeemed on this date. | - |
| 200 | 6032 | The coupon redemption limit has been exceeded. | - |
| 200 | 7014 | Please select a character. | Coupon requires character selection. |
| 200 | 6010 | This coupon cannot be redeemed in this world. | - |
| 200 | 5162 | This coupon cannot be redeemed in this country. | - |
| 200 | Other | Internal Error | Internal error: Contact the STOVE technical PM team. |
Contact Us
If you have any questions, please contact us on Discord or by email at store.support@smilegate.com.