Skip to navigation

Update a voucher

Only the fields sent change. Null removes the holder cap or the expiry; the code cannot be null.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idintegerRequired>=1

The voucher’s id.

Request

This endpoint expects an object.
codestring or nullOptionalformat: "^[A-Za-z0-9_-]+$"3-64 characters
max_usersinteger or nullOptional>=1
expires_atdatetime or nullOptional

Response

The object after the update.
idinteger
codestring
voucher_group_idinteger
created_atdatetime
updated_atdatetime
max_usersinteger or nullOptional
expires_atdatetime or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
502
Bad Gateway Error
504
Gateway Timeout Error