User Tools

Site Tools


api:employeesubscription:list

API : Employee Subscriptions List

Introduction

This request will return the list of employee subscriptions that employees can subscribe to. They can either be global or limited to the customer of a given reseller.

The subscriptions are usually fetched when showing an employee, so that the subscriptions the employee has may be shown.

This request allows for returning:

  • Subscriptions that employees of a given customer may subscribe to
  • Subscriptions that belongs to a reseller
  • All subscriptions (if the current user is an admin)

Request

URL https://api.telecomx.dk/employeeSubscription
Method GET
Access level VIEWER, MANAGER, OWNER, RESELLER or ADMIN.
Query customer [optional] Id of the customer for which employees the subscriptions must be available for.
reseller [optional] Id of the reseller that the subscriptions must belong to. Cannot be used together with the customer.
common [optional] True if only common subscriptions (those that everybody can subscribe to) should be returned. Only available for ADMIN.

If neither customer or reseller is given, then the current user must be an admin to receive the complete list.

Query examples

https://api.telecomx.dk/employeeSubscription?customer=1234567890ABCDEF12345678
https://api.telecomx.dk/employeeSubscription?reseller=1234567890ABCDEF12345678
https://api.telecomx.dk/employeeSubscription?common=true
https://api.telecomx.dk/employeeSubscription

Response

Array of JSON object
_id Id Unique employee subscription id.
reseller Id Id of the reseller the subscription belongs to, if any.
title String Name of the subscription.
description String A longer description of what the subscription offers.
email Boolean True if subscribers will be notified by e-mail.
sms Boolean True if subscribers will be notified by SMS.

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

Example

[
  {
    _id: '123456780ABCDEF12345678',
    reseller: null,
    title: 'Planned service windows',
    description: 'When ever we need to perform upgrades that may affect your services, we send out an announcement 14 days in advance. Subscribe to this to get notified.',
    email: true,
    sms: false
  },
  { ... }
]

Errors

Error code Message Description
409 customer Customer not valid
409 reseller Reseller not valid
403 access_denied Insufficient access level
404 customer Customer not found
api/employeesubscription/list.txt · Last modified: 2014/07/03 09:58 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki