Omada Open API for creating voucher groups

Omada Open API for creating voucher groups

Omada Open API for creating voucher groups
Omada Open API for creating voucher groups
Friday
Model: OC200  
Hardware Version: V1
Firmware Version:

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!

  0      
  0      
#1
Options
1 Reply
Re:Omada Open API for creating voucher groups
12 hours ago - last edited 12 hours ago

Hi  @Nas3155 

 

Thanks for posting here.

 

What's the firmware version of the controller you are using? Please first update it to the latest one.

 

Please refer to the document in the controller's interface to configure it:

 

  0  
  0  
#2
Options