User Tools

Site Tools


api:iptv:package:update

API : IPTV : Package : Update

Introduction

This request will update an existing package.

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/PACKAGE_ID
Method POST
Access level MANAGER or OWNER if customer has feature IPTVBUSINESS
RESELLER if customer has IPTVBUSINESS or IPTVPRIVATE
ADMIN
Params PACKAGE_ID Id of the package
Body name String Name of package.
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.

As little as a single property can be specified, but arrays must always be complete.

Query example

{
  name: 'Local channels',
  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' }
  ]
}

Response

The updated 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 id Not found
422 name Name is missing
404 channels[]._id Channels 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/update.txt · Last modified: 2017/01/29 14:32 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki