User Tools

Site Tools


api:iptv:package:list

API : IPTV : Package : List

Introduction

This will list the TV channel packages available for a resellers customers (when reseller and customer has feature IPTVPRIVATE), or for a business customer (when the customer has the feature IPTVBUSINESS).

A package is a collection of TV channels that a customer can subscribe to. It can contains as little as a single channel or as much as 1000 channels. The package also specifies how each channel should be received - base channel stream, DVB or via a locally available stream.

Request

URL https://api.telecomx.dk/iptv/package
Method GET
Access level VIEWER, MANAGER or OWNER if customer has feature IPTVBUSINESS
RESELLER if customer has IPTVPRIVATE
ADMIN
Query offset [optional] Index of the first package to return, default 0.
limit [optional] The number of channels to return, default 100, min 1, max 500.
filter [optional] To filter the packages, this can be used. Name is searched.
full [optional] If true, complete package settings objects will be returned instead of the condensed version.
customer [optional] Id of the reseller (IPTVPRIVATE), or customer (IPTVBUSINESS), or a TV customer (IPTVPRIVATE) to show packages for. Defaults to the users own customer.

If customer is an IPTVPRIVATE which gets packages from its parent reseller, then the full query is not available.

Query examples

https://api.telecomx.dk/iptv/package
https://api.telecomx.dk/iptv/package?offset=25&limit=50&filter=medium&full=true&customer=12345678901234567890ABCD

Response

JSON object
offset Index of the first package returned.
limit Number of packages to return. Note that the actual number of packages returned may be lower.
total Number of packages that can be returned when offset and limit is not considered. This is to be used for paging through the data.
packages Array of packages, see definition below.
Package object (JSON)
_id Id Unique id of the package.
name String Name of package.
main Boolean True if this package is a main package. A subscription can only contain 1 main package, and if a channel is in both a main package and an add-on package, the settings from the main package will be applied.
channels Number Number of channels in the package.
Package object if full=true (JSON)
_id Id Unique id of the package.
name String Name of package.
main Boolean True if this package is a main package. A subscription can only contain 1 main package, and if a channel is in both a main package and an add-on package, the settings from the main package will be applied.
channels Array List of channels (see IpTvChannels) that are part of the package.
channels[]._id Id Id of the channel.
channels[].type String Type of channel: BASE, DVB or LOCAL.

Note that properties holding no value may be omitted from the object.

Example - normal

{
  offset: 10,
  limit: 10,
  total: 23,
  packages:
  [
    {
      _id: '12345678901234567890ABCD',
      name 'Local channels',
      main: true,
      channels: 22
    },
    {
      ...
    }
  ]
}

Example - full=true

{
  offset: 10,
  limit: 10,
  total: 23,
  packages:
  [
    {
      _id: '12345678901234567890ABCD',
      name 'Local channels',
      main: true,
      channels: [
        { type: 'BASE', _id: '12345678901234567890BBBB' },
        { type: 'DVB', _id: '12345678901234567890CCCC' }
      ]
    },
    {
      ...
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 not_found Customer does not have IPTV
500 internal_error <Unspecified>
api/iptv/package/list.txt · Last modified: 2017/02/21 06:38 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki