Skip to content

Redeem a code for a character (user panel)

POST
/gameservers/v1/integration/promo/redeem
curl --request POST \
--url https://your-tenant.api.l2nx.app/gameservers/v1/integration/promo/redeem \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "characterId": 1, "code": "example", "serverId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "userId": "example" }'

Activates a promo code for the given character on behalf of the user panel. Authenticate with your tenant API key as Authorization: Bearer nx_api_.... HTTP 200 is returned for any business outcome — read outcome (SUCCESS / INVALID_CODE / ALREADY_REDEEMED / GROUP_ALREADY_USED / CHARACTER_NOT_FOUND). HTTP 503 means no reward was delivered and the code was not spent — retry after Retry-After seconds.

Media typeapplication/json
object
characterId
integer format: int64
> 0
code
required
string
>= 1 characters
serverId
required
string format: uuid
userId
string

Example generated

{
"characterId": 1,
"code": "example",
"serverId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"userId": "example"
}

Redeem processed; see outcome

Media type*/*
object
deliveryStatus
string
Allowed values: PENDING SENT FAILED
items
Array<object>
object
count
integer format: int32
>= 1
itemTemplateId
integer format: int64
> 0
name
string
outcome
string
Allowed values: SUCCESS INVALID_CODE ALREADY_REDEEMED GROUP_ALREADY_USED CHARACTER_NOT_FOUND

Bad Request

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Missing / invalid API key

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Key rejected: code is API_KEY_REVOKED, API_KEY_EXPIRED, TENANT_DISABLED, API_KEY_TENANT_MISMATCH or INSUFFICIENT_SCOPE

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Not Found

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Conflict

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Internal Server Error

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}

Game server offline or refused the reward mail before executing it (code = PROMO_REWARD_NOT_DELIVERED); nothing delivered, code not spent

Media typeapplication/problem+json
object
detail
string
instance
string format: uri
properties
object
key
additional properties
status
integer format: int32
title
string
type
string format: uri

Example generated

{
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
},
"status": 1,
"title": "example",
"type": "https://example.com"
}