Update promo code
Update a promo code's redemption limits, expiration, active status, or plan restrictions.
Update a promo code's redemption limits, expiration, active status, or plan restrictions.
Authorization
ApiKeyAuth x-api-key<token>
In: header
Path Parameters
id*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
maxRedemptions?|null
expiresAt?|null
active?boolean
planIds?array<>
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/promo-codes/string" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "data": { "id": "string", "code": "string", "discountType": "percentage", "discountValue": -9007199254740991, "durationCycles": -9007199254740991, "maxRedemptions": -9007199254740991, "expiresAt": "2019-08-24T14:15:22Z", "isActive": true, "redemptionCount": -9007199254740991, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "object": "promo_code", "livemode": true }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}{ "success": false, "error": { "type": "string", "code": "string", "message": "string", "param": "string", "details": null, "doc_url": "string" }}