v1
latestOpenAPI 3.1.02026-07-222392081.7 MBCoupons > Promotion codes
Update promotion code
Update the details of an existing promotion code.
patch/v1/promotion-codes/{id}
Path parameters
idstring required
Request body
Example request
{
"code": "PROMO123",
"customer_id": "cus_DKL4Xcb5VSa8CQ",
"plan_id": "plan_DKL4Xcb5VSa8CQ",
"product_id": "itm_DKL4Xcb5VSa8CQ",
"expires_at": "2021-01-01T00:00:00.000Z",
"max_redemptions": 10,
"duration_count": 1,
"duration_period": "months"
}Response
Example response
{
"id": "promo_DKL4Xcb5VSa8CQ",
"code": "PROMO123",
"coupon_id": "cou_DKL4Xcb5VSa8CQ",
"client_id": "cli_DKL4Xcb5VSa8CQ",
"customer_id": "cus_DKL4Xcb5VSa8CQ",
"plan_id": "plan_DKL4Xcb5VSa8CQ",
"product_id": "itm_DKL4Xcb5VSa8CQ",
"created_at": "2021-01-01T00:00:00.000Z",
"updated_at": "2021-01-01T00:00:00.000Z",
"expires_at": "2021-01-01T00:00:00.000Z",
"max_redemptions": 10,
"duration_count": 1,
"duration_period": "months"
}