PATCH
/
v1
/
service
/
voucher
/
{voucherId}
curl --request PATCH \
  --url https://api.nxos.io/v1/service/voucher/{voucherId} \
  --header 'Content-Type: application/json' \
  --data '{
  "expires_at": "<string>",
  "status": "ACTIVE",
  "metadata": {}
}'
{
  "voucher_id": "<string>",
  "value": {
    "amount": "<string>",
    "asset_code": "<string>"
  },
  "expires_at": "<string>",
  "provider_name": "<string>",
  "funding_source_account": "<string>",
  "status": "ACTIVE"
}

Path Parameters

voucherId
string
required

The unique identifier of the voucher to update.

Body

application/json
The details of the voucher properties to be updated.
expires_at
string

The new expiration date of the voucher in ISO 8601 format. If provided, this will extend or shorten the voucher's validity period.

status
enum<string>

The new status of the voucher. This allows for manual state transitions, e.g., cancelling a voucher.

Available options:
ACTIVE,
PARTIALLY_REDEEMED,
FULLY_REDEEMED,
EXPIRED,
CANCELLED
metadata
object

Additional metadata or properties that can be updated. This is a flexible field to allow for future extensions without changing the API structure.

Response

200 - application/json
The updated Voucher object containing all relevant details.
voucher_id
string
required

Unique identifier for the voucher.

value
object
required

The value of the voucher.

expires_at
string
required

The expiration date of the voucher in ISO 8601 format.

provider_name
string
required

The name of the voucher provider or issuing system.

funding_source_account
string
required

The account ID from which funds were sourced to back the voucher.

status
enum<string>
required

The current status of the voucher.

Available options:
ACTIVE,
PARTIALLY_REDEEMED,
FULLY_REDEEMED,
EXPIRED,
CANCELLED