Table of Contents | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
ADD a new device
This API allows registering a device:
...
Code Block |
---|
{ "statusCode":200, "data":{ "smrdId":11 } } |
GET all existing devices
This API allows getting information about all existing devices:
...
Code Block |
---|
{ "statusCode":200, "data":{ "SMDevices":[ { "smrdId":0, "smrdTerminalId":"", "smrdIMEI":"000000000000000", "smrdModel":0, "smrdState":1, "smrdCreatedAt":"2020-11-20 15:54:56", "smrdUpdatedAt":"2020-11-20 15:54:56", "smrdDeletedAt":null, "SMDeviceModels":{ "smdmId":0, "smdmModel":"Unspecified", "smdmMetricProfile":0, "smdmCreatedAt":"2020-11-20 15:55:35", "smdmUpdatedAt":"2020-11-20 15:55:35", "smdmDeletedAt":null } }, ... ] } } |
GET an existing device
This API allows getting information about an existing device:
...
Code Block |
---|
{ "statusCode":200, "data":{ "SMDevices":[ { "smrdId":11, "smrdTerminalId":"1", "smrdIMEI":"IMEG", "smrdModel":1, "smrdState":1, "smrdCreatedAt":"2022-06-24 14:05:25", "smrdUpdatedAt":"2022-06-24 14:05:25", "smrdDeletedAt":null, "SMDeviceModels":[ ] } ] } } |
UPDATE an existing device
This API allows updating an existing device:
...
Verb | PATCH |
Resource | /api/datamanagement/v1/SMDevices/{id} |
Content type | application/json |
Body | { “data”: { “smrdTerminalId”: “<terminal id>”, “smrdModel”: <device model>, “smrdIMEI”: <device IMEI>, “smriSecurityState”: <state> } } |
Where:
Field | Description |
smrdTerminalId | Device unique terminal Id, assigned by the administrator (max 255 chars). |
smrdModel | Device model Id. The device model must exist (see 10.2.1). |
smrdIMEI | Device IMEI number (max 15 chars, ‘0000 …’ if none). |
smriSecurityState | Security state ('SECURE’ or ‘UNSECURE’) |
The response data is a JSON object with the following structure:
Code Block |
---|
{"statusCode":200} |
DELETE an existing device
This API allows updating an existing device:
...
Code Block |
---|
{"statusCode":200} |
Known issues
Note |
---|
Reuse an existing or old IMEI will fail when attempting to update or add a device |
...