Update Voucher

Use this endpoint to update specific fields of a voucher.

PATCH https://api.e-guma.ch/v1/vouchers/{code}.json?apikey={api-key}

Parameters

ParameterDescription
coderequired - The alphanumeric code of the voucher. The code has 12 characters. You can pass the code with (e.g. ABCD-ABCD-ABCD) or without (e.g. ABCDABCDABCD) dashes. Please use url_encode for the code as it might contain special characters.
api-keyrequired - The API key required to authenticate the request.

POST Data

ParameterDescription
expire_dateThe new expire date (ISO 8601 format).

Return

codeThe same voucher code as you provided as parameter
messageA message informing you that the voucher has been updated.

Example

PATCH https://api.e-guma.ch/v1/vouchers/QH5MR5565577.json?apikey=510e32c594d84816a4af9df1
{
  "expire_date": "2030-08-01"
}
{
    "code": "QH5MR5565577",
    "message": "Voucher successfully updated",
}