Table of Contents

API : IPTV : Service agreements : List

Introduction

This will list all Service agreements. They are global, and admin/resellerAdmin only

Request

URL https://api.telecomx.dk/iptv/serviceagreement
Method GET
Access level  RESELLER ADMIN, ADMIN
Query  offset [optional] Index of the first Service agreement to return, default is 0.
 limit  [optional] The number of Service agreements to return, default is 100.
filter  [optional] Used to filter Service agreements, name is searched.
 reseller  [optional] id of a reseller (24 hex-char string). Limits Service agreements to a reseller.

Query examples

https://api.telecomx.dk/iptv/serviceagreement
https://api.telecomx.dk/iptv/serviceagreement?offset=25&limit=50&filter=servicename&reseller=12345678901234567890ABCD

Response

JSON object
_id ObjectId  Unique ID of the service agreement
name  String  Name of the service agreement
serviceProduct  ObjectId Unique ID of product attached to service agreement
unitPrice  Number Price of the serviceProduct
reseller ObjectId Unique ID of the reseller that the service agreement concerns
resellerName  String  Name of selected reseller
remote Object Defines agreement about remote response time
remote.responseTime  Number Number of hours allowed before remote response. Allowed values are 1 , 3, 8, 24
remote.days String Which days remote response accounts for. Allowed values are 'WEEK_DAYS', 'WEEK_DAYS_AND_SATURDAY', 'ALL'
remote.period String Time period of accounted days. Allowed values are '07:45-16:00', '08:00-22:00', '00:00-23:59'
onsite Object Defines agreement about onsite response time
onsite.responseTime Number Number of hours allowed before onsite response. Allowed values are 1 , 3, 8, 24
onsite.days String Which days onsite response accounts for. Allowed values are 'WEEK_DAYS', 'WEEK_DAYS_AND_SATURDAY', 'ALL'
onsite.period String  Time period of accounted days. Allowed values are '07:45-16:00', '08:00-22:00', '00:00-23:59'
services Object Potential services that we provide
services.service1 Boolean True if service1 is included in agreement
services.service2 Boolean True if service2 is included in agreement
services.service3 Boolean True if service3 is included in agreement

Example

{
    offset: 0,
    total: 1,
    limit: 100,
    serviceAgreements: [
        {
            _id: '1234567890ABCDEFGHIJKLMN',
            name: 'Service agreement name',
            unitPrice: 123,
            reseller: '1234567890ABCDEFGHIJKLMN',
            resellerName: 'name of reseller',
            serviceProduct: '1234567890ABCDEFGHIJKLMN',
            remote: {
                responseTime: 1,
                days: 'WEEK_DAYS',
                period: '00:00-23:59'
            },
            onsite: {
                responseTime: 3,
                days: 'ALL',
                period: '07:45-16:00'
            },
            services: {
                service1: false,
                service2: true,
                service3: false
            }
        }
    ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level
404 id Service agreement not found
500 internal_error <Unspecified>