PUT
/
vouchers
/
{voucher_id}
curl --request PUT \
  --url https://api.live.paisr.tech/{version}/vouchers/{voucher_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "<string>",
  "type": "percentage",
  "code": "<string>",
  "amount": 2,
  "max_redeems": 500000.5,
  "expires": "<string>"
}'
{
  "success": true,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

voucher_id
string
required

The Voucher ID.

Body

application/json
The details required to update a voucher.
description
string

Short description about the voucher.

type
enum<string>
Available options:
percentage,
fixed
Example:

"percentage"

code
string

Unique code that will be shared with customers.

amount
number

Discount amount.

Required range: x >= 1
max_redeems
number

Max number of redeems.

Required range: 1 <= x <= 1000000
expires
string

Expiration date in relative time. (e.g. 'In 3 days')

Response

200
application/json
Successfully updated voucher.
success
boolean

Indicates if the request was successful.

message
string

A descriptive message regarding the result.