Hardware key fields:
- 'dongleid' — hardware key identifier (engraved on the case);
- 'model' — hardware key model (possible values: UNKNOWN - 0, DL - 1, SIGN - 2, TIME - 3, CODE - 4, CODE_TIME - 5);
- 'publiccode' — numeric value of the vendor's public access code;
- 'typeflags' — the Type field of the hardware key, which determines its properties (support of algorithms, network functionality, etc.);
- 'netresource' — network resource of the hardware key.
Get a list of hardware keys
Authorization is required. There are no input parameters.
GET /v1.0/dongles
Sorting by key id and pagination are available for the query. Default values of sorting and pagination parameters: sortby=default&direction=asc&offset=0&limit=100.
Returns athe dongles array:
"dongles": [
{
"dongleid": 991846791,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 0
}
]
Update hardware key fields
Authorization is required. RAW JSON input parameters:
{
"driverType": 2
}
Possible values of the driverType field:
- 0 — Guardant driver;
- 2 — HID mode;
- W16 — WinUSB driver (installed by default).
PUT /v1.0/dongles/{dongleid}
Returns the dongle element:
"dongle": {
"dongleid": 991846791,
"drivertype": 2,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 0
}
Add a hardware key to an order
Authorization is required. The order must be in the Submit status. RAW JSON input parameters:
{
"dongleId": 991846791,
"dongleModel": 2,
"publicCode": 1368487351,
"typeFlags": 0,
"netResource": 0
}
It is not allowed to add a hardware key with a dongleId that matches the one previously added to the order.
POST /v1.0/orders/{id}/dongles
Returns the dongle element:
"dongle": {
"dongleid": 991846791,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 0
}
When adding a hardware key to an order, the following additional errors may be received:
- 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.
Add multiple hardware keys to an order
Authorization is required. The order must be in the Submit status. RAW JSON input parameters:
{
"dongles":
[
{
"dongleId": 995644599,
"dongleModel": 2,
"netResource": 0,
"publicCode": 1368487351,
"typeFlags": 442
},
{
"dongleId": 995644499,
"dongleModel": 2,
"netResource": 0,
"publicCode": 1368487351,
"typeFlags": 442
},
{
"dongleId": 995644399,
"dongleModel": 2,
"netResource": 0,
"publicCode": 1368487351,
"typeFlags": 442
}
]
}
It is not allowed to add a hardware key with a dongleId that matches the one previously added to the order.
POST /v1.0/orders/{id}/multipledongles
Returns the dongles array:
{
"dongles": [
{
"dongleid": 995644599,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 442,
"retcode":"10168"
},
{
"dongleid": 995644499,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 442,
"retcode":"0"
},
{
"dongleid": 995644399,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 442,
"retcode":"0"
}
]
}
When adding a hardware key to an order, the following additional errors may be received:
- 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.
Remove a hardware key from an order
Authorization is required. There are no input parameters.
DELETE /v1.0/orders/{id}/dongles/{did}
Get information about the last key entry (taking the order into account)
Authorization is required. There are no input parameters.
This is necessary to obtain the status code of the key firmware result from the database. The actions algorithm of key writing is as follows: if "Guardant Control Center" returns a status code for dongleId different from 0 (Success), then it is necessary to execute this request. One of the following error codes will be returned in the actionResult field:
enum ActionResultCode : int
{Success = 0, // successful operation
VendorHasNoActivationTransactionsAvailable = 2, // vendor's service transaction limit is over
VendorHasNoServiceSubscription = 5, // vendor's service subscription is over
PrepareLicenseError = 13, // internal error that can be raised during license container generation
NotEhoughMemoryInLicense = 14, // internal error that can be raised during license container generation if it is not enough memory to save all features
NoFeatureFound = 15, // no balance associated the feature found in master
DongleBurnFailed = 201, // internal error that can be raised during dongle burn
DongleNotFound = 202, // dongle has disappeared after the burn starting
UnknownError = 666
};GET /v1.0/orders/{orderid}/dongles/{dongleid}/getlastburninfo
Returns the lastburninfo value:
{
"lastburninfo": {
"_id": 56,
"action": 1,
"actiondate": 1569974400,
"actionresult": 0,
"activationsconsumed": 1,
"activationscountcurrent": 300,
"netlicensesconsumed": 3,
"netlicensesremains": 997
}
}
Get the history of firmware/updates of the hardware key
Authorization is required.
GET /v1.0/getdonglehistory/{dongle_id}
The query can be sorted by actionDate and paginated. The default values for sorting and pagination parameters are: direction=asc&offset=0&limit=100.
In this query it is possible to specify:
- the actiondatebegin parameter=time_value (e.g. 1550149997). All events with the same or later time will be selected.
- the actiondateend parameter=time_value (e.g. 1550149999). All events with the same or earlier time will be selected.
- both the actiondatebegin and actiondateend parameters at the same time. The event from the time range [actiondatebegin, actiondateend] will be selected.
- the actionresult parameter=value1[,value2,value3,...]. For example, actionresult=0,2,13. Only events whose actionResult matches one of the listed values will be selected.
Returns the history array:
{
"history": [
{
"_id": 57,
"actiondate": 1570191207,
"actionresult": 0,
"activationsconsumed": 1,
"activationscountcurrent": 20,
"netlicensesconsumed": 3,
"netlicensesremains": 997,
"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
},
"dongle": {
"dongleid": 991846791,
"model": 2,
"netresource": 0,
"publiccode": 1368487351,
"typeflags": 442
},
"order": {
"_id": 244,
"activationbirthdate": 1568193700,
"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": 1568193433,
"description": "",
"isdemo": true,
"ishardwarelicense": true,
"number": 30,
"quantity": 1,
"refid": "",
"status": 1,
"submitdate": 1568196767,
"type": 0
}
}
]
}
Check if the hardware key can be added to the order
Authorization is required. The order must be in the Submit status. RAW JSON input parameters:
{
"dongleId": 991846791,
"dongleModel": 2,
"publicCode": 1368487351,
"typeFlags": 0,
"netResource": 0
}
If the hardware key has already been added to the order, the response will be OK.
This request for an order update will return an error.
POST /v1.0/canadddongle/orders/{id}
Returns OK (200) if the key can be added to the order and an appropriate error if not.
The following additional errors may be received:
- 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.
Get a list of hardware key orders
Authorization is required.
GET /v1.0/dongles/{id}/orders
The query can be sorted by order number ("number"), order confirmation date ("submitdate"), order start date ("startdate") and pagination. The default values for sorting and pagination parameters are: direction=asc&offset=0&limit=100.
Returns the orders array:
{
"orders": [
{
"_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": "",
"isdemo": true,
"ishardwarelicense": true,
"number": 70,
"quantity": 1,
"refid": "",
"status": 1,
"submitdate": 1571130723,
"type": 1
},
{
"_id": 469,
"activationbirthdate": 1571130000,
"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": 1571130069,
"description": "",
"isdemo": true,
"ishardwarelicense": true,
"number": 68,
"quantity": 1,
"refid": "",
"status": 1,
"submitdate": 1571130251,
"type": 1
},
{
"_id": 244,
"activationbirthdate": 1568193700,
"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": 1568193433,
"description": "",
"isdemo": true,
"ishardwarelicense": true,
"number": 30,
"quantity": 1,
"refid": "",
"status": 1,
"submitdate": 1568196767,
"type": 0
}
]
}