User Tools

Site Tools


api:employee:get

API : Employee Get

Introduction

This request will return the specified employee.

Request

URL https://api.telecomx.dk/employee/EMPLOYEE_ID
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
RESELLER_ADMIN or ADMIN.
Param EMPLOYEE_ID Id of the employee (24 hex-char string)

Query example

https://api.telecomx.dk/employee/1234567890ABCDEF12345678

Response

Property Type Description
_id Id Unique employee id.
customer Id Id of the customer the employee belongs to.
accessLevel String Access level: NO_LOGIN, PERSONAL, VIEWER, MANAGER, OWNER, RESELLER, RESELLER_ADMIN or ADMIN - see more info.
state Enum State of the employee: ENABLED, DISABLED (cannot login), DELETED.
name String employee name.
title String The employees title.
department String The employees department/section/group.
address Id Id of the address the employee belongs to, null if the same as the customer. (get the full address from the customer object).
language String The preferred language: da or en.
primaryContact Boolean True if this employee is the primary contact person at the customer.
Authentication
emailAddress String E-mail address (also used for login).
noEmail Boolean True if employee has no email address and emailAddress is a username instead (min 8 chars).
smsValidation Boolean True if SMS validation is required during login.
smsNumber String Number to send SMS validation to.
authenticatorValidation Boolean True if login requires the use of an authenticator app with a time based token
ipRestriction String If set, one or multiple (comma separated) IP address that the employee may login from.
Notifications
notifyOnGeneralUsageLimit Boolean True if the employee wants to be notified by e-mail when an MVNO or SIP accounts is about to reach or has reached its usage limit.
notifyOnGeneralUsageLimitReseller Boolean True if the employee wants to be notified by e-mail when an MVNO or SIP account that belongs to the resellers customer is about to reach or has reached its usage limit (RESELLER and up).
notifyOnAccountErrorByEmail Boolean True to be notified by e-mail when a SIP, DSL or Fiber account is down (disconnected/offline/blocked).
notifyOnAccountErrorBySms Boolean True to be notified by SMS when a SIP, DSL or Fiber account is down (disconnected/offline/blocked).
notifyOnNewMvnoAccountReseller Boolean True to be notified by e-mail when a new MVNO account has been created on one of the reseller's customers
notifyOnNewSipAccountReseller Boolean True to be notified by e-mail when a new SIP account has been created on one of the reseller's customers
notifyOnNewPortingReseller Boolean True to be notified by e-mail when a new porting has been has been created or is being on one of the reseller's customers
subscriptions Array Array of Ids of notification subscription (newsletters, warnings etc.).
organizationResellers Array List of ids of resellers this employee may manage if customer has ORGANIZATION feature.
presence Object Presence settings (requires PBX)
presence.state String The employees presence:
AVAILABLE - free to accept calls
BUSY - do not disturb
OUT_OF_OFFICE - When not in the office (out)
OFF_WORK - not working
HOLIDAY - away for an extended period
presence.location String If location is available this will have a location string saying where the employee is, e.g. “På kontoret”, “I bilen”, “På lageret”. (this is setup on the smartphone app).
presence.message String A freetext message to display to others, e.g. “Til møde indtil kl. 15.00”
presence.expire Date If the current presence expires at some point in the future this is that time, and the presence will return to AVAILABLE and the expire and message will be deleted.
presence.overrides Array List of currently active overrides to the current state.
presence.overrides[].id String Id of the entity that owns the override.
presence.overrides[].source String Source of the override: MS365_CALENDAR, MS365_TEAMS.
presence.overrides[].state String The state to override with:
AVAILABLE - free to accept calls
BUSY - do not disturb
OUT_OF_OFFICE - When not in the office (out)
OFF_WORK - not working
HOLIDAY - away for an extended period.
presence.originalState String If an override is in effect, this is the state that the presence will revert to when the override ends.
presence.originalMessage String If an override is in effect, this is the message that the presence will revert to when the override ends.
autoPresence Array List of automated presence changes to perform. Is not performed if current state is “HOLIDAY”
autoPresence[].weekDays Array List of week days this item shall be active. 0=sunday, 1=monday … 6=saturday.
autoPresence[].timeOfDay String Time of day this item shall be executed. ex: 16:00.
autoPresence[].state String State to set: AVAILABLE, BUSY, OUT_OF_OFFICE, OFF_WORK.
voicemail Object Voicemail settings (requires PBX)
voicemail.notification.email Boolean True to receive notification via e-mail.
voicemail.notification.sms Boolean True to receive notification via SMS.
voicemail.requiresPinCode Boolean True if it always requires a pin code to access voicemail.
voicemail.greetingOnly Boolean True if voicemail shall only play greeting.
voicemail.defaultGreeting Id Id of default greeting.
voicemail.offWorkGreeting Id Id of greeting to use when off work. Fallback to default greeting.
voicemail.holidayGreeting Id Id of greeting to use when on holiday. Fallback to default greeting.
recording Object Recording settings (requires PBX)
recording.mode String When to record calls: ALWAYS - all calls are recorded, DEMAND - only record when requested, NEVER - cannot record.
recording.quality String Quality of call recordings:
NORMAL - 8Khz MP3 mono.
COMPACT - xKhz MP3 mono.
HIGH - 16Khz MP3 stereo (each part in separate channels).
recording.retension Number Number of days to store recording: 1, 3, 7, 14 or 30 days. For COMPACT quality 90, 180, 365 & 730 days are also available.
recording.notification.email Boolean True to receive notification when a recording has completed.
recording.notification.attach Boolean True to attach the recording to the e-mail, false to include a download link.
recording.notification.maxSize Number Maximum size of recording in bytes. If this is exceeded a download link will be included instead.
Misc
notes String Notes about the employee, only visible to RESELLERs and ADMINs.
birthdate Date The employees birthdate.
picture Id Id of a picture of the employee, null if not set.
pinCode String 4-10 digit pin code that can be used for voicemail, listening in, hotdesking etc.
custom Object Custom data, max. 4Kb.
persistentTokens Array List of tokens for M2M communication with the same rights as the employee.
mayImpersonate Boolean True if current user may impersonate this employee. Only employees of sub-resellers may be impersonated by employees of a parent reseller.
viewOtherPartyOverride String Override for PBX group access to see who the employee is talking to:
NONE - no override
HIDE - Always hidden
HIDE_PERSONAL_PHONEBOOK - hide if number is in personal phonebook
HIDE_OFF_WORK - hide when presence is OFF_WORK or HOLIDAY
HIDE_PERSONAL_PHONEBOOK_AND_OFF_WORK - hide if number is in personal phonebook or presence is OFF_WORK or HOLIDAY
billingCustomer Id Alternate customer to bill this employee's expenses to.
deleteDate Date Date this employee will be deleted. Null if not set.
deleteExtensions Boolean Shows if the employees extensions will also be deleted when the employees is deleted. Only used if the employees is set to be deleted (requires PBX).
deleteMvnoAccounts Boolean Shows if the employees MVNO accounts will also be deleted when the employees is deleted. Only used if the employees is set to be deleted (requires PBX).
features Array List of features the employee has access to:
PLAYMAKERSTATUS - access to PlayMaker status site.
DASHBOARD_EDITOR - permission to edit own PBX dashboards.
HUMAN_TASK - can be assigned tasks (only ADMIN).
PORTING - access core porting (only RESELLER_ADMIN and up).
TELE - access core tele (only RESELLER_ADMIN and up).
FINANCE - access core finance (only RESELLER_ADMIN and up).
TV - access core TV and flexcare (only RESELLER_ADMIN and up).
HELPCENTER - Access to Help Center (Only RESELLER_ADMIN and up).
FLEXCARESWAP - Access to swapping FlexCare devices
apiAccessFilter Array Optional list of API endpoints this employee may only access.
apiAccessFilter[].endpoint String Permitted endpoint as string path including * wildcard at the end or RegExp.
apiAccessFilter[].type String Type of endpoint filter: STRING or REGEXP.
m2mOnly Boolean True if user may not login, but only use persistent tokens (employee is an M2M account).
webauthnOnly Boolean True if user may only login using webauthn (higher security, blocks addition of new tokens and use of password).
shortcuts Array Array of shortcuts as used in the web UI, see definition below. Only visible if employee is the user herself.
shortcuts[].index Integer Index of the item in the list of items.
shortcuts[].url String URL in the API for accessing the data.
shortcuts[].label String Label to show in the API. Special labels: '—' and no url = horizontal line and a label without a url is a section header.
product Object PBX User product (requires PBX)
product._id Id Product id
product.start Date The date from which the product can be assigned.
product.end Date The date on which the product can not be assigned anymore.
product.type String Type of product: see below.
product.productCode String Id to use when adding a product and for syncing with accounting system when doing invoicing.
product.name String Name of the product.
product.unitType String Type of units: MIN, MB, UNITS, HOURS, KM, MONTHS.
product.recurrence String Type of recurrence: NONE, MONTHLY, QUARTERLY, YEARLY
product.cost Number Cost of the product for one month (if recurring) or one unit (RESELLER_ADMIN or ADMIN).
product.wholesale Number Resellers cost for one month (if recurring) or one unit (only RESELLER and up).
product.price Number Customer price for one month (if recurring) or one unit.
product.inheritFromReseller Id Id of reseller product that this product inherits.
product.includedProducts Array List of products that are included in this PBX user product
product.includedProducts[]._id Id Id of the included product
product.includedProducts[].amount Number The amount of this product that is included
newProduct Id PBX_USER product use from the first of next month. Only available for customers with the PBX feature.
addonProducts Array Extra ad hoc products added to an employee, ie. renting busy light etc.
addonProducts[]._id Id Id making each addition to the list unique
addonProducts[].product Id Product id
addonProducts[].name String Name override of the addon product
addonProducts[].description String Description
addonProducts[].invoicedUntil Date Date of when this product is invoiced until.
addonProducts[].unitPrice Number Customer price override for this product, can be used for discount purposes
addonProducts[].units Number Amount of the given product that is added to the employee
addonProducts[].start Date Date of when this product should be billed from
addonProducts[].terminate Date Date of when the product should stop be terminated
mvnoAccounts Array List of minified MVNO accounts, which belong to this employee
mvnoAccounts[]._id Id Id of the MVNO account
mvnoAccounts[].number String Phone number of the MVNO account in E.164 format
mvnoAccounts[].name String Name of the MVNO account
mvnoAccounts[].numberState String State of the phone number:
IN_USE - in normal use
PORTING_IN - is currently being ported in
PORTING_OUT - is currently being ported out
mvnoAccounts[].state String The state of the MVNO account. Allowed values are ACTIVE, CREATING, DELETING, BLOCKED. If state is BLOCKED, then the account cannot handle calls/sms/mms/data. If in state DELETING, it is currently under deletion.
mvnoAccounts[].pbx Number Which PBX the MVNO account belongs to. Null or 0 for standalone MVNO accounts.
mvnoAccounts[].ratePlan Id Id of the MVNO account's rateplan
mvnoAccounts[].ratePlanName String Name of rate plan, if any.
mvnoAccounts[].newRatePlan Id If a new rateplan should be applied at end of month, this is the plan.
mvnoAccounts[].newRatePlanName String Name of new rate plan, if any.
mvnoAccounts[].mvnoSim Object SIM card settings - see below.
mvnoAccounts[].mvnoSim.network String Network provider: TELENOR, TDC.
mvnoAccounts[].info Object Informational - things that cannot be changed by the user.
mvnoAccounts[].info.updating Boolean True if accounting is waiting to be updated and cannot be changed.
ms365 Object Integration settings, if PBX and Microsoft 365 integration is enabled on the customer, else null.
ms365.id String If employee is paired with a user on MS365, this is the user id on MS365, otherwise null.
ms365.calendarSetsPresence Boolean True if an ongoing calendar event will mark the employee as busy/out_of_office during the event.
ms365.teamsSetsPresence Boolean If true, employees presence will be set to busy when employee is in a teams meeting or call.
ms365.presenceSync Boolean If true, then setting presence in MS365 will also set presence on the PBX.
ms365.doNotSyncContacts Boolean True if contacts may not be sync'ed for this employee.
ms365.doNotSyncCalendar Boolean True if calendar may not be sync'ed for this employee.

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

Example

{
  _id: '52f4fd7734697b28ccafeeff',
  accessLevel: 'OWNER',
  state: 'ENABLED',
  name: 'Donald Duck',
  address: '52f4fd7734697b2800000001',
  title: 'Managing director',
  department: 'Apples Inc',
  emailAddress: 'donald@duck.com',
  noEmail: false,
  ipRestriction: '87.234.55.240',
  language: 'da',
  notes: 'Don\'t quack around with him',
  primaryContact: true,
  smsValidation: false,
  authenticatorValidation: true,
  subscriptions: [ '1234567890ABCDEF12345678', 'ABCDEF123456789012345678' ],
  birthdate: '2015-01-01T00:00:00.000Z',
  picture: '12345878901234567890ABCD',
  pinCode: '5678',
  presence: {
    state: 'BUSY',
    location: 'Copenhagen office',
    message: 'In a meeting',
    expire: ISODate('2018-01-01T13:00:00Z'),
    overrides: [
      {
        id: 'sdhji24y89hfouh23hwuo23buofwbuoe2fwboef',
        source: 'MS365_CALENDAR',
        state: 'BUSY'
      }
    ],
    originalState: 'AVAILABLE',
    originalMessage: ''
  },
  autoPresence: [
    {
      weekDays: [ 1,2,3,4,5 ],
      timeOfDay: '08:00',
      state: 'AVAILABLE'
    },
    {
      weekDays: [ 1,2,3,4 ],
      timeOfDay: '16:00',
      state: 'OFF_WORK'
    },
    {
      weekDays: [ 5 ],
      timeOfDay: '15:30',
      state: 'OFF_WORK'
    }
  ],
  voicemail: {
    notification: {
      email: false,
      sms: true
    },
    requiresPinCode: true,
    greetingOnly: false,
    defaultGreeting: '12345678901234567890AACC',
    offWorkGreeting: '12345678901234567890AADD',
    holidayGreeting: '12345678901234567890AAEE'
  },
  recording: {
    mode: 'DEMAND',
    quality: 'NORMAL',
    retension: 7,
    notification: {
      email: true,
      attach: true,
      maxSize: 10485760
    }
  },
  custom: {
    exchangeGuid: "1234-123456-1234-1234-123456",
    domainUsername: "donald"
  },
  viewOtherPartyOverride: 'NONE',
  mayImpersonate: false,
  features: [],
  apiAccessFilter: [],
  m2mOnly: false,
  webauthnOnly: false,
  organizationResellers: null.
  shortcuts: [
    {
      index: 0,
      url: '/customer/52f4fd7734697b28ccaf77ec',
      label: 'Northwind Industries'
    },
    {
      index: 1,
      url: '/sip/?customer=52f4fd7734697b28ccaf77ec',
      label: 'Northwind Industries - SIP accounts'
    }
  ],
  product: {
    _id: '1234578901234567890ABCD',
    name: 'DK budget mobileplan',
    type: 'MVNO_RATEPLAN',
    productCode: '02031',
    wholesale: 20,
    price: 49,
    start: 2015-01-01T00:00:00.000Z,
    end: null,
    recurrence: 'MONTHLY',
    unitType: 'MONTH',
    inheritFromReseller: '8234578901234567890ABCD',
    includedProducts: [
      {
        _id: '4234578901234567890ABCD',
        amount: 3
      },
      {
        _id: '9144578901234567890ABCD',
        amount: 1
      }
    ]
  },
  newProduct: '1234567890ABCD1234567890',
  deleteDate: '2025-07-25T20:00:00.000Z',
  deleteExtensions: false,
  deleteMvnoAccounts: false,
  addonProducts: [
    {
      _id: '12345678901234567890AAFF',
      name: 'Busylight',
      description: 'Busylight for SIP phones'
      units: 2,
      unitPrice: 95,
      product: '62345678901234567890BBDF',
      invoicedUntil: '2021-09-30',
      terminates: null,
      start: '2021-09-01'
    }
  ],
  mvnoAccounts: [
    {
      _id: '1234567890ABCD1234567890',
      number: '+4588227733',
      name: 'Hans Jensen',
      state: 'ACTIVE',
      numberState: 'IN_USE',
      pbx: 1,
      ratePlan: '2234567890ABCD1234567890',
      info: {
        updating: false
      }
    },
    {
      ...
    }
  ],
  ms365: {
    id: '3757t7484yfu38rhgr8yu4hrf8eygfueruehrfhduwhgfbdv',
    calendarSetsPresence: true,
    teamsSetsPresence: true,
    presenceSync: false,
    doNotSyncContacts: false,
    doNotSyncCalendar: false
  }
}

Errors

Error code Message Description
404 employee Employee not found
404 addonProducts.product Product(s) given could not be found
403 access_denied Insufficient access level
api/employee/get.txt · Last modified: 2025/11/10 08:36 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki