Skip to content
v0.3

promotion.code.add

Add a coupon code to a promotion (N codes per promotion, each with its own usage ceiling).

  • Scope: promotion.write
  • System: no
  • Reachable from: POST /v1/commands/promotion.code.add (tenant credential) · MCP tool promotion.code.add · SDK client.call('promotion.code.add', …)
  • Events: promotion.updated
{
"properties": {
"code": {
"maxLength": 64,
"minLength": 3,
"pattern": "^[A-Za-z0-9._-]+$",
"type": "string"
},
"promotion_id": {
"minLength": 1,
"type": "string"
},
"usage_limit": {
"anyOf": [
{
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": [
"promotion_id",
"code"
],
"type": "object"
}
{
"additionalProperties": false,
"properties": {
"code_id": {
"type": "string"
}
},
"required": [
"code_id"
],
"type": "object"
}

validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)