1. Home
  2. Docs
  3. Kiwire ( v3 ) – API
  4. Voucher

Voucher



Create

Use POST method to create new subordinate resources.

Example request URIs

[POST] https://{{kiwire_ip}}/api/voucher/

Parameters Required

ParameterValueDescription
tenant_idstringTenant ID or Tenant name of the API key
remarkstringDescription or remark of the voucher generated.
profilestringThe profile associated with voucher to be generated.
prefixstringPrefix of the voucher to be generated.
quantityintegerThe number of voucher to be generated.
zonestringZone restriction to the voucher to be generated, so voucher create restricted to login from specific zone only.
expiry_datedatetimeValidity of voucher to be generated. Expiry are date for the voucher to set to expired for accounting purpose.
statusactive or suspend or expiredThe status of the voucher whether active or suspend or expired.



delete

Use DELETE method as the name applies to delete resources.

Example request URIs

[DELETE] https://{{kiwire_ip}}/api/voucher/{{id}}/




get

Use GET method to retrieve resource information only and not to modify it in any way.

Example request URIs

[GET] https://{{kiwire_ip}}/api/voucher/

[GET] https://{{kiwire_ip}}/api/voucher/{{id}}/

[GET] https://{{kiwire_ip}}/api/voucher/{{offset}}/{{limit}}/{{column}}/{{order}}/

Parameters Required


 ValueDescription
offsetintegerStart data count
limitintegerLimit data count
columnstringColumn name
orderdesc or ascSort the result set in ascending or descending order.

NOTE:

For GET method, if {{offset}}, {{limit}}, {{column}}, and {{order}} not provided then Kiwire will return default value eg :

https://{{kiwire_ip}}/api/voucher/0/10/id/desc/