api:employee:create
Table of Contents
API : Employee Create
Introduction
This request will create a new employee.
Request
| URL | https://api.telecomx.dk/employee | ||
|---|---|---|---|
| Method | POST | ||
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller. RESELLER_ADMIN or ADMIN. |
||
| Property | Type | Description | |
| Body | customer | Id | Id of the customer the employee should belong to. |
| accessLevel | Enum | Access level: NO_LOGIN, PERSONAL, VIEWER, MANAGER, OWNER, RESELLER, RESELLER_ADMIN or ADMIN - see more info. You cannot set an access level higher than your own level. |
|
| state | Enum | [optional] State of the employee: ENABLED (default), DISABLED (cannot login), DELETED. |
|
| name | String | employee name. | |
| title | String | [optional] The employees title. |
|
| department | String | [optional] The employees department/section/group. |
|
| address | Id | [optional] Id of the address the employee belongs to, null if the same as the customer. |
|
| language | String | [optional] The preferred language: 'da' or 'en' (default). |
|
| 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). | |
| password | String | If noEmail is true, then a password may be specified, (min 8 chars, upper/lower and digits). | |
| smsValidation | Boolean | True if SMS validation is required during login, default to false. | |
| 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 | [optional] If set, one or multiple (comma separated) IP address that the employee may login from. |
|
| organizationResellers | Array | List of ids of resellers this employee may manage, if customer has ORGANIZATION feature. Can only be set/updated by RESELLER_ADMIN or ADMIN users. | |
| 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.). | |
| 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. | |
| 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. | |
| 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 | Determines whether the user's extensions will also be deleted when the user is deleted. Only used if the user 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 | ObjectId | Id of PBX user product for this user | |
| Addon products | |||
| 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 | |
| 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. | |
Request body example
{ 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' ], product: '1234567890ABCDEF12345678', apiAccessFilter: [], m2mOnly: false, webauthnOnly: false }
Response
The response will be the newly created employee, if no errors occurred.
| 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. |
| organizationResellers | Array | List of ids of resellers this employee may manage if customer has ORGANIZATION feature. |
| 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.). |
| 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. |
| 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 | Determines whether the user's extensions will also be deleted when the user is deleted. Only used if the user 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') }, 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', 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 } ] }, 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' } ], ms365: { id: '47486ytg38tghbui4gh4ut834yhfu486y8rhfe9ghve9rhn', calendarSetsPresence: true, teamsSetsPresence: true, presenceSync: false, doNotSyncContacts: false, doNotSyncCalendar: false } }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | employee | Employee not found in body of request |
| 403 | access_denied | Insufficient access level |
| 422 | multiple | Multiple errors (the inner property holds an array of errors this request generated, which can be any of the errors below) |
| 422 | state | Cannot set state to deleted, use delete method instead |
| 422 | name | Name is required |
| 422 | password | The password complexity requirements are not met - 8 upper/lower/digits required |
| 422 | ipRestriction | IP address(es) not valid |
| 422 | custom | Custom data too large, max. 4Kb |
| 404 | address | The address was not found |
| 422 | emailAddress | The e-mail address is invalid |
| 409 | emailAddress | The e-mail address is used by another account |
| 422 | subscriptions | One or more subscriptions are not valid |
| 403 | accessLevel | You cannot assign access level higher than your own |
| 404 | customer | Customer not found |
| 404 | product | Product could not be found |
| 404 | addonProducts.product | Product(s) given could not be found |
| 422 | pinCode | Pincode is invalid - must be 4-10 digits or none |
| 422 | recordingQuality | Invalid quality - use NORMAL, COMPACT or HIGH |
| 422 | recordingRetension | Recording retension period is too long, max. 180 days for compact quality |
| 422 | presence.state | Presence state is invalid |
| 422 | presence.expire | Not a valid date |
| 404 | voicemail.defaultGreeting | Not found |
| 404 | voicemail.offWorkGreeting | Not found |
| 404 | voicemail.holidayGreeting | Not found |
| 403 | accessLevel | Cannot assign reseller rights to a regular customer employee |
| 409 | billingCustomer | An employee can not be assigned a billing customer not assosciated with the employer's customer. |
| 404 | organizationResellers | One or more of the selected resellers are not valid or has not be granted to this employees customer. |
| 500 | internal_error | <unspecified> |
api/employee/create.txt · Last modified: 2025/11/10 08:40 by Per Møller