VoucherCodes

Update a VoucherCode

Updates a VoucherCode in place. The two fields most commonly changed are valid_to_date (to extend or shorten the voucher's expiry window) and fulfillment_status (to record physical dispatch).

The voucher's status is recalculated automatically when valid_to_date is changed: pushing the date past today on an expired voucher will move it back to unredeemed (or partially_redeemed if there have been redemptions); setting the date before today on a non-revoked voucher will move it to expired. revoked vouchers are never reactivated by a valid_to_date change.

put/shop/voucher-codes/{voucherCodeId}

Request body

valid_to_datestring date-time

Extend or shorten the voucher's expiry. Setting a date in the past on an active voucher will move it to expired; setting a future date on an expired voucher will move it back to unredeemed (or partially_redeemed if there are prior redemptions). Must be an RFC 3339 timestamp.

fulfillment_statusstring

Override the fulfilment status — typically used to mark a physical voucher as dispatched after posting.

Example request

{
  "valid_to_date": "2027-01-01T23:59:59+00:00",
  "fulfillment_status": "dispatched"
}

Response

The VoucherCode was successfully updated.

Example response

{
  "data": {
    "code": "ABC123XYZ",
    "valid_from_date": "2026-01-01T00:00:00+00:00",
    "valid_to_date": "2027-01-01T00:00:00+00:00",
    "amount": 5000,
    "balance": 2500,
    "currency": "gbp",
    "value": 5000,
    "partially_redeemable": true,
    "uses_total": 7,
    "uses_remaining": 5,
    "fulfillment_status": "needs_dispatching",
    "voucher_type": {
      "name": "Spa Day Gift Voucher"
    },
    "recipient": {
      "name": "Jane Doe",
      "email": "jane@example.com"
    },
    "delivery": {
      "method": "post",
      "option": {
        "name": "First class mail",
        "price": 5000,
        "revenue_centre": "spa"
      }
    },
    "order": {
      "order_ref": "TRY00",
      "item_cost": 5000
    },
    "redemptions": [
      {
        "amount": 2500
      }
    ],
    "created_at": "2025-02-04T12:00:00+01:00",
    "issued_at": "2026-01-02T09:00:00+00:00"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.