Skip to main content
PUT
/
wp-json
/
latepoint-api
/
v1
/
coupons
/
{code}

Path Parameters

code
string
required
The unique code of the coupon to update

Request Body Parameters

All parameters are optional. Only provided fields will be updated.
name
string
Display name for the coupon
description
string
Description of the coupon
discount_type
string
Type of discount. Available values: percent, fixed_amount
discount_value
number
Discount value (percentage or fixed amount)
status
string
Coupon status. Available values: active, inactive
active_from
string
Start date for coupon validity (YYYY-MM-DD format)
active_to
string
End date for coupon validity (YYYY-MM-DD format)
usage_limit
integer
Maximum number of uses (0 = unlimited)
min_order_amount
number
Minimum order amount required to use coupon
max_discount_amount
number
Maximum discount amount (for percentage discounts)

Example Request

PUT /wp-json/latepoint-api/v1/coupons/TEST2025
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "name": "Updated Test Coupon 2025",
  "description": "Updated test coupon for API testing",
  "discount_value": 20,
  "usage_limit": 100,
  "min_order_amount": 50
}

Response

{
  "success": true,
  "message": "Coupon updated successfully",
  "data": {
    "id": "7",
    "code": "TEST2025",
    "name": "Updated Test Coupon 2025",
    "description": "Updated test coupon for API testing",
    "discount_type": "percent",
    "discount_value": 20,
    "status": "active",
    "active_from": "0000-00-00",
    "active_to": "0000-00-00",
    "usage_limit": 100,
    "min_order_amount": 50,
    "max_discount_amount": null,
    "created_at": "2025-08-21 11:07:00",
    "updated_at": "2025-08-21 11:07:09"
  }
}
I