api:externallicense:list
Table of Contents
API : External Licenses List
Introduction
This request will return the list of all external licenses for a specific customer.
Request
| URL | https://api.telecomx.dk/externalLicense | |
|---|---|---|
| Method | GET | |
| Access level | RESELLER if customer belongs to the reseller or a sub reseller. RESELLER_ADMIN ADMIN. |
|
| Query | customer | [optional] Id of the customer to list licenses for, defaults to user's own customer if not set. |
| reseller | [optional] Id of the reseller to list licenses for. If this value is given, it will fetch all licenses of this reseller's customers. |
|
| withoutProduct | [optional] Only fetches the licenses, who do not have a Telecom X product assigned yet. |
|
| format | [optional] Allowed values are CSV or JSON. Defaults to JSON |
|
Query examples
https://api.telecomx.dk/externalLicense https://api.telecomx.dk/externalLicense?customer=1234567890ABCDEF12345678 https://api.telecomx.dk/externalLicense?customer=1234567890ABCDEF12345678&withoutProduct=true https://api.telecomx.dk/externalLicense?reseller=1234567890ABCDEF12345678&withoutProduct=true
Response
| JSON object | ||
|---|---|---|
| Property | Type | Description |
| offset | Number | Index of the first account returned. |
| limit | Number | Number of licenses to return. Note that the actual number of items returned may be lower. |
| total | Number | Number of licenses that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| externalLicenses | Array | List of accounts, see definition below. |
| External license | ||
|---|---|---|
| Property | Type | Description |
| _id | ObjectId | Unique ID |
| name | String | Name of the license in the external system, if any. |
| platformId | Enum | Platform enum of system this is synchronized from. Allowed value is ALSO. |
| platformLicenseId | String | The license's ID in the external system - can be a number, string, objectId, etc., depending on the system. |
| customer | ObjectId | ID of the Telecom X customer, that this license belongs to. |
| product | ObjectId | ID of the Telecom X product, that this license uses. |
| units | number | Amount of licenses. |
| invoicedUntil | Date | When this license is billed until in Telecom X |
| invoiceStart | Date | Date that Telecom X will start to bill this license from. If null, license will not be billed. |
| created | Date | Timestamp of when the license was fetched from the external system, and saved to Telecom X |
| lastSeen | Date | Timestamp of when the license was last seen in the external system |
| start | Date | Billing start date of the license. |
| end | Date | Billing end date/expiration date, null if not given |
| also | Object | Contains properties only related to ALSO. |
| also.wholesalePrice | Number | Wholesale price of the license, fetched from ALSO. Used as a guideline for the product's wholesale price. |
| also.price | Number | Customer price of the license, fetched from ALSO. Used as a guideline for the product's price. |
| also.renew | Boolean | Whether the license will be renewed, when license passes the end date |
| also.renewUnits | Number | If the license should be renewed with a different amount of units, than it previously had. |
| also.billingPeriod | String | Defines for how long the license is bound. Allowed values are MONTHLY, QUARTERLY, YEARLY |
| also.lockedWholesale | Number | Wholesale price of the license, which will be used until the binding period is over. |
| also.lockedPrice | Number | Customer price of the license, which will be used until the binding period is over. |
Note that properties holding no value may be omitted from the object.
Example - normal
{ offset: 10, limit: 20, total: 123, externalLicenses: [ { _id: '1234567890ABCD1234567890', name: 'Office E3 2022', platformId: 'ALSO', platformLicenseId: '571481273', customer: '2234567890ABCD1234567890', product: '6234567890ABCD1234567890', units: 1, invoicedUntil: '2022-03-31T00:00:00.000Z', invoiceStart: '2022-01-31T00:00:00.000Z', created: '2021-04-25T12:35:00.000Z', lastSeen: '2021-09-30T12:35:00.000Z', start: '2021-01-05T00:00:00.000Z', end: '2022-01-05T00:00:00.000Z', also: { wholesalePrice: 51.32, price: 182.12, renew: false, billingPeriod: 'YEARLY', lockedWholesale: 5.21, lockedPrice: 9.12 } }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | customer | Not found |
| 500 | internal_error | <Unspecified> |
api/externallicense/list.txt · Last modified: 2025/02/26 14:56 by Joakim Andersen