Coupon Codes
Create a new coupon code
Changed onpost/coupon-codes
Request
- Base URLhttps://api.session.services
- AuthAPI key in header x-tenant-id
Request body
object required
name, string required
The code string that customers enter to redeem the coupon.
active, boolean required
Whether this coupon code is currently enabled for use.
couponId, string required
Identifier of the coupon to which this code belongs.
teamId, string required
Team that created this coupon code.
Example request
{
"name": "TEST50",
"active": true,
"couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
}Response
OK
object required
couponCode, Coupon Code required
coupon-code
Example response
{
"couponCode": {
"id": "cod_01jps5cgsfzftw7hxcvr2wftk2",
"createdAt": "2026-12-02T02:43:23.597Z",
"updatedAt": "2026-12-02T02:43:23.597Z",
"name": "TEST50",
"active": true,
"couponId": "cpn_01jps5cgsfzs1ksqaet5hba8ac"
}
}Changes
- breaking
the
couponCode/createdAtresponse's property format changed fromdate-timeto no format for status - breaking
the
couponCode/updatedAtresponse's property format changed fromdate-timeto no format for status - breaking
the
couponCode/usesresponse's property type changed fromintegertonumberfor status
- breaking