API Reference
The Nexshift API gives you read-only access to your operational data. Use it to build dashboards, connect to Power BI, or integrate with your other business systems.
Overview
The Nexshift API is a REST API that returns JSON. All endpoints are read-only โ data can only be written through the Nexshift application.
All data returned is scoped to your company. You cannot access data from other companies with your API key.
Authentication
All API requests must include your API key in the Authorization header:
Authorization: Bearer nxs_your_api_key_here
API keys are provided by Nexshift when your account is set up. Contact your Nexshift account manager if you need a new key or need to revoke an existing one.
Power BI and Excel
When connecting from Power BI or Excel Power Query, set the authentication type to Anonymous in the credentials dialog. Pass your API key via the Authorization header directly in the Power Query code:
= Web.Contents(
"https://yourcompany.nexshift.app/api/v1/production/runs",
[
Headers = [
#"Authorization" = "Bearer nxs_your_api_key_here"
]
]
)
Then pipe the result through Json.Document() to parse the response and expand the table as needed.
Base URL
All API requests are made to your company subdomain:
https://yourcompany.nexshift.app/api/v1
Example request
curl https://yourcompany.nexshift.app/api/v1/production/runs \ -H "Authorization: Bearer nxs_your_api_key_here" \ -H "Content-Type: application/json"
Production
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. Filter runs started on or after this date. Example: 2026-01-01 |
| to | string | ISO 8601 date. Filter runs started on or before this date. |
| site_id | string | Filter by site UUID. |
| machine_id | string | Filter by machine UUID. |
| limit | number | Maximum records to return. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"started_at": "2026-03-26T00:21:16Z",
"ended_at": "2026-03-26T02:21:29Z",
"status": "completed",
"setup_duration_seconds": 720,
"running_at": "2026-03-26T00:33:16Z",
"units_produced": 9700,
"target_quantity": 10000,
"batch_number": "123456",
"machine": { "id": "uuid", "name": "Auto 3", "uom": "bags" },
"site": { "id": "uuid", "name": "Main Plant", "location": "Brisbane, QLD" },
"product": { "id": "uuid", "sku": "BUPB", "description": "Product description" },
"operator": { "id": "uuid", "full_name": "Jane Smith" },
"scrap": [
{ "id": "uuid", "units": 20, "reason": "Defective packaging", "timestamp": "..." }
],
"downtime": [
{
"id": "uuid",
"started_at": "2026-03-26T01:10:00Z",
"ended_at": "2026-03-26T01:30:00Z",
"duration_minutes": 20,
"category": "Mechanical",
"reason": "Conveyor jam"
}
],
"oee": {
"availability": 83.4,
"performance": 100.0,
"quality": 99.8,
"overall": 83.2
}
}
],
"meta": { "from": "2026-03-01", "to": "2026-03-31", "count": 1 }
}
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"machine_id": "uuid",
"machine_name": "Auto 3",
"site_id": "uuid",
"site_name": "Main Plant",
"total_runs": 42,
"total_units": 385000,
"total_target": 420000,
"attainment_pct": 91.7,
"availability_pct": 88.2
}
],
"meta": { "from": "2026-01-01", "to": "2026-03-31" }
}
Quality
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. Filter checks on or after this date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
| machine_id | string | Filter by machine UUID. |
| passed | boolean | Filter by pass/fail status. true or false. |
| limit | number | Maximum records. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"checked_at": "2026-03-26T09:15:00Z",
"passed": true,
"notes": null,
"machine": { "id": "uuid", "name": "Auto 3" },
"site": { "id": "uuid", "name": "Main Plant" },
"template": { "id": "uuid", "name": "Packaging Inspection" },
"logged_by": { "id": "uuid", "full_name": "Jane Smith" }
}
],
"meta": { "from": "2026-03-01", "to": "2026-03-31", "count": 1 }
}
Maintenance
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
| is_open | boolean | Filter open or closed downtime events. |
| limit | number | Maximum records. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"started_at": "2026-03-26T08:00:00Z",
"ended_at": "2026-03-26T08:45:00Z",
"duration_minutes": 45,
"is_open": false,
"reason": "Gearbox failure",
"asset": {
"id": "uuid",
"name": "Conveyor Belt A",
"asset_number": "EQ-001",
"category": "Conveyor"
},
"site": { "id": "uuid", "name": "Main Plant" }
}
],
"meta": { "from": "2026-03-01", "to": "2026-03-31", "count": 1 }
}
Safety
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. Filter incidents on or after this date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
| status | string | Filter by status: reported, under_investigation, corrective_actions_open, closed. |
| severity | string | Filter by severity level. |
| limit | number | Maximum records. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"reference_number": "INC-2026-001",
"title": "Slip hazard near packaging line",
"severity": "minor",
"status": "closed",
"occurred_at": "2026-03-15T14:30:00Z",
"location": "Packaging area",
"site": { "id": "uuid", "name": "Main Plant" }
}
],
"meta": { "from": "2026-01-01", "to": "2026-03-31", "count": 1 }
}
Batching
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. Filter batches created on or after this date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
| limit | number | Maximum records. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"batch_number": "BB-2026-0001",
"total_qty": 150,
"qty_uom": "kg",
"notes": null,
"created_at": "2026-04-12T22:07:09Z",
"site_id": "uuid",
"site_name": "Main Plant",
"recipe_id": "uuid",
"recipe_code": "SKU-001",
"recipe_name": "Product Name",
"recipe_version": 1,
"is_formulation": false,
"ingredients": [
{
"id": "uuid",
"material_id": "uuid",
"material_code": "RM-001",
"material_name": "Raw Material Name",
"qty_used": 75,
"uom": "kg",
"supplier_batch": "SUP-BATCH-001"
}
]
}
],
"meta": { "count": 1, "from": null, "to": null }
}
Query parameters
| Parameter | Type | Description |
|---|---|---|
| from | string | ISO 8601 date. Filter logs on or after this date. |
| to | string | ISO 8601 date. |
| site_id | string | Filter by site UUID. |
| limit | number | Maximum records. Default 500, maximum 1000. |
Response
{
"company": "Acme Manufacturing",
"data": [
{
"id": "uuid",
"logged_at": "2026-04-09T20:15:01Z",
"site_id": "uuid",
"site_name": "Main Plant",
"machine_id": "uuid",
"machine_name": "Extruder 1",
"product_sku": "SKU-001",
"product_description": "Product Name",
"run_id": "uuid",
"batch_number": "0001",
"recipe_id": "uuid",
"recipe_code": "SKU-001",
"recipe_name": "Recipe Name",
"material_id": "uuid",
"material_code": "RM-001",
"material_name": "Raw Material Name",
"qty_used": 0.15,
"uom": "kg",
"supplier_batch": "SUP-BATCH-001"
}
],
"meta": { "count": 1 }
}
Errors
The API uses standard HTTP status codes.
| Status | Meaning |
|---|---|
| 200 | Success |
| 401 | Missing or invalid API key |
| 403 | API key does not have access to the requested resource |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Error responses include a JSON body with a message field explaining the error:
{ "error": "Invalid or missing API key" }