Skip to main content
POST
Create a voucher

Authorizations

X-API-Key
string
header
required

Path Parameters

shopId
string
required

Shop ID (ObjectId)

Body

application/json
productId
string
required

Product ID (ObjectId)

Example:

"664f1a2b3c4d5e6f7a8b9c0d"

serverId
string
required

Server ID (ObjectId)

Example:

"664f1a2b3c4d5e6f7a8b9c0e"

code
string

Voucher code (auto-generated if omitted)

Example:

"ABC123"

expiresAt
string

Expiration date (ISO 8601)

Response

OK

success
boolean
Example:

true

data
object
message
string