> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Voucher

> Update voucher properties (not balance)

Update voucher metadata and settings. To modify the balance, use the redeem or refund endpoints.

<ParamField header="Authorization" type="string" required>
  Bearer token with `marketing:write` scope
</ParamField>

<ParamField path="id" type="string" required>
  The voucher ID
</ParamField>

## Request body

All fields are optional. Only provided fields will be updated.

<ParamField body="status" type="string">
  Voucher status: `pending`, `active`, `depleted`, `expired`, `cancelled`, `suspended`
</ParamField>

<ParamField body="customer_id" type="string">
  Customer ID (or null to unassign)
</ParamField>

<ParamField body="expires_at" type="string">
  ISO 8601 expiry datetime (or null to remove)
</ParamField>

<ParamField body="is_transferable" type="boolean">
  Whether voucher can be used by different customers
</ParamField>

<ParamField body="metadata" type="object">
  Custom metadata (or null to remove)
</ParamField>

## Response

Returns the updated voucher object.

```bash Request theme={null}
curl -X PATCH "https://api.voyantcloud.com/v1/vouchers/voucher_abc123" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "cust_456",
    "is_transferable": false
  }'
```

```json Response theme={null}
{
  "data": {
    "id": "voucher_abc123",
    "code": "GC1A2B3C4D",
    "customerId": "cust_456",
    "isTransferable": false,
    "updatedAt": "2024-07-20T14:00:00Z"
  }
}
```

## Errors

| Status | Error               | Description                         |
| ------ | ------------------- | ----------------------------------- |
| 400    | No fields to update | Request body is empty               |
| 404    | Voucher not found   | No voucher exists with the given ID |
