---
title: "Update a voucher"
method: PUT
path: "/api/business/{businessId}/voucher/{voucherId}"
tags: ["Voucher"]
---

# Update a voucher

`PUT /api/business/{businessId}/voucher/{voucherId}`

## Request

- Base URL: `http://api-gateway-eu.phorest.com/third-party-api-server`
- URL: `http://api-gateway-eu.phorest.com/third-party-api-server/api/business/{businessId}/voucher/{voucherId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/phorest/apis/third-party-api/docs/api/business/:businessId/voucher/:voucherId/put.ts> (a function with typed inputs; its response is checked against the schema)

Update and return a voucher for the specified business id and voucher id. Currently only voucher's remaining balance is updatable

## Path parameters

- `businessId` string, required
- `voucherId` string, required

## Request body

- VoucherUpdateRequest
  - `remainingBalance` number, required

## Response `200`

Voucher updated successfully

- VoucherResponse
  - `serialNumber` string
  - `issueDate` string, date-time, required
  - `expiryDate` string, date-time, required
  - `clientId` string
  - `creatingBranchId` string, required
  - `originalBalance` number, required
  - `notes` string
  - `voucherId` string
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `remainingBalance` number

## Other responses

- `400`: Bad Request
- `404`: Business or voucher with the specified ids don't exist
- `429`: Request rate limit exceeded. Current limit set to 100 rps.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/phorest/apis/third-party-api.md) - [All operations](https://skmtc.dev/phorest/apis/third-party-api/llms.txt) - [OpenAPI document](https://skmtc.dev/phorest/apis/third-party-api/revisions/beea6ef29634?raw)
