Software serial numbers are managed through the orders.
Order life cycle (statuses):
- Draft (0) — Draft. Assigned when an order is created. In this status, the order can be edited.
- Submitted (1) — Shipped. Assigned when the order is confirmed. In this status, the order can not be edited.
- Revoked (2) — Cancelled.
- Archived (2) — In the archive.
Order types:
- Sale(0) — New order. Serial numbers are generated when the order is confirmed.
- Update(1) — The order to update the license conditions for the serial number.
License type flag:
- Software (by default; isHardwareLicense = false);
- Hardware (isHardwareLicense = true).
Work with orders requests:
Get a list of orders
Authorization is required. There are no input parameters.
GET /v1.0/orders
Pagination and sorting are available for the query. Available sorting fields: number, submitdate. Default sorting and pagination parameter values: sortby=number&direction=asc&offset=0&limit=100.
Filtering by order status is available for the query: Draft(0), Submit(1), Revoked(2). By default, the query returns orders with any status. If it is necessary to select orders with specific statuses, list them separated by commas in the "status" query parameter. For example, specifying status=0,1 will return only orders with the Draft(0) and Submit(1) status.
Returns the orders array:
"orders": [
{
"_id": 10049,
"activationlimit": 2,
"date": 1528911062,
"submitdate": 1528915062,
"number": 1,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"description": "1234234234",
"quantity": 2,
"status": 1,
"type": 0,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
},{
"_id": 10048,
"activationlimit": 3,
"customer": {
"_id": 8,
"description": "test",
"email": "cust@mail.com",
"name": "MyCostomer",
"phone": "123-12-12",
"status": 0,
"crmid": "",
"refid": ""
},
"date": 1528910935,
"submitdate": 1528915062,
"number: 2,
"description": "test",
"quantity": 2,
"status": 0,
"type": 0,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
},{
"_id": 10045,
"activationlimit": 1,
"date": 1528905572,
"submitdate": 1528915062,
"number": 3,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"customerrequired": true,
"description": "TEST_UPDATE2",
"quantity": 1,
"status": 1,
"type": 1,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
}];
Create a new order (Sale type)
Authorization is required. RAW JSON input parameters:
{
"customerId" : 8,
"orderActivationBirthDate":1528911062,
"orderActivationDeathDate":15210911062,
"orderCanOverwriteContainer": false,
"orderIsDemo": false,
"customerRequired": true,
"orderQuantity" : 10,
"orderActivationLimit" : 10,
"orderDescription" : "Created by Postmam",
"orderStatus" : 0,
"orderType" : 0,
"isHardwareLicense": false, //it is false by default
"crmId": "",
"refId": ""
}
'customerId' — customer identifierin DataBase (may be absent, then the order will not be linked to the customer)
'orderQuantity' — quantity of serial numbers or hardware keys in the order (set by the user).
'orderActivationLimit' — activation limit for the serial number in the order (set by the user).
'orderDescription' — text description of the order purpose (set by the user).
'orderStatus' — current order life status.
'orderType' — order type (must be Sale).
'orderCanOverwriteContainer' — flag that determines the ability to overwrite previous license conditions with values from the current order.
'orderIsDemo' — demo order flag.
'customerrequired' - flag — whether serial numbers can be activated without customer information.
'orderActivationBirthDate' — start date of the order availability period for license activation.
'orderActivationDeathDate' — end date of the order availability period for license activation.
'isHardwareLicense' - license type — hardware or software (by default - software - false).
POST /v1.0/orders
Returns the order element:
{
"order": {
"_id": 10052,
"number": 1,
"activationlimit": 10,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"customerrequired": true,
"customer": {
"_id": 8,
"description": "test",
"email": "cust@mail.com",
"name": "MyCostomer",
"phone": "123-12-12",
"status": 0,
"crmid": "",
"refid": ""
},
"date": 0,
"submitdate": 1528915062,
"description": "Created by Postmam",
"quantity": 10,
"status": 0,
"type": 0,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
}
}
Create a new order (Update type)
Authorization is required. RAW JSON input parameters:
{
"orderActivationBirthDate":1528911062,
"orderActivationDeathDate":15210911062,
"orderCanOverwriteContainer": false,
"serialNumber" : "4uzFSk-ccyijp-SCDd4A-FMfezU-u7Rk6y", // Optional field. Required only if a serial number update order is created
"isHardwareLicense": true, // Optional field. Required only if a hardware key update order is created (must be set to true)
"dongleId": 343242234, // Optional field. Required only if a hardware key update order is created
"orderDescription" : "Created by Postmam",
"orderType" : 1,
"crmId": "",
"refId": ""
}
'serialNumber' — serial number for which license terms update is required (set by user). Optional field. Required only if serial number update order is created.
'isHardwareLicense' — defines license type. Optional field (is false by default). Must be true for hardware key update order.
'dongleId' — hardware key id. Optional field. Required only if hardware key update order is created.
'orderDescription' — text description of order purpose (set by user).
'orderType' — order type (must be Update).
POST /v1.0/orders
Returns the order element:
{
"order": {
"_id": 10054,
"activationlimit": 1,
"date": 0,
"submitdate": 1528915062,
"number": 1,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"customerrequired": true,
"description": "Created by Postmam",
"quantity": 1,
"status": 0,
"type": 1,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
}
Change an order (Sale type)
Authorization is required. RAW JSON input parameters:
{
"orderActivationBirthDate":1528911062,
"orderActivationDeathDate":15210911062,
"orderCanOverwriteContainer": false,
"customeRrequired": true,
"customerId": 123213
"orderQuantity" : 20,
"orderActivationLimit" : 20,
"orderDescription" : "Created by Postmam",
"orderStatus" : 0,
"orderIsDemo": false,
"isHardwareLicense": false,
"crmId": "",
"refId": ""
}
PUT /v1.0/orders/{id}
Returns the order element:
{
"order": {
"_id": 10051,
"activationlimit": 20,
"date": 0,
"submitdate": 1528915062,
"number": 1,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"customerrequired": true,
"description": "Created by Postmam",
"quantity": 20,
"status": 0,
"type": 0,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
}
}
Change an order (Update type)
Authorization is required. RAW JSON input parameters:
{
"orderActivationBirthDate":1528911062,
"orderActivationDeathDate":15210911062,
"orderCanOverwriteContainer": false,
"orderDescription" : "Created by Postmam",
"orderStatus" : 0,
"crmId": "",
"refId": ""
}
PUT /v1.0/orders/{id}
Returns the order element:
{
"order": {
"_id": 10054,
"activationlimit": 1,
"date": 0,
"submitdate": 1528915062,
"number": 1,
"activationbirthdate":1528911062,
"activationdeathdate":15210911062,
"canoverwritecontainer": false,
"isdemo": false,
"customerrequired": true,
"description": "Created by Postman",
"quantity": 1,
"status": 0,
"type": 1,
"ishardwarelicense": false,
"crmid": "",
"refid": ""
}
}
The following additional errors may be received when confirming your order for hardware keys:
- Hardware key does not support time limited features (error code 10172);
- Hardware key does not support network features (error code 10173);
- The number of network licenses in the order exceeds the network resource of the key (error code 10174).
In case of errors 10172 and 10173 are received, the response to the request will contain the following fields: hardware key ID, feature number, product number, order number together with the error description. For example:
{
"conflictedDongleId":999392418,
"conflictedFeatureNumber":16,
"conflictedOrderNumber":94,
"conflictedProductNumber":12350,
"status":{"code":10172,"description":"Hardware key does not support time limited features","message":"Bad Request","status":400}
}
In case of error 10174, the response to your request will contain, only the hardware key ID value together with the error description.
Delete an order
Authorization is required. There are no input parameters.
DELETE /v1.0/orders/{id}
Receive an order by ID
Authorization is required. There are no input parameters.
GET /v1.0/orders/{id}
Returns the order element.
Sample response (for hardware key order):
{
"order": {
"_id": 471,
"activationbirthdate": 1571130180,
"activationdeathdate": 0,
"activationlimit": 0,
"archivationdate": 0,
"archived": false,
"canoverwritecontainer": false,
"crmid": "",
"customer": {
"_id": 10,
"archivationdate": 0,
"archived": false,
"companyname": "baskin&robings",
"crmid": "",
"description": "",
"email": "dfgsfg@dfg-df.com",
"lastname": "cream",
"name": "ice",
"phone": "+349534534534",
"refid": "",
"status": 0
},
"customerrequired": false,
"date": 1571130686,
"description": "",
"dongles": [
{
"dongleid": 991846791,
"lastburn": {
"_id": 113,
"actiondate": 1571403137,
"actionresult": 0,
"activationsconsumed": 0,
"activationscountcurrent": 41
},
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 442
}
],
"isdemo": true,
"ishardwarelicense": true,
"number": 70,
"products": [
{
"_id": 126,
"accesscode_id": -1,
"archivationdate": 0,
"archived": false,
"binding": {
"CAN_REPLACE_CPU": false,
"CAN_REPLACE_DVD": false,
"CAN_REPLACE_HDD": false,
"CAN_REPLACE_MAC": false,
"CAN_REPLACE_MOTHERBOARD": false,
"CAN_REPLACE_OS": false,
"CPU": true,
"DVD": false,
"HDD": true,
"MAC": true,
"MOTHERBOARD": true,
"OS": false
},
"binding_maxhardwarechangenumber": 0,
"binding_scheme": 0,
"crmid": "",
"description": "test_firmware_product778",
"flags": 0,
"hardwarebindingscheme": 0,
"licensetype": 0,
"modification": 0,
"name": "test_firmware_product778",
"productnumber": 778,
"refid": "",
"status": 1,
"memoryitems": []
}
],
"quantity": 1,
"refid": "",
"status": 1,
"submitdate": 1571130723,
"type": 1
}
}
Add a product to an order
Authorization is required. There are no input parameters.
POST /v1.0/orders/{id}/products/{pid}
Remove a product from an order
Authorization is required. There are no input parameters.
DELETE /v1.0/orders/{id}/products/{pid}
Add a feature to a product in an order
Authorization is required. There are no input parameters.
POST /v1.0/orders/{id}/products/{pid}/features{fid}
Returns the 'license' element:
{
"license": {
"consumptionmode": 0,
"flags": 0,
"netlicensescount": 12,
"rentbegindate": 0,
"rentdayscount": 55,
"rentenddate": 0,
"runcounter": 0,
"licensingmodel": 4,
"isremote": true
}
}
Remove a feature from a product in an order
Authorization is required. There are no input parameters.
DELETE /v1.0/orders/{id}/products/{pid}/features{fid}
Get all product features in an order
Authorization is required. There are no input parameters.
GET /v1.0/orders/{id}/products/{pid}/features
Returns the 'features' array:
{
"features": [
{
"_id": 14,
"archivationdate": 0,
"archived": false,
"crmid": "",
"defaultLicense": {
"canexclude": false,
"canmodify": false,
"consumptionmode": 0,
"flags": 4,
"isremote": false,
"licensingmodel": 2,
"netlicensescount": 0,
"rentbegindate": 1565273129,
"rentdayscount": 0,
"rentenddate": 1596895529,
"runcounter": 0
},
"description": "f4",
"featurenumber": 4,
"pubkey":"F9 E5 EC 6B 52 54 BC 80 45 7D 49 BB F0 61 F9 F2 EC AA 9F 63 79 32 0A B6 77 44 8A E7 16 AC C1 82 8A 14 73 1E 56 B6 EF 53"
"license": {
"consumptionmode": 0,
"flags": 4,
"isExcluded": 0,
"isremote": false,
"licensingmodel": 2,
"netlicensescount": 0,
"rentbegindate": 1565273129,
"rentdayscount": 0,
"rentenddate": 1596895529,
"runcounter": 0
},
"name": "f4",
"refid": ""
},
{
"_id": 31,
"archivationdate": 0,
"archived": false,
"crmid": "",
"defaultLicense": {
"canexclude": true,
"canmodify": true,
"consumptionmode": 0,
"flags": 4,
"isremote": true,
"licensingmodel": 1,
"netlicensescount": 11,
"rentbegindate": 0,
"rentdayscount": 0,
"rentenddate": 0,
"runcounter": 0
},
"description": "Created by postMan",
"featurenumber": 8,
"pubkey":"F9 E5 EC 6B 52 54 BC 80 45 7D 49 BB F0 61 F9 F2 EC AA 9F 63 79 32 0A B6 77 44 8A E7 16 AC C1 82 8A 14 73 1E 56 B6 EF 53"
"license": {
"consumptionmode": 0,
"flags": 4,
"isExcluded": 1,
"isremote": true,
"licensingmodel": 1,
"netlicensescount": 11,
"rentbegindate": 0,
"rentdayscount": 0,
"rentenddate": 0,
"runcounter": 0
},
"name": ",PostMan",
"refid": ""
}
]
}
Change the license terms for a product feature in an order
Authorization is required. RAW JSON input parameters (the set of fields depends on the licensing type):
{
"licensingmodel": 4,
"licenseRentBeginDate" : 0,
"licenseRentEndDate" : 0,
"licenseRentDaysCount" : 55,
"licenseNetLicenseCount" : 12,
"consumptionmode" : 0,
"flags" : 0,
"licenseRuncounter": 0,
"isRemote": true
}
PUT /v1.0/orders/{id}/products/{pid}/features/{fid}
Returns the 'licence' element:
{
"license": {
"consumptionmode": 0,
"flags": 0,
"netlicensescount": 12,
"rentbegindate": 0,
"rentdayscount": 55,
"rentenddate": 0,
"runcounter": 0,
"licensingmodel": 4,
"isremote": true
}
}
Change a memory cell in an order product
Authorization is required. RAW JSON input parameters:
{
"data": "AdaFFFlgYWJj=="
}
PUT /v1.0/orders/{id}/products/{pid}/memoryitems/{mid}/params/{paramid}
Returns the param element:
{
"param": {
"_id": 3,
"data": "AdaFFFlgYWJj",
"description": "param1",
"editallowed": true,
"name": "param1",
"offset": 20,
"size": 10
}
}
Get licenses, serial numbers and hardware keys
Authorization is required. RAW JSON input parameters:
{
"keySearchValue":"wubSTT", // optional parameter
"clientId": 10, // optional parameter
"productId": "20490", // optional parameter
"orderNumber": "21626" // optional parameter
}
POST /v1.0/search/license
Returns an object containing the serialnumbers and dongles arrays:
{
"dongles": [],
"serialnumbers": [
{
"_id": 20910,
"activationcount": 0,
"activationlimit": 3,
"customer": {
"_id": 10,
"archivationdate": 0,
"archived": false,
"companyname": "baskin&robings",
"crmid": "",
"description": "",
"email": "dfgsfg@dfg-df.com",
"lastname": "cream",
"name": "ice",
"phone": "+349534534534",
"refid": "",
"status": 0
},
"dongleid": -1359759134,
"licensecontainerversion": 0,
"memoryitems": [
{
"_id": 10187,
"accesstype": 0,
"action": 0,
"aliasid": 500,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "",
"draft": false,
"maxaccesserrors": 5,
"name": "item500",
"params": [
{
"_id": 10235,
"data": "AAHiQA==",
"datatype": 1,
"description": "",
"editallowed": true,
"name": "123456",
"offset": 0,
"size": 4
}
],
"readpassword": 0,
"refid": "",
"size": 0,
"totalparams_size": 4,
"writepassword": 0
}
],
"products": [
{
"_id": 20490,
"accesscode_id": 18,
"archivationdate": 0,
"archived": false,
"binding": {
"CAN_REPLACE_CPU": false,
"CAN_REPLACE_DVD": false,
"CAN_REPLACE_HDD": false,
"CAN_REPLACE_MAC": false,
"CAN_REPLACE_MOTHERBOARD": false,
"CAN_REPLACE_OS": false,
"CPU": true,
"DVD": false,
"HDD": true,
"MAC": true,
"MOTHERBOARD": true,
"OS": false
},
"binding_maxhardwarechangenumber": 0,
"binding_scheme": 0,
"crmid": "",
"description": "",
"featuresWithLicenses": [
{
"_id": 136,
"archivationdate": 0,
"archived": false,
"crmid": "",
"defaultLicense": {
"canexclude": true,
"canmodify": true,
"consumptionmode": 0,
"flags": 0,
"isremote": false,
"licensingmodel": 1,
"netlicensescount": 0,
"rentbegindate": 0,
"rentdayscount": 0,
"rentenddate": 0,
"runcounter": 0
},
"description": "f12274",
"featurenumber": 12274,
"license": {
"consumptionmode": 0,
"flags": 0,
"isExcluded": 0,
"isremote": false,
"licensingmodel": 1,
"netlicensescount": 0,
"rentbegindate": 0,
"rentdayscount": 0,
"rentenddate": 0,
"runcounter": 0
},
"name": "f12274",
"pubkey": "61 78 04 38 6F CC 61 9A E3 38 C6 11 12 8A 95 7B B0 A6 1B 41 E4 8D 17 B6 6F AE 1F 03 91 9A 68 88 B7 9A 8E 55 34 57 C4 58",
"refid": ""
}
],
"flags": 0,
"hardwarebindingscheme": 0,
"licensetype": 0,
"memoryitems": [
{
"_id": 10187,
"accesstype": 0,
"action": 0,
"aliasid": 500,
"archivationdate": 0,
"archived": false,
"crmid": "",
"description": "",
"draft": false,
"maxaccesserrors": 5,
"name": "item500",
"params": [
{
"_id": 10235,
"data": "AAHiQA==",
"datatype": 1,
"description": "",
"editallowed": true,
"name": "123456",
"offset": 0,
"size": 4
}
],
"readpassword": 0,
"refid": "",
"size": 0,
"totalparams_size": 4,
"writepassword": 0
}
],
"modification": 0,
"name": "mem_pr",
"productnumber": 45369,
"refid": "",
"status": 1
}
],
"serialstring": "VJ7jgF-wubSTT-yt1TMj-utpB2R-BEuNb8",
"status": 0
}
]
}