Skip to main content
PUT
/
v1
/
coupons
Update coupon
curl --request PUT \
  --url https://api.example.com/v1/coupons
{
  "data": {
    "name": "PARTNERO25_UPDATED",
    "uuid_code": "coupon_123",
    "active": true,
    "coupon_discount_type": "percent",
    "coupon_discount_amount": 25,
    "coupon_duration_type": "months",
    "coupon_duration_value": 11,
    "redemption_specific_date_status": false,
    "redemption_specific_date_value": null,
    "redemption_times_status": true,
    "redemption_times_value": 24,
    "metadata": [],
    "additional_info": {
      "redemptions": [
        {
          "redeemed_at": "2025-05-07T17:53:32.000000Z",
          "transaction_key": "order_4561"
        }
      ]
    },
    "times_redeemed": 4,
    "created_at": "2025-05-07T17:43:26.000000Z",
    "updated_at": "2025-05-07T17:53:32.000000Z",
    "deleted_at": null
  },
  "status": 1,
  "message": "Coupon updated in the app successfully.",
  "synchronization_enabled": false,
  "synchronization_successful": false,
  "synchronization_message": ""
}

Endpoint

PUT https://api.partnero.com/v1/coupons

Request Body

ParameterTypeRequiredDescription
uuid_codestringYesCoupon’s unique identifier
namestringNoUpdated customer-facing name
metadataobjectNoCustom key-value pairs (merged into existing metadata)
redeembooleanNoWhen true, records a redemption: increments times_redeemed and appends an entry to additional_info.redemptions
transaction_keystringNoOptional transaction identifier paired with redeem. Must match the key of an existing transaction in this program (created via POST /v1/transactions). Used to deduplicate redemptions — if the same transaction_key was already recorded for this coupon, or no transaction with that key exists, the request is a silent no-op
syncobjectNoOptional object to assign a sync provider to a coupon that doesn’t have one yet. See Assigning a sync provider on update
sync.providerstringNoOne of stripe, shopify, woocommerce, paddle. Must be currently connected. Can only be set when the coupon currently has no sync provider
Promotion codes cannot be updated through this endpoint. Use the promotion code update endpoint instead.

Request

cURL
curl --location --request PUT 'https://api.partnero.com/v1/coupons' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "uuid_code": "coupon_123",
    "name": "PARTNERO25_UPDATED"
  }'

Assigning a sync provider on update

You can attach a sync provider to a coupon that was created without one. This is a one-way assignment: once a coupon has a sync provider, it cannot be changed or removed via the API.
cURL
curl --location --request PUT 'https://api.partnero.com/v1/coupons' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "uuid_code": "coupon_123",
    "sync": { "provider": "stripe" }
  }'
When you assign a provider this way, Partnero creates the coupon in that provider during this request (not just for subsequent updates). Validation errors:
  • 422 if the provider is not connected to the program:
    { "errors": { "sync.provider": ["stripe is not connected for this program."] } }
    
  • 422 if the coupon already has a different sync.provider:
    { "errors": { "sync.provider": ["sync.provider is already set on this coupon and cannot be changed."] } }
    

Record a redemption

To record a redemption against an existing coupon — useful when your checkout doesn’t run through a connected payment integration — set redeem to true and (optionally) pass the originating transaction_key so the redemption is not double-counted on retries.
cURL
curl --location --request PUT 'https://api.partnero.com/v1/coupons' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "uuid_code": "coupon_123",
    "redeem": true,
    "transaction_key": "order_4561"
  }'

Response

{
  "data": {
    "name": "PARTNERO25_UPDATED",
    "uuid_code": "coupon_123",
    "active": true,
    "coupon_discount_type": "percent",
    "coupon_discount_amount": 25,
    "coupon_duration_type": "months",
    "coupon_duration_value": 11,
    "redemption_specific_date_status": false,
    "redemption_specific_date_value": null,
    "redemption_times_status": true,
    "redemption_times_value": 24,
    "metadata": [],
    "additional_info": {
      "redemptions": [
        {
          "redeemed_at": "2025-05-07T17:53:32.000000Z",
          "transaction_key": "order_4561"
        }
      ]
    },
    "times_redeemed": 4,
    "created_at": "2025-05-07T17:43:26.000000Z",
    "updated_at": "2025-05-07T17:53:32.000000Z",
    "deleted_at": null
  },
  "status": 1,
  "message": "Coupon updated in the app successfully.",
  "synchronization_enabled": false,
  "synchronization_successful": false,
  "synchronization_message": ""
}