Create
Use POST method to create new subordinate resources.
Example request URIs
[POST] https://{{kiwire_ip}}/api/voucher/
Parameters Required
Parameter | Value | Description |
---|---|---|
tenant_id | string | Tenant ID or Tenant name of the API key |
remark | string | Description or remark of the voucher generated. |
profile | string | The profile associated with voucher to be generated. |
prefix | string | Prefix of the voucher to be generated. |
quantity | integer | The number of voucher to be generated. |
zone | string | Zone restriction to the voucher to be generated, so voucher create restricted to login from specific zone only. |
expiry_date | datetime | Validity of voucher to be generated. Expiry are date for the voucher to set to expired for accounting purpose. |
status | active or suspend or expired | The 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
Value | Description | |
---|---|---|
offset | integer | Start data count |
limit | integer | Limit data count |
column | string | Column name |
order | desc or asc | Sort 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/