Skip to content

Voucher ​

29 operations. Call any of them with omada_call_operation (or, in full tool mode, as a tool named by its operationId).

OperationMethodSummary
exportVouchersWithSiteByCloudAccessPOSTExport voucher list to file
uploadVoucherLogoPOSTUpload voucher logo
getVoucherLogoGETGet voucher logo
modifyHotspotSettingPATCHModify voucher currency
getVoucherGroupOptionsGETGet voucher group options
getGridVoucherGroupsGETGet Voucher Group List
createVoucherGroupPOSTCreate a new Voucher Group
deleteVoucherGroupDELETEDelete an existing Voucher Group
getVoucherGroupDetailGETGet Voucher Group Detail
clearInvalidVouchersInaGroupDELETEDelete expired vouchers in a voucher group
editVoucherGroupPatternPATCHEdit voucher group pattern
printVoucherGroupGETGet unused vouchers in voucher group
clearInvalidVouchersInSelectedGroupsPOSTDelete expired vouchers in voucher groups
deleteSelectedVoucherGroupsPOSTDelete selected Voucher Groups
printSelectedVoucherGroupsPOSTGet unused vouchers in selected voucher groups
getGroupConfigLimitGETGet voucher group config limit
getVoucherCurrencyCandidatesGETGet voucher currency candidates
deleteVoucherDELETEDelete an existing voucher
getVoucherGETGet a voucher
deleteVouchersPOSTDelete selected vouchers
printVouchersPOSTGet selected vouchers in a voucher group
getVoucherHistoryStatisticsGETGet voucher history statistics
getVoucherDistributionByDurationGETGet voucher distribution by duration
getVoucherDistributionByDurationForGroupGETGet voucher distribution of voucher group by duration
getVoucherDistributionByPriceGETGet voucher distribution by price
getVoucherDistributionByPriceForGroupGETGet voucher distribution of voucher group by price
getVoucherHistoryStatisticsForGroupGETGet voucher history statistics of voucher group
getAllTimeVoucherSummaryGETGet voucher summary
getAllTimeVoucherSummaryForGroupGETGet voucher summary for voucher group

exportVouchersWithSiteByCloudAccess ​

POST /openapi/v1/{omadacId}/files/hotspot/sites/{siteId}/vouchers/export

Export voucher list to file

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema ExportVoucherOpenApiVO

FieldTypeRequiredDescription
formatintegeryesExport file format, should be a value as follows: 0: csv, 1: xlsx
queryDataOpenApiQueryDataVOno(OpenApiQueryDataVO not expanded; call omada_get_schema "OpenApiQueryDataVO")
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected
groupIdsarray<string>noID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
json
// omada_call_operation
{
  "operationId": "exportVouchersWithSiteByCloudAccess",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Export voucher list to file.
The interface requires one of the permissions:
Site Export Data Access
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/files/voucher/logos

Upload voucher logo

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — multipart/form-data (optional). File field(s): file.

Other form fields (sent as JSON parts): data.

json
// omada_call_operation
{
  "operationId": "uploadVoucherLogo",
  "params": {
    "siteId": "<siteId>"
  },
  "body": {
    "data": "{...}"
  },
  "files": {
    "file": {
      "path": "/path/to/file"
    }
  }
}
Details, permissions and error codes

Upload voucher logo
The interface requires one of the permissions:
Site Hotspot Manager Modify

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/files/voucher/logos/{picId}

Get voucher logo

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
picIdpathstringyesVoucher logo picture id
json
// omada_call_operation
{
  "operationId": "getVoucherLogo",
  "params": {
    "siteId": "<siteId>",
    "picId": "<picId>"
  }
}
Details, permissions and error codes

Get voucher logo
The interface requires one of the permissions:
Site Hotspot Manager View Only

modifyHotspotSetting ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/hotspot/setting

Modify voucher currency

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema HotspotSiteSettingOpenApiVO

FieldTypeRequiredDescription
currencystringnoCurrency Short Code of voucher. For the values of Currency Short Code, refer to section 5.4.2 of the Open API Access Guide.
json
// omada_call_operation
{
  "operationId": "modifyHotspotSetting",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Modify voucher currency of the site.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherGroupOptions ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-group-options

Get voucher group options

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
json
// omada_call_operation
{
  "operationId": "getVoucherGroupOptions",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get voucher group options.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getGridVoucherGroups ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups

Get Voucher Group List

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
sorts.namequerystringnoSort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect
sorts.createTimequerystringnoSort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect
filters.timeStartqueryintegernoFilter query parameters, support field time range: start timestamp (ms).
filters.timeEndqueryintegernoFilter query parameters, support field time range: end timestamp (ms).
searchKeyquerystringnoFuzzy query parameters, support field name
json
// omada_call_operation
{
  "operationId": "getGridVoucherGroups",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get Voucher Group List with the given params.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

createVoucherGroup ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups

Create a new Voucher Group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema CreateVoucherGroupOpenApiVO

FieldTypeRequiredDescription
namestringyesVoucher group name. It should contain 1-32 characters
amountintegeryesThe amount of vouchers created. It should be within the range of 1-5000
codeLengthintegeryesThe length of voucher code. It should be within the range of 6–10.
codeFormarray<integer>yesThe character types contained in the voucher code. It should be a value as follows: 0: Number, 1: Letter. For example, [0] indicates that the code only contains numbers; [0, 1] indicates that the code contains numbers and letters
limitTypeintegeryesThe limitations of the voucher. It should be a value as follows: 0: Limited Usage Counts, 1: Limited Online Users, 2: Unlimited
limitNumintegernoThe number of limitations. It should be within the range of 1–999. If Parameter [limitType] is 0 or 1, [limitNum] should not be null.When Parameter [limitType] is 0, [limitNum] represents the maximum number of times this voucher can be used.When Parameter [limitType] is 1, [limitNum] represents the maximum number of users this voucher can be used at the same time.
durationTypeintegeryesThe duration type of the voucher. It should be a value as follows: 0: Client duration, each client expires after the duration is used. 1: Voucher duration, after reaching the voucher duration, clients using the voucher will expire
durationintegeryesDuration of one use, unit: minute. It should be within the range of 1–14400000.
timingTypeintegeryesThe timing type of the voucher. It should be a value as follows: 0: Timing by time, clients can use vouchers for specified time duration. 1: Timing by usage, clients can use vouchers for the duration of actual usage
rateLimitRateLimitOpenApiVOyes(RateLimitOpenApiVO not expanded; call omada_get_schema "RateLimitOpenApiVO")
trafficLimitEnablebooleanyesWhether to enable traffic limit
trafficLimitintegernoTraffic limit in MB. It should be within the range of 1–10485760
trafficLimitFrequencyintegernoFrequency of traffic limit should be a value as follows: 0: total; 1: daily; 2: weekly; 3: monthly.
unitPriceintegernoPrice of single voucher. It should be within the range of 1–999999999
currencystringnoCurrency Short Code of voucher. For the values of Currency Short Code, refer to section 5.4.2 of the Open API Access Guide.
applyToAllPortalsbooleanyesIs the voucher effective for all portals, including all newly created portals
portalsarray<string>noBound portal ID list. Portal can be created using 'Add portal' interface, and portal ID can be obtained from 'Get portal list in a site' interface
expirationTimeintegernoThe timestamp of the expiration of the voucher, unit: millisecond. When parameter [validityType] is 1, parameter [expirationTime] is required
effectiveTimeintegernoThe timestamp when the voucher takes effect, unit: millisecond. When parameter [validityType] is 1, parameter [effectiveTime] is required
logoutbooleannoWhether the voucher support portal logout functionality
descriptionstringnoDescription of the voucher group
printCommentsstringnoPrint comments of the voucher group
validityTypeintegernoThe validity type of the voucher. It should be a value as follows: 0: Voucher can be used at any time, parameter [effectiveTime], [expirationTime] and [schedule] should be null. 1: Voucher can be used between the effective time and expiration time, parameter [effectiveTime] and [expirationTime] should not be null, parameter [schedule] should be null. 2: Voucher can be used within a specified time period by schedule, parameter [effectiveTime] and [expirationTime] should be null, parameter [schedule] should not be null
scheduleVoucherScheduleOpenApiVOno(VoucherScheduleOpenApiVO not expanded; call omada_get_schema "VoucherScheduleOpenApiVO")
json
// omada_call_operation
{
  "operationId": "createVoucherGroup",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Create a Voucher Group with the given params.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-33732 - The Rate Limit profile does not exist.
-42010 - The number of vouchers has reached the limit. New vouchers cannot be created.
-42036 - Please select at least one portal before creating vouchers.
-42059 - Duplicated voucher group name.
-42060 - Currency is not supported.
-42061 - You are creating voucher groups with different currency in same site, this will prevent collecting incoming amount of vouchers.
-42062 - One or more portals may not exist.
-42063 - The expiration time cannot exceed 1000 days.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

deleteVoucherGroup ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/{groupId}

Delete an existing Voucher Group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher Group ID
json
// omada_call_operation
{
  "operationId": "deleteVoucherGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  }
}
Details, permissions and error codes

Delete an existing Voucher Group with the given params.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherGroupDetail ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/{groupId}

Get Voucher Group Detail

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher Group ID
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
sorts.codequerystringnoSort parameter may be one of asc or desc. Optional parameter. If it is not carried, it means it is not sorted by this field. When there are more than one, the first one takes effect
filters.statusqueryintegernoFilter query parameters, support field status for vouchers in the voucher group: 0: unused vouchers, 1: in-use vouchers, 2: expired vouchers
searchKeyquerystringnoFuzzy query parameters, support field code
json
// omada_call_operation
{
  "operationId": "getVoucherGroupDetail",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  }
}
Details, permissions and error codes

Get Voucher Group Detail with the given params.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

clearInvalidVouchersInaGroup ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/{groupId}/clear-invalid

Delete expired vouchers in a voucher group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher Group ID
json
// omada_call_operation
{
  "operationId": "clearInvalidVouchersInaGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  }
}
Details, permissions and error codes

Delete expired vouchers in a voucher group.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

editVoucherGroupPattern ​

PATCH /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/{groupId}/pattern

Edit voucher group pattern

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher group ID

Request body — application/json (required) — schema EditVoucherGroupPatternOpenApiVO

FieldTypeRequiredDescription
patternTypeintegerno0: Logo, 1: Title, 2: Disable
positionintegerno0: Left, 1: Right, 2: Middle
logoPictureIdstringnoLogo picture ID
logoSizeintegernoLogo size. It should be within the range of 50-175
titlestringnoVoucher title
titleSizeintegernoVoucher title size. It should be within the range of 12-18
ssidNetworkenablebooleannoWhether to print SSIDs and networks on the pattern of the voucher
ssidListarray<string>noSSID list on the pattern of the voucher
networkListarray<string>noNetwork list on the pattern of the voucher
durationEnablebooleannoWhether to print duration of the voucher
limitEnablebooleannoWhether to print limit information of the voucher
printCommentsstringnoComments to print on the voucher
json
// omada_call_operation
{
  "operationId": "editVoucherGroupPattern",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Edit vouvhcer group pattern.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-34338 - Some SSIDs do not exist.
-34340 - Some lan networks do not exist.
-42068 - Wrong SSID or Network was selected in the Voucher pattern.
-42069 - The Logo image of the Voucher pattern does not exist.

printVoucherGroup ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/{groupId}/print-unused

Get unused vouchers in voucher group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher Group ID
json
// omada_call_operation
{
  "operationId": "printVoucherGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  }
}
Details, permissions and error codes

Get unused vouchers brief information in a voucher group.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

clearInvalidVouchersInSelectedGroups ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/batch/clear-invalid

Delete expired vouchers in voucher groups

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema SelectVoucherGroupOpenApiVO

FieldTypeRequiredDescription
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected
groupIdsarray<string>noID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
searchKeystringnoFuzzy query parameters, support field: voucher group name, voucher code
timeStartintegernoEnd timestamp filter query parameters, unit: MS
json
// omada_call_operation
{
  "operationId": "clearInvalidVouchersInSelectedGroups",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Delete expired vouchers in selected voucher group.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

deleteSelectedVoucherGroups ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/batch/delete

Delete selected Voucher Groups

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema SelectVoucherGroupOpenApiVO

FieldTypeRequiredDescription
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected
groupIdsarray<string>noID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
searchKeystringnoFuzzy query parameters, support field: voucher group name, voucher code
timeStartintegernoEnd timestamp filter query parameters, unit: MS
json
// omada_call_operation
{
  "operationId": "deleteSelectedVoucherGroups",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Delete selected Voucher Groups with the given params.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

printSelectedVoucherGroups ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/batch/print-unused

Get unused vouchers in selected voucher groups

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema SelectVoucherGroupOpenApiVO

FieldTypeRequiredDescription
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all voucher groups, this selection does not pass parameter [groupIds]. 1: Parameter [groupIds] includes the IDs of the voucher groups to be selected. 2: Parameter [groupIds] includes the IDs of the voucher groups not to be selected
groupIdsarray<string>noID list of voucher groups. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
searchKeystringnoFuzzy query parameters, support field: voucher group name, voucher code
timeStartintegernoEnd timestamp filter query parameters, unit: MS
json
// omada_call_operation
{
  "operationId": "printSelectedVoucherGroups",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Get unused vouchers brief information in selected voucher groups.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getGroupConfigLimit ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/config-limit

Get voucher group config limit

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getGroupConfigLimit",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get voucher group config limit.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherCurrencyCandidates ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/voucher-groups/currency-list

Get voucher currency candidates

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getVoucherCurrencyCandidates",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get voucher currency candidates.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

deleteVoucher ​

DELETE /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/{id}

Delete an existing voucher

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
idpathstringyesVoucher ID
json
// omada_call_operation
{
  "operationId": "deleteVoucher",
  "params": {
    "siteId": "<siteId>",
    "id": "<id>"
  }
}
Details, permissions and error codes

Delete an existing voucher with the given params.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucher ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/{id}

Get a voucher

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
idpathstringyesVoucher ID
json
// omada_call_operation
{
  "operationId": "getVoucher",
  "params": {
    "siteId": "<siteId>",
    "id": "<id>"
  }
}
Details, permissions and error codes

Get a voucher with the given params.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

deleteVouchers ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/batch/delete

Delete selected vouchers

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema SelectIdsOpenApiVO

FieldTypeRequiredDescription
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all vouchers in the voucher group, this selection does not pass parameter [ids]. 1: Parameter [ids] includes the IDs of vouchers in the voucher group to be selected. 2: Parameter [ids] includes the IDs of vouchers in the voucher group not to be selected
idsarray<string>noID list of vouchers. Voucher can be created using 'Create Voucher Group' interface, and Voucher ID can be obtained from 'Get Voucher Group Detail' interface
groupIdstringyesVoucher Group ID. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
searchKeystringnoFuzzy query parameters, support field: voucher code
statusintegernovoucher status filter query parameters. It should be a value as follows: 0: Unused vouchers, 1: In use vouchers, 2: Expired vouchers
json
// omada_call_operation
{
  "operationId": "deleteVouchers",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Delete selected vouchers with the given params.
The interface requires one of the permissions:
Site Hotspot Manager Modify
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

printVouchers ​

POST /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/batch/print

Get selected vouchers in a voucher group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)

Request body — application/json (required) — schema SelectIdsOpenApiVO

FieldTypeRequiredDescription
typeintegeryesSelect type. It should be a value as follows: 0: Represents selecting all vouchers in the voucher group, this selection does not pass parameter [ids]. 1: Parameter [ids] includes the IDs of vouchers in the voucher group to be selected. 2: Parameter [ids] includes the IDs of vouchers in the voucher group not to be selected
idsarray<string>noID list of vouchers. Voucher can be created using 'Create Voucher Group' interface, and Voucher ID can be obtained from 'Get Voucher Group Detail' interface
groupIdstringyesVoucher Group ID. Voucher group can be created using 'Create Voucher Group' interface, and Voucher Group ID can be obtained from 'Get Voucher Group list' interface
searchKeystringnoFuzzy query parameters, support field: voucher code
statusintegernovoucher status filter query parameters. It should be a value as follows: 0: Unused vouchers, 1: In use vouchers, 2: Expired vouchers
json
// omada_call_operation
{
  "operationId": "printVouchers",
  "params": {
    "siteId": "<siteId>"
  },
  "body": "{...}"
}
Details, permissions and error codes

Get selected vouchers brief in a voucher group.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherHistoryStatistics ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history

Get voucher history statistics

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherHistoryStatistics",
  "params": {
    "siteId": "<siteId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher history statistics.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherDistributionByDuration ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history/distribution/duration

Get voucher distribution by duration

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherDistributionByDuration",
  "params": {
    "siteId": "<siteId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher distribution by duration.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherDistributionByDurationForGroup ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history/distribution/duration/voucher-groups/{groupId}

Get voucher distribution of voucher group by duration

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyes
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherDistributionByDurationForGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher distribution of voucher group by duration.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherDistributionByPrice ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history/distribution/unit-price

Get voucher distribution by price

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherDistributionByPrice",
  "params": {
    "siteId": "<siteId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher distribution by price.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherDistributionByPriceForGroup ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history/distribution/unit-price/voucher-groups/{groupId}

Get voucher distribution of voucher group by price

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyes
pagequeryintegernoStart page number. Start from 1. (default 1)
pageSizequeryintegernoNumber of entries per page. It should be within the range of 1–1000. (default 100)
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherDistributionByPriceForGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher distribution of voucher group by price.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getVoucherHistoryStatisticsForGroup ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/history/voucher-groups/{groupId}

Get voucher history statistics of voucher group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyes
filters.timeStartqueryintegeryesFilter query parameters, support field time range: start timestamp (second).
filters.timeEndqueryintegeryesFilter query parameters, support field time range: end timestamp (second).
json
// omada_call_operation
{
  "operationId": "getVoucherHistoryStatisticsForGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>",
    "filters.timeStart": "<filters.timeStart>",
    "filters.timeEnd": "<filters.timeEnd>"
  }
}
Details, permissions and error codes

Get voucher history statistics of voucher group.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getAllTimeVoucherSummary ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/summary

Get voucher summary

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
json
// omada_call_operation
{
  "operationId": "getAllTimeVoucherSummary",
  "params": {
    "siteId": "<siteId>"
  }
}
Details, permissions and error codes

Get voucher summary of all time in the site.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

getAllTimeVoucherSummaryForGroup ​

GET /openapi/v1/{omadacId}/sites/{siteId}/hotspot/vouchers/statistics/summary/voucher-groups/{groupId}

Get voucher summary for voucher group

ParameterInTypeRequiredDescription
omadacIdpathstringautoOmada ID (filled in automatically)
siteIdpathstringyesSite ID (site ID or site name)
groupIdpathstringyesVoucher group ID
json
// omada_call_operation
{
  "operationId": "getAllTimeVoucherSummaryForGroup",
  "params": {
    "siteId": "<siteId>",
    "groupId": "<groupId>"
  }
}
Details, permissions and error codes

Get voucher summary of all time in the voucher group.
The interface requires one of the permissions:
Site Hotspot Manager View Only
The possible error code for the interface in the returned body is one of the following error codes (non generic error codes):
-33000 - This site does not exist.
-33004 - Operation failed because other operations (site copying, restoring, template synchronizing, etc.) are being performed on this site. Please wait and try again later.
-44111 - The Grant Type is Invalid.
-44112 - The access token has expired. Please re-initiate the refreshToken process to obtain the access token.

Released under the MIT License. Not affiliated with or endorsed by TP-Link.