User Tools

Site Tools


api:iptv:subscriptions:update

API : IPTV : Subscription : Update

Introduction

This request will set the subscription settings for a customer with the feature IPTVPRIVATE.

If the customer is a business customer with IPTVBUSINESS feature, then these settings are instead found on the devices and settings.

Request

URL https://api.telecomx.dk/iptv/subscription/CUSTOMER_ID
Method POST
Access level RESELLER if customer has the feature IPTVPRIVATE
ADMIN
Params CUSTOMER_ID Id of the customer to update
Body nPvr.override Boolean True to override resellers common nPvr settings.
nPvr.enabled Boolean True if nPVR is enabled, false if not, null if no override.
nPvr.storage Number Number of hours the customer may store. Null if no override.
nPvr.autoExpireDays Number Number of days before recordings are automatically deleted. Null if no override.
scrub Object Scrubbing overrides
scrub.override Boolean True to override channels scrubbing settings.
scrub.forward Boolean True forward scrubbing is allowed.
scrub.backward Boolean True backward scrubbing is allowed.
scrub.pause Boolean True pausing is allowed.
packages Array List of packages the customer subscribes to.
packages[]._id Id Id of the package.
packages[].start Date Date and time the package starts, defaults to now.
packages[].end Date Date and time the package expires and is removed. Null if no end.

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

Query example

{
  nPvr: {
    override: true,
    enabled: true,
    storage: 25,
    autoExpireDays: 180
  },
  scrub: {
    override: true,
    forward: true,
    backwars: true,
    pause: true
  },
  packages: [
    {
      _id: '1234567890123457890CCCC',
      start: '2016-01-01T00:00:00.000Z',
      end: '2016-01-01T00:00:00.000Z'
    },
    {
      _id: '12345678901234567890DDDD'
    }
  ]
}

Response

The updated subscription settings.

JSON object
nPvr.override Boolean True to override resellers common nPvr settings.
nPvr.enabled Boolean Is nPVR enabled. If not overridden, this is the default from the reseller.
nPvr.storage Number Number of hours the customer may store. If not overridden, this is the default from the reseller.
nPvr.autoExpireDays Number Number of days before recordings are automatically deleted. If not overridden, this is the default from the reseller.
scrub Object Scrubbing overrides
scrub.override Boolean True to override channels scrubbing settings.
scrub.forward Boolean True forward scrubbing is allowed.
scrub.backward Boolean True backward scrubbing is allowed.
scrub.pause Boolean True pausing is allowed.
packages Array List of packages the customer subscribes to.
packages[]._id Id Id of the package.
packages[].start Date Date and time the package starts, defaults to now.
packages[].end Date Date and time the package expires and is removed. Null if no end.

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

Example

{
  _id: ObjectId('1234578901234567890ABCD'),
  nPvr: {
    override: true,
    enabled: true,
    storage: 25,
    autoExpireDays: 180
  },
  scrub: {
    override: true,
    forward: true,
    backward: true,
    pause: true
  },
  packages: [
    {
      _id: ObjectId('1234567890123457890CCCC'),
      start: ISODate('2016-01-01T00:00:00.000Z'),
      end: ISODate('2016-01-01T00:00:00.000Z')
    },
    {
      _id: ObjectId('12345678901234567890DDDD')
    }
  ]
}

Errors

Error code Message Description
403 customer Customer does not have the IPTV
403 nPvr.override nPvr is not available
422 nPvr.storage Storage size must be between 1 and 999
422 nPvr.autoExpireDays Number of days must be between 1 and 365
404 packages[]._id Package not found
409 packages[]._id Package can only be included once
409 packages[]._id Only 1 main package is allowed
409 packages[].end Date is too far into the future - max 12 months
422 packages[].end End date cannot be before start date
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/iptv/subscriptions/update.txt · Last modified: 2021/01/25 09:10 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki