Create coupon pool (draft)
Requires ADMIN.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string
Project (tenant) identifier. Row-level tenant isolation is enforced on every query.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
form
string
totalCount
required
integer
codeLength
integer
perUserLimit
integer
validityDays
integer
benefitsJson
object
key
additional properties
any
Responses
Section titled “Responses”Created pool.
Media typeapplication/json
object
pool
object
id
string
projectId
string
name
string
form
string
codeLength
integer
totalCount
integer
perUserLimit
integer
validityDays
integer | null
benefitsJson
string | null
status
string
createdAt
string
updatedAt
string
Missing/invalid path input (e.g. projectId) or invalid JSON body.
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Not authenticated (401 via requireAuthenticated) or insufficient project role (403).
Media typeapplication/json
object
error
required
Human-readable error message.
string
message
string
Examplegenerated
{ "error": "example", "message": "example"}Zod validation failed (error=‘参数校验失败’ with issues[]).
Media typeapplication/json
object
error
required
string
issues
Array<object>
object
path
string
message
string
details
Array<object>
object
key
additional properties
any
key
additional properties
any
Example
{ "error": "参数校验失败"}