User Tools

Site Tools


api:employeesubscription:create

API : Employee Subscriptions Create

Introduction

This request will create a new employee subscription.

Request

URL https://api.telecomx.dk/employeeSubscription
Method POST
Access level RESELLER if creating a subscription for their own or a sub reseller's scope.
RESELLER_ADMIN or ADMIN, who can also create common (global) subscriptions.
Body reseller Id [optional] Id of the reseller the subscription belongs to. Omit to create a common (global) subscription (RESELLER_ADMIN/ADMIN only); for RESELLER callers it defaults to their own customer.
title String Name of the subscription, 1-255 characters.
description String [optional] A longer description of what the subscription offers.
email Boolean [optional] True if subscribers will be notified by e-mail.
sms Boolean [optional] True if subscribers will be notified by SMS.

Although email and sms is optional, one of them must be present.

Request body example

{
  "reseller": "650000000000000000000003",
  "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
}

Response

The response will be the newly created employee subscription, if no errors occurred.

JSON object
_id Id Unique employee subscription id.
reseller Id Id of the reseller the subscription belongs to. Null for common subscriptions.
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": "650000000000000000000001",
  "reseller": "650000000000000000000003",
  "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
422 title Title is missing or not valid
422 email No transmission type set, at least email or sms must be selected
422 reseller Reseller id is not valid
404 reseller Reseller not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/employeesubscription/create.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki