Reference
Spare parts
Inventory, stock levels and every movement in and out.
The parts store. Most integrations read this to keep an ERP's inventory in step, or to raise a purchase order when `quantity_on_hand` falls below `min_stock`.
`quantity_reserved` is stock already committed to an open operation. The figure you can actually allocate is `quantity_on_hand` minus `quantity_reserved`.
The spare_part object
iduuid- Opaque.
objectstring- Always "spare_part".
namestring- Display name.
referencestring · nullable- Your part number.
categorystring · nullable- One of bearing, seal_gasket, belt_chain, filter, lubricant, fastener, electrical_component, sensor, valve, hydraulic, pneumatic, motor_part, tooling, consumable, safety, other.
unitstring · nullable- One of piece, meter, liter, kilogram, box, set, roll, pair.
quantity_on_handinteger- Physical stock.
quantity_reservedinteger- Committed to open operations.
min_stockinteger · nullable- The reorder threshold.
unit_pricestring · nullable- A decimal STRING, not a number.
supplierstring · nullable- Supplier.
created_attimestamp- ISO 8601, UTC.
updated_attimestamp- ISO 8601, UTC.
{
"id": "9f3d2c1a-7e4c-4810-a0e6-2d7f4b8c1e93",
"object": "spare_part",
"name": "Bearing 6204-2RS",
"reference": "SP-0117",
"category": "bearing",
"unit": "piece",
"quantity_on_hand": 24,
"quantity_reserved": 4,
"min_stock": 10,
"unit_price": "18.500",
"supplier": "SKF Tunisie",
"created_at": "2025-11-03T09:00:00.000Z",
"updated_at": "2026-09-19T16:31:00.000Z"
}Endpoints
List spare parts
GET
/spare-partsScope
spare-parts:readPaginatedQuery parameters
searchstring- Matches the name and reference.
categorystring- Filter by category. An unknown value returns 400.
curl https://nexa.com.tn/api/v1/spare-parts \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/spare-parts",
{
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/spare-parts",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
GET /v1/spare-parts
{
"data": [
{
"id": "9f3d2c1a-7e4c-4810-a0e6-2d7f4b8c1e93",
"object": "spare_part",
"name": "Bearing 6204-2RS",
"reference": "SP-0117",
"category": "bearing",
"unit": "piece",
"quantity_on_hand": 24,
"quantity_reserved": 4,
"min_stock": 10,
"unit_price": "18.500",
"supplier": "SKF Tunisie",
"created_at": "2025-11-03T09:00:00.000Z",
"updated_at": "2026-09-19T16:31:00.000Z"
}
],
"pagination": {
"limit": 50,
"has_more": true,
"next_cursor": "eyJvIjo1MH0"
}
}Retrieve a spare part
GET
/spare-parts/{sparePartId}Scope
spare-parts:readPath parameters
sparePartIduuidrequired- The part.
curl https://nexa.com.tn/api/v1/spare-parts/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/spare-parts/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/spare-parts/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
GET /v1/spare-parts/{sparePartId}
{
"data": {
"id": "9f3d2c1a-7e4c-4810-a0e6-2d7f4b8c1e93",
"object": "spare_part",
"name": "Bearing 6204-2RS",
"reference": "SP-0117",
"category": "bearing",
"unit": "piece",
"quantity_on_hand": 24,
"quantity_reserved": 4,
"min_stock": 10,
"unit_price": "18.500",
"supplier": "SKF Tunisie",
"created_at": "2025-11-03T09:00:00.000Z",
"updated_at": "2026-09-19T16:31:00.000Z"
}
}List stock movements
GET
/spare-parts/{sparePartId}/movementsScope
spare-parts:readPaginatedEvery receipt, consumption, reservation and adjustment, newest first. The audit trail behind the current quantity.
Path parameters
sparePartIduuidrequired- The part.
Accepts limit and cursor. See Pagination.
curl https://nexa.com.tn/api/v1/spare-parts/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/movements \
-H "Authorization: Bearer $NEXA_API_KEY"const response = await fetch(
"https://nexa.com.tn/api/v1/spare-parts/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/movements",
{
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/spare-parts/b7d41f0a-6e52-4a19-8c33-90ab12cd34ef/movements",
headers=headers,
)
response.raise_for_status()
data = response.json()["data"]Response
GET /v1/spare-parts/{sparePartId}/movements
{
"data": [
{
"id": "4b8c1e93-a0e6-42d7-9f4b-8c1e935f2c1a",
"object": "spare_part_movement",
"spare_part_id": "9f3d2c1a-7e4c-4810-a0e6-2d7f4b8c1e93",
"type": "consume",
"quantity": -2,
"note": "Fitted during CNV-0042 bearing replacement",
"created_at": "2026-09-19T16:31:00.000Z"
}
],
"pagination": {
"limit": 50,
"has_more": true,
"next_cursor": "eyJvIjo1MH0"
}
}