User Tools

Site Tools


api:iptv:package:create

API : IPTV : Package : Create

Introduction

This request will create a new package that will be available to the resellers customer (if reseller and customer has feature IPTVPRIVATE) or to the business customer (if 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 POST
Access level MANAGER or OWNER if customer has feature IPTVBUSINESS
RESELLER if customer has IPTVBUSINESS or IPTVPRIVATE
ADMIN
Body 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.
customer Id Id of customer to create package for (reseller with feature IPTVPRIVATE or customer with feature IPTVBUSINESS).

Query example

{
  name: 'Local channels',
  main: true,
  channels:[
    { _id: '12345678901234567890AAAA', type: 'DVB' },
    { _id: '12345678901234567890AAAB', type: 'DVB' },
    { _id: '12345678901234567890AAAC', type: 'DVB' },
    { _id: '12345678901234567890AAAD', type: 'DVB' },
    { _id: '12345678901234567890AAAE', type: 'DVB' },
    { _id: '12345678901234567890AAAF', type: 'DVB' },
    { _id: '12345678901234567890AABB', type: 'DVB' },
    { _id: '12345678901234567890AABC', type: 'DVB' }
  ],
  customer: '12345678901234567890FFFF'
}

Response

The newly created package.

JSON object
_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

{
  _id: '12345678901234567890ABCD',
  name 'Local channels',
  main: true,
  channels: [
    { _id: '12345678901234567890AAAA', type: 'DVB' },
    { _id: '12345678901234567890AAAB', type: 'DVB' },
    { _id: '12345678901234567890AAAC', type: 'DVB' },
    { _id: '12345678901234567890AAAD', type: 'DVB' },
    { _id: '12345678901234567890AAAE', type: 'DVB' },
    { _id: '12345678901234567890AAAF', type: 'DVB' },
    { _id: '12345678901234567890AABB', type: 'DVB' },
    { _id: '12345678901234567890AABC', type: 'DVB' }
  ]
}

Errors

Error code Message Description
404 customer Customer not found
409 customer Customer cannot host common IPTV settings
404 name Name is missing
404 channels[]._id Channel not found
422 channels[].type Type is invalid
422 channels[].type Channel does not support type BASE
422 channels[].type Channel does not support type DVB
422 channels[].type Channel does not support type LOCAL
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/iptv/package/create.txt · Last modified: 2017/01/29 14:33 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki