Omada Open API for creating voucher groups
Hey,
Maybe someone experienced this issue and would be able to help,
im trying to create a command (Open API or WEB API) to create (also to manage and delete) vouchers,
my goal is to automatically make voucher codes that are valid for 1 day, so that the guests dont keep access for long periods of time.
im currently trying to use OpenAPI to authenticate and create a new voucher group,
but i keep getting a weird error:
{
"errorCode": -1,
"msg": "General error."
}
this is my request:
POST to {{API_address}}/openapi/v1/{{omadacId}}/sites/{{siteId}}/hotspot/voucher-groups
body:
{
"name": "Automatic-Voucher",
"amount": 1,
"codeLength": 6,
"codeForm": [
0
],
"limitType": 2,
"durationType": 1,
"duration": 1440,
"timingType": 0,
"rateLimit": {
"mode": 0,
"customRateLimit": {
"downLimitEnable": false,
"downLimit": 0,
"upLimitEnable": false,
"upLimit": 0
}
},
"trafficLimitEnable": false,
"applyToAllPortals": true,
"validityType": 0
}
appreciat the help!

