Skip to main content
POST
/
v1
/
server
/
coupons
/
validate
Validate Coupon
curl --request POST \
  --url https://sdk-api.playcamp.io/v1/server/coupons/validate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "couponCode": "<string>",
  "userId": "<string>",
  "isTest": false
}
'
{
  "data": {
    "valid": true,
    "couponCode": "<string>",
    "reward": [
      {
        "itemName": {},
        "itemId": "<string>",
        "itemQuantity": 123
      }
    ],
    "itemName": {},
    "errorCode": "<string>",
    "errorMessage": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Server API Key (format: {keyId}:{secret})

Body

application/json
couponCode
string
required

Coupon code

userId
string
required

User ID

isTest
boolean
default:false

Test mode (does not create actual data)

Response

200 - application/json

Success

data
object
required

Coupon validation result (fields vary based on valid/invalid)