Skip to main content
PUT
/
coupons
Update a coupon
curl --request PUT \
  --url https://www.pushlapgrowth.com/api/v1/coupons \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "couponId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "couponType": "PERCENTAGE",
  "percentOff": 123,
  "amountOff": 123,
  "currency": "<string>",
  "duration": "once",
  "durationInMonths": 123,
  "maxRedemptions": 123,
  "limitToProducts": true,
  "productIds": [
    "<string>"
  ],
  "valid": true,
  "redeemBy": "2023-11-07T05:31:56Z"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "externalId": "<string>",
  "couponType": "PERCENTAGE",
  "percentOff": 123,
  "amountOff": 123,
  "currency": "<string>",
  "duration": "once",
  "durationInMonths": 123,
  "maxRedemptions": 123,
  "limitToProducts": true,
  "productIds": [
    "<string>"
  ],
  "valid": true,
  "redeemBy": "2023-11-07T05:31:56Z",
  "integrationType": "<string>",
  "affiliateProgramId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "promotionalCodes": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "code": "<string>",
      "couponId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "affiliateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "externalId": "<string>",
      "active": true,
      "expiresAt": "2023-11-07T05:31:56Z",
      "maxRedemptions": 123,
      "timesRedeemed": 123,
      "firstTimeOrder": true,
      "minimumAmount": 123,
      "minimumAmountCurrency": "<string>",
      "limitToCustomers": true,
      "customerId": "<string>",
      "limitToAffiliate": true,
      "isAutoGenerated": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "coupon": {},
      "affiliate": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "firstName": "<string>",
        "lastName": "<string>",
        "email": "jsmith@example.com"
      }
    }
  ]
}

Updating Coupons

Update an existing coupon’s properties. Changes to the coupon will affect all associated promotional codes.
Be careful when updating coupons that have active promotional codes. Changes to discount amounts or validity will affect all codes using this coupon.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Coupon update details

couponId
string<uuid>
required

The coupon ID to update

name
string

Name of the coupon

couponType
enum<string>

Type of discount

Available options:
PERCENTAGE,
FLAT
percentOff
number

Percentage off (1-100)

amountOff
number

Amount off

currency
string

Currency

duration
enum<string>

How long the discount applies

Available options:
once,
forever,
repeating
durationInMonths
integer

Number of months for repeating duration

maxRedemptions
integer

Maximum redemptions

limitToProducts
boolean

Limit to specific products

productIds
string[]

Product IDs

valid
boolean

Whether the coupon is valid

redeemBy
string<date-time>

Redeem by date

Response

Coupon updated successfully

id
string<uuid>

The coupon ID

name
string

Name of the coupon

externalId
string | null

External ID (e.g., Stripe coupon ID)

couponType
enum<string>

Type of discount - percentage or flat amount

Available options:
PERCENTAGE,
FLAT
percentOff
number | null

Percentage off (1-100) for percentage coupons

amountOff
number | null

Amount off for flat coupons

currency
string | null

Currency for flat amount coupons (e.g., USD, EUR)

duration
enum<string>

How long the discount applies

Available options:
once,
forever,
repeating
durationInMonths
integer | null

Number of months for repeating duration

maxRedemptions
integer | null

Maximum number of times this coupon can be redeemed

limitToProducts
boolean

Whether coupon is limited to specific products

productIds
string[]

Array of product IDs this coupon applies to

valid
boolean

Whether the coupon is currently valid

redeemBy
string<date-time> | null

Date by which the coupon must be redeemed

integrationType
string | null

Integration type (e.g., stripe, custom)

affiliateProgramId
string<uuid>

The affiliate program ID

createdAt
string<date-time>

Timestamp when the coupon was created

updatedAt
string<date-time>

Timestamp when the coupon was last updated

promotionalCodes
object[]

Promotional codes associated with this coupon

I