Developer
PUT /merchant-vouchers/{id}

Update a merchant voucher

Merchants

Description

Update a merchant voucher.

Authentication Required: User must be authenticated and have the 'merchant' feature flag.

Authorization: Merchant users can only update vouchers for their own merchant account.

Parameters

id integer path required
Voucher ID

Request Body

required

application/json

Responses

200 Merchant voucher updated successfully
application/json
statusstring
Example: success
messagestring
Example: Merchant voucher updated successfully
dataobject
Example:
{
  "status": "success",
  "message": "Merchant voucher updated successfully",
  "data": {
    "id": 1,
    "merchant_id": 1,
    "code": "GLOBAL20",
    "valid_from": "2026-05-01",
    "valid_until": "2026-12-15",
    "usage_conditions": "20% off orders above 100 EUR.",
    "created_at": "2026-05-20T10:00:00Z",
    "updated_at": "2026-06-02T12:00:00Z"
  }
}
401 Authentication required
application/json
Example:
{
  "status": "error",
  "message": "Not authenticated or insufficient permissions"
}
404 Voucher not found
application/json
422 Validation error
application/json
Example:
{
  "status": "error",
  "message": "Failed to update merchant voucher",
  "errors": [
    {
      "path": "valid_until",
      "message": "must be greater than or equal to 2026-08-01"
    }
  ]
}