1. Coupons - Admin
3enab
👨‍💼 Admin Application
  • 👤 User Application
  • 🏪 Vendor Application
  • 👨‍💼 Admin Application
  • 🚚 Delivery Application
  • Auth - Admin
    • Register a new admin
      POST
    • Login admin
      POST
    • Logout admin
      POST
    • Refresh access token
      POST
    • Send phone OTP
      POST
    • Verify phone OTP
      POST
    • Send password reset OTP
      POST
    • Verify password reset OTP
      POST
    • Reset password
      POST
  • Ads - Admin
    • Create a new advertisement
      POST
    • Update an advertisement
      PUT
    • Delete an advertisement
      DELETE
    • Upload advertisement image
      POST
    • Activate an advertisement
      PATCH
    • Deactivate an advertisement
      PATCH
    • Get all ads for admin
      GET
  • Coupons - Admin
    • Create a new coupon
      POST
    • Get all coupons
      GET
    • Get coupon by ID
      GET
    • Update coupon
      PUT
    • Delete coupon
      DELETE
    • Update coupon active status
      PATCH
  • Delivery Areas - Admin
    • Create a new delivery area
      POST
    • Get all delivery areas
      GET
    • Get delivery area by ID
      GET
    • Update delivery area
      PUT
    • Delete delivery area
      DELETE
  • Items - Admin
    • Get all items for admin
    • Create a new item
    • Get a single item by ID
    • Update an item
    • Delete an item
    • Upload item image
    • Update item availability
    • Update item group availability
    • Update item active status
    • Update item discount
    • Remove item discount
    • Apply discount to all vendor items
    • Remove discount from all vendor items
    • Update items order
    • Create a variant for an item
    • Get all variants of an item
    • Get all items (Direct Access - Public)
    • Get all items for a specific vendor (Direct Access - Public)
    • Get item by ID (Direct Access - Public)
  • Menu Categories - Admin
    • Get all menu categories for admin
    • Create menu category (Admin)
    • Get menu category by ID (Admin)
    • Update menu category (Admin)
    • Delete menu category (Admin)
    • Update menu category active status (Admin)
    • Update menu category order (Admin)
  • Rates - Admin
    • Get all ratings for a vendor (Admin)
    • Get a specific rating by ID (Admin)
    • Delete a rating (Admin)
  • Users - Admin
    • Get current admin user profile
    • Update current admin user profile
    • Delete current admin user account
    • Change admin user password
    • Get all users with pagination
    • Create user (Admin)
    • Reset user password (Admin)
    • Mark user phone as verified (Admin)
    • Get user by ID
    • Update user by ID
    • Delete user by ID
  • Vendor Categories - Admin
    • Create a new vendor category
    • Get all vendor categories
    • Get a vendor category by ID
    • Update a vendor category
    • Delete a vendor category
    • Upload vendor category image
    • Update vendor category active status
    • Reorder vendor categories
  • Vendors - Admin
    • Get all vendors for admin
    • Create vendor
    • Get vendor by ID
    • Update vendor
    • Delete vendor
    • Upload vendor logo
    • Update vendor active status
    • Update vendor availability status (Admin)
    • Update vendor free delivery status
    • Reorder vendors
    • Create or update vendor notice
    • Upload vendor cover image
    • Delete vendor notice
    • Delete vendor cover image
    • Upload notice image
    • Update vendor preparation time (Admin)
    • Delete notice image
  • Notifications - Admin
    • Send broadcast notification to users
    • Send notification to specific users
  • Versions - Admin
    • Create a new version
    • Get all versions
    • Get the latest version
    • Update a version
    • Delete a version
  • Orders - Admin
    • Get all orders (Admin)
    • Get order by ID (Admin)
    • Delete order permanently (Admin)
    • Cancel order by admin
  • App Notices - Admin
    • Create a new app notice
    • Get all app notices (paginated)
    • Get notice by ID
    • Update notice
    • Delete notice
    • Upload notice image
    • Delete notice image
  1. Coupons - Admin

Update coupon

PUT
/api/v1/admin/coupons/{couponId}
Admin-only endpoint to update a coupon

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Path Params

Body Params application/jsonRequired

Example
{
    "code": "AUTUMN2024",
    "type": "percentage",
    "value": 15,
    "minOrderValue": 150,
    "maxDiscountValue": 75,
    "description": "Autumn discount",
    "startDate": "2019-08-24T14:15:22.123Z",
    "endDate": "2019-08-24T14:15:22.123Z",
    "maxUsesPerUser": 2,
    "maxUses": 200,
    "allowedUser": "string",
    "vendors": [
        "string"
    ]
}

Responses

🟢200OK
application/json
Coupon updated successfully
Body

Example
{
    "status": "success",
    "message": "Coupon updated successfully",
    "data": {
        "coupon": {
            "_id": "64f1a2b3c4d5e6f7890a1234",
            "code": "SUMMER2024",
            "type": "percentage",
            "value": 20,
            "minOrderValue": 0,
            "maxDiscountValue": 0,
            "description": "Summer discount",
            "startDate": "2019-08-24T14:15:22.123Z",
            "endDate": "2019-08-24T14:15:22.123Z",
            "isActive": true,
            "maxUsesPerUser": 1,
            "maxUses": 100,
            "usedCount": 0,
            "allowedUser": null,
            "vendors": [],
            "createdAt": "2019-08-24T14:15:22.123Z",
            "updatedAt": "2019-08-24T14:15:22.123Z"
        }
    }
}
🟠400Bad Request
🟠404Not Found
🟠409Conflict
Modified at 2026-04-08 13:49:39
Previous
Get coupon by ID
Next
Delete coupon
Built with