Docs
API Reference

Devices

Manage the devices and assets belonging to a customer

A device (or asset) is something a customer brings in for service — a laptop, a vehicle, an appliance. Devices live under a customer as a subcollection, and a job references one via its deviceId.

Beyond the fixed fields (type, brand, make, model), a device accepts arbitrary extra keys — send a serial or identifier and it is stored and returned as-is.

Editing a device updates its jobs

Updating a device propagates its type and display name onto every job that references it (the customerDeviceType and customerDeviceName fields). Deleting a device clears the deviceId reference from any job that used it, but leaves the historical device name on those jobs untouched.

Endpoints

  • GET/organisations/{orgId}/customers/{customerId}/devices — List a customer's devices
  • POST/organisations/{orgId}/customers/{customerId}/devices — Create device
  • GET/organisations/{orgId}/customers/{customerId}/devices/{deviceId} — Get device
  • PUT/organisations/{orgId}/customers/{customerId}/devices/{deviceId} — Update device
  • DELETE/organisations/{orgId}/customers/{customerId}/devices/{deviceId} — Delete device
GET
/organisations/{orgId}/customers/{customerId}/devices
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

customerId*string

Customer ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/customers/string/devices"
{  "success": true,  "data": {    "devices": [      {        "id": "string",        "type": "string",        "brand": "string",        "make": "string",        "model": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ]  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
POST
/organisations/{orgId}/customers/{customerId}/devices
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

customerId*string

Customer ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/organisations/string/customers/string/devices" \  -H "Content-Type: application/json" \  -d '{    "type": "Laptop",    "brand": "Dell",    "make": "XPS",    "model": "13 9310",    "identifier": "SN-12345"  }'
{  "success": true,  "data": {    "id": "string",    "type": "string",    "brand": "string",    "make": "string",    "model": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
GET
/organisations/{orgId}/customers/{customerId}/devices/{deviceId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

customerId*string

Customer ID

deviceId*string

Customer device ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/customers/string/devices/string"
{  "success": true,  "data": {    "id": "string",    "type": "string",    "brand": "string",    "make": "string",    "model": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
PUT
/organisations/{orgId}/customers/{customerId}/devices/{deviceId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

customerId*string

Customer ID

deviceId*string

Customer device ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/organisations/string/customers/string/devices/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "data": {    "id": "string",    "type": "string",    "brand": "string",    "make": "string",    "model": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
DELETE
/organisations/{orgId}/customers/{customerId}/devices/{deviceId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

customerId*string

Customer ID

deviceId*string

Customer device ID

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/organisations/string/customers/string/devices/string"
{  "success": true,  "data": {    "message": "Operation completed successfully"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}

Machine-readable version: OpenAPI 3.1 spec.

On this page