api:externallicense:update
Table of Contents
API : External Licenses Update
Introduction
This request will update a license on a specific customer
Request
| URL | https://api.telecomx.dk/externalLicense/LICENSE_ID | |
|---|---|---|
| Method | POST | |
| Access level | RESELLER if customer belongs to the reseller or a sub reseller. RESELLER_ADMIN ADMIN. |
|
| Params | LICENSE_ID | ID of the license to update |
Query examples
https://api.telecomx.dk/externalLicense/1234567890ABCD1234567890
| Body | ||
|---|---|---|
| Property | Type | Description |
| product | Id | ID of product to assign to this license |
| invoiceStart | Date | Date for when invoicing of this license should start. |
Body example
{
"product": "1234567890ABCD1234567890",
"invoiceStart": "2023-01-05T22:00:00.000Z"
}
Response
| JSON object | ||
|---|---|---|
| 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 |
| 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.bindingPeriod | String | Defines for how long the license is bound. Allowed values are MONTHLY, QUARTERLY, YEARLY |
| also.lockedWholesalePrice | 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
{ _id: '1234567890ABCD1234567890', name: 'Office E3 2022', platformId: 'ALSO', platformLicenseId: '571481273', customer: '2234567890ABCD1234567890', product: '6234567890ABCD1234567890', units: 1, invoicedUntil: '2022-03-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: { billingType: 'Monthly (with 1-year commitment) - P1Y', tenantId: '1283787u9ad-123868gf7d7f-78f76fgjs', wholesalePrice: 51.32, price: 182.12, renew: false, bindingPeriod: 'YEARLY', lockedWholesalePrice: 5.21, lockedPrice: 9.12 } } }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level |
| 404 | customer | Not found |
| 404 | id | External license not found |
| 404 | product | Product not found |
| 500 | internal_error | <Unspecified> |
api/externallicense/update.txt · Last modified: 2023/03/16 14:28 by Joakim Andersen