api:iptv:whitelist:create
Table of Contents
API : Whitelist Get
Introduction
This request will create multiple whitelisted IPTV devices at once. Currently only supports tablets.
The ID and serial numbers of a whitelisted device are considered unique (although serial can be left as null). If the requester tries to create a whitelisted device with an already whitelisted ID/barcode or serial number, it will be skipped. If the requester has duplicate in the request body (either duplicate IDs or serial numbers), an error will be returned.
Request
| URL | https://api.telecomx.dk/iptv/whitelist/ | ||
|---|---|---|---|
| Method | POST | ||
| Access level | ADMIN. | ||
| Body | devices | Array<IpTvDeviceWhitelist> | List of whitelist devices to be created (see schema below) |
| warrantyDate | Date | Date of purchase, or when the warranty starts. | |
| invoiceNumber | String | Invoice number | |
| model | String | Model name of the given devices | |
Query examples
https://api.telecomx.dk/iptv/whitelist
IPTV Whitelist Schema
| JSON Object | ||
|---|---|---|
| _id | Id | Unique barcode, put as a sticker on every IPTV Business tablet. |
| serial | String | Unique serial number from the device. |
| warrantyDate | Date | Date the tablets were purchased, used for warranty purposes. |
| model | String | Model of the device. |
| date | Date | Date and time when the status message was added. |
| invoiceNumber | String | Invoice number |
Response
| JSON Object | ||
|---|---|---|
| success | Boolean | True if the request was successful |
| skipped | Number | Amount of requested devices which weren't whitelisted, because either their ID/Barcode or serial was already whitelisted. |
| whitelisted | Number | Amount of requested devices which were successfully whitelisted |
| total | Number | Amount of total whitelisted IPTV devices |
Example - normal
{ "success": true, "skipped": 18, "whitelisted": 89, "total": 156 },
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | devices | IPTV Devices not found |
| 409 | _id | Body contains duplicate IDs/barcodes. |
| 409 | serial | Body contains duplicate serials. |
| 422 | warrantyDate | Warranty date is not a valid date. |
| 500 | internal_error | <Unspecified> |
api/iptv/whitelist/create.txt · Last modified: 2020/10/27 08:18 by Joakim Andersen