Reference
Assets
Equipment, machines and installed items — the register everything else points at.
An asset is anything you maintain: a machine on a line, a compressor in a plant room, a fire door, a vehicle. Assets are the spine of the data model — an operation points at one, a spare part is fitted to one, a downtime event belongs to one — so this is usually the first resource an integration synchronises.
An asset lives in a room, which lives on a floor, which lives in a building. That is why creating one takes a `room_id` and not a location string: the hierarchy is what makes a plant view, a per-building budget and a technician's route possible.
The asset object
iduuid- Opaque. Do not parse it.
objectstring- Always "asset".
namestring- Display name.
referencestring- The human-facing code, generated by Nexa from the brand, model and category when you do not supply one.
categorystring- One of plumbing, electrical, hvac, furniture, appliance, it_equipment, security, fire_safety, structural, cleaning, production_machine, conveyor, pump, motor, compressor, instrumentation, material_handling, other.
statusstring- operational, needs_maintenance, under_maintenance, out_of_service, retired. Read-only here — change it with the status endpoint.
descriptionstring · nullable- Free text.
brandstring · nullable- Manufacturer.
model_numberstring · nullable- Model.
criticalitystring · nullable- How badly a failure hurts: low, medium, high, critical.
building_iduuid · nullable- The building. Derived from the room.
room_iduuid · nullable- Where it sits.
parent_asset_iduuid · nullable- Set when this is a sub-component of another asset — the motor inside the pump.
is_installedboolean- False for an asset held in stock and not yet put into service.
qr_codestring · nullable- The permanent code printed on the machine's QR sticker. Resolve a scan to an asset with this.
installation_datedate · nullable- YYYY-MM-DD.
last_maintenance_datedate · nullable- YYYY-MM-DD.
maintenance_interval_daysinteger · nullable- Drives the preventive maintenance schedule.
unit_pricestring · nullable- A decimal STRING, not a number, so it cannot be rounded in transit.
supplierstring · nullable- Supplier name.
supplier_iduuid · nullable- The linked vendor, when the supplier is one of your registered vendors.
expiration_datedate · nullable- YYYY-MM-DD. Set for consumables and stock with a shelf life.
min_stockinteger · nullable- Reorder threshold, for assets held as stock.
initial_stockinteger · nullable- Quantity when the asset was first recorded, for assets held as stock.
created_attimestamp- ISO 8601, UTC.
updated_attimestamp- ISO 8601, UTC. Use with ?updated_since for incremental sync.
{
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}Endpoints
List assets
/assetsassets:readPaginatedReturns your business's assets, newest first. Use `updated_since` to pull only what changed since your last sync rather than walking the whole register every night.
Query parameters
categorystring- Filter by category. Pass "production_machine" for machines. An unknown value returns 400 invalid_category with the accepted list.
statusstring- operational, needs_maintenance, under_maintenance, out_of_service, retired.
building_iduuid- Only assets in this building.
room_iduuid- Only assets in this room.
placementstring- "installed" or "stock".
searchstring- Matches name, reference, brand and model.
updated_sincetimestamp- ISO 8601. Only assets changed at or after this time. The incremental-sync filter.
curl https://nexa.com.tn/api/v1/assets \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets",
{
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.get(
"https://nexa.com.tn/api/v1/assets",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": [
{
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
],
"pagination": {
"limit": 50,
"has_more": true,
"next_cursor": "eyJvIjo1MH0"
}
}Retrieve an asset
/assets/{assetId}assets:readPath parameters
assetIduuidrequired- The asset.
curl https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
{
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.get(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": {
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
}Create an asset
/assetsassets:writeRequires Idempotency-KeyRequires an `Idempotency-Key` header. The reference is generated for you. The building is derived from the room.
Body
namestringrequired- Display name.
room_iduuidrequired- Where it sits. Must be a room in your business — a room belonging to anyone else is refused.
categorystring- Defaults to other. An unknown value returns 400.
descriptionstring- Free text.
brandstring- Manufacturer.
model_numberstring- Model.
installation_datedate- YYYY-MM-DD.
expiration_datedate- YYYY-MM-DD. For consumables and stock with a shelf life.
maintenance_interval_daysinteger- Setting this schedules preventive maintenance automatically.
unit_pricenumber- Purchase price.
supplierstring- Supplier name.
curl -X POST https://nexa.com.tn/api/v1/assets \
-H "Authorization: Bearer $NEXA_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Conveyor CV-03",
"room_id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef"
}'const response = await fetch(
"https://nexa.com.tn/api/v1/assets",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Conveyor CV-03",
"room_id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef"
}),
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import uuid
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
}
response = requests.post(
"https://nexa.com.tn/api/v1/assets",
headers=headers,
json={
"name": "Conveyor CV-03",
"room_id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef"
},
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": {
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
}Update an asset
/assets/{assetId}assets:writeField edits only. Sending `status` returns 400 — use the status endpoint, which records history.
Path parameters
assetIduuidrequired- The asset.
Body
namestring- Display name.
descriptionstring- Free text.
brandstring- Manufacturer.
model_numberstring- Model.
maintenance_interval_daysinteger- Recalculates the preventive schedule.
categorystring- One of the asset categories. An unknown value returns 400.
installation_datedate- YYYY-MM-DD.
expiration_datedate- YYYY-MM-DD.
unit_pricenumber- Purchase price.
supplierstring- Supplier name.
curl -X PATCH https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef \
-H "Authorization: Bearer $NEXA_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.patch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
headers=headers,
json={},
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": {
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
}Change an asset's status
/assets/{assetId}/statusassets:writeIts own endpoint because it is not a field edit: it writes a status-history entry, can open or close a downtime event, notifies the team, and emits `asset.status_changed`. This is the endpoint to drive from a SCADA or a condition-monitoring system.
Path parameters
assetIduuidrequired- The asset.
Body
statusstringrequired- operational, needs_maintenance, under_maintenance, out_of_service, retired.
notestring- Why. Shown in the asset's history.
curl -X PATCH https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/status \
-H "Authorization: Bearer $NEXA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "needs_maintenance"
}'const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/status",
{
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"status": "needs_maintenance"
}),
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.patch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/status",
headers=headers,
json={
"status": "needs_maintenance"
},
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": {
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "under_maintenance",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": null,
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
}Delete an asset
/assets/{assetId}assets:deleteA soft delete. The asset leaves listings; its operations and downtime history stay intact.
Path parameters
assetIduuidrequired- The asset.
curl -X DELETE https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
{
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.delete(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
headers=headers,
)
response.raise_for_status()Returns 204 No Content with an empty body.
List sub-components
/assets/{assetId}/childrenassets:readPaginatedThe assets whose `parent_asset_id` is this one — the motor in the pump, the drive on the conveyor.
Path parameters
assetIduuidrequired- The parent asset.
Accepts limit and cursor. See Pagination.
curl https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/children \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/children",
{
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.get(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/children",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": [
{
"id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"object": "asset",
"name": "Conveyor CV-02",
"reference": "CNV-0042",
"category": "production_machine",
"status": "operational",
"description": "Main line conveyor, section 2.",
"brand": "Interroll",
"model_number": "RM-8021",
"criticality": "high",
"building_id": "1f0a6e52-4a19-8c33-90ab-12cd34efb7d4",
"room_id": "6e524a19-8c33-90ab-12cd-34efb7d41f0a",
"parent_asset_id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
"is_installed": true,
"qr_code": "K7M2QX9A",
"installation_date": "2023-04-11",
"expiration_date": null,
"last_maintenance_date": "2026-08-02",
"maintenance_interval_days": 90,
"unit_price": "18400.00",
"min_stock": null,
"initial_stock": null,
"supplier": "Interroll Tunisie",
"supplier_id": null,
"created_at": "2023-04-11T09:12:00.000Z",
"updated_at": "2026-09-21T14:48:00.000Z"
}
],
"pagination": {
"limit": 50,
"has_more": true,
"next_cursor": "eyJvIjo1MH0"
}
}List an asset's work-order history
/assets/{assetId}/operationsoperations:readPaginatedNeeds `operations:read`, not `assets:read` — it returns operations, and a key never granted them should not read them through a different path.
Path parameters
assetIduuidrequired- The asset.
Accepts limit and cursor. See Pagination.
curl https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/operations \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/operations",
{
headers: {
Authorization: `Bearer ${process.env.NEXA_API_KEY}`,
},
},
);
if (!response.ok) {
const { error } = await response.json();
throw new Error(`${error.type}: ${error.message}`);
}
const { data } = await response.json();import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['NEXA_API_KEY']}",
}
response = requests.get(
"https://nexa.com.tn/api/v1/assets/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/operations",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
{
"data": [
{
"id": "8c1e93a0-2d7f-4b8c-9b3d-5f2c1a7e4c81",
"object": "operation",
"title": "Line 2 conveyor — bearing noise",
"status": "completed",
"asset_id": "b7d41f0a-6e52-4a19-8c33-90ab12cd34ef"
}
],
"pagination": {
"limit": 50,
"has_more": true,
"next_cursor": "eyJvIjo1MH0"
}
}