NutraSoft food manufacturing ERP software
Esc
  • GuideGetting startedThree steps to your first call and your first order, then the two shapes every response takes.
  • GuideAuthentication and keysBearer keys, test and live environments, rotation without an outage, and what each scope grants.
  • GuideTest modeA second NutraSoft account of your own, seeded with realistic data, that you can safely break.
  • PageErrorsEvery error code the API returns, what it means, what to do about it and whether to retry.
  • PageConventionsThe rules every operation follows: money, time, paging, sorting, nulls, PATCH and identifiers.
Menu

Equipment

Machines and tools, and whether each one is in service.

manufacturing:readmanufacturing:writehttps://public-api.nutrasoft.ca/v1

The Equipment object

  • idinteger
  • codestring
  • namestring
  • out_of_serviceboolean

    True when the equipment is unavailable for production.

  • warehouse_idintegernullable

    Where it is. Resolve with GET /warehouses/{warehouse_id}.

Operations

List equipment

get/equipmentmanufacturing:read

Query parameters

  • searchstringnullable

    Free-text match on code or name.

  • codestringnullable

    Partial match on the code.

  • namestringnullable

    Partial match on the name.

  • include_out_of_serviceboolean

    Set false for only the equipment available for production.

    • default true
  • sortstringnullable

    Comma-separated field:direction pairs, e.g. id:desc. Sortable: code, id, name. id is always added last, so paging is stable.

  • limitinteger

    Rows to return. Maximum 200.

    • >= 1
    • <= 200
    • default 50
  • offsetinteger

    Rows to skip. Maximum 10000: to read further, narrow the filters or page with updated_since.

    • >= 0
    • <= 10000
    • default 0
Returns
200 A page of Equipment objects in data, with pagination.
Errors
400 401 403 429 500 503
GET /equipment
curl "https://public-api.nutrasoft.ca/v1/equipment?limit=50" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": [
    {
      "id": 123,
      "code": "SAMPLE-01",
      "name": "Sample name",
      "out_of_service": false,
      "warehouse_id": 123
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1,
    "has_more": false
  },
  "order": "id:asc"
}

Retrieve a piece of equipment

get/equipment/{equipment_id}manufacturing:read

Path parameters

  • equipment_idintegerrequired

    The equipment's id.

    • > 0
Returns
200 One Equipment object in data.
Errors
400 401 403 404 429 500 503
GET /equipment/{equipment_id}
curl "https://public-api.nutrasoft.ca/v1/equipment/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": {
    "id": 123,
    "code": "SAMPLE-01",
    "name": "Sample name",
    "out_of_service": false,
    "warehouse_id": 123
  }
}

Create a piece of equipment

post/equipmentmanufacturing:write

code is stored trimmed and upper-cased and is unique within your account; a duplicate is a 409.

Request body

  • codestringrequired

    Unique within your account. Stored trimmed and upper-cased.

    • min 1 chars
    • max 40 chars
  • namestringrequired
    • min 1 chars
    • max 100 chars
  • out_of_serviceboolean

    True marks the equipment unavailable for production.

    • default false
  • warehouse_idintegernullable

    Where it is. One of your warehouses.

    • > 0
Returns
201 One Equipment object in data.
Errors
400 401 403 409 429 500 503
POST /equipment
curl -X POST "https://public-api.nutrasoft.ca/v1/equipment" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "SAMPLE-01",
  "name": "Sample name"
}'
Response201
{
  "data": {
    "id": 123,
    "code": "SAMPLE-01",
    "name": "Sample name",
    "out_of_service": false,
    "warehouse_id": 123
  }
}

Update a piece of equipment

patch/equipment/{equipment_id}manufacturing:write

Omitted fields are left unchanged. A null warehouse_id clears it.

Path parameters

  • equipment_idintegerrequired

    The equipment's id.

    • > 0

Request body

  • codestringnullable
    • min 1 chars
    • max 40 chars
  • namestringnullable
    • min 1 chars
    • max 100 chars
  • out_of_servicebooleannullable
  • warehouse_idintegernullable
    • > 0
Returns
200 One Equipment object in data.
Errors
400 401 403 404 409 429 500 503
PATCH /equipment/{equipment_id}
curl -X PATCH "https://public-api.nutrasoft.ca/v1/equipment/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "SAMPLE-01"
}'
Response200
{
  "data": {
    "id": 123,
    "code": "SAMPLE-01",
    "name": "Sample name",
    "out_of_service": false,
    "warehouse_id": 123
  }
}

Delete a piece of equipment

delete/equipment/{equipment_id}manufacturing:write

Refused with 409 while a production line or run uses the equipment. Otherwise its logs, maintenance schedules and QC tasks are deleted with it; to keep them, set out_of_service instead.

Path parameters

  • equipment_idintegerrequired

    The equipment's id.

    • > 0
Returns
200 One Equipment object in data.
Errors
400 401 403 404 409 429 500 503
DELETE /equipment/{equipment_id}
curl -X DELETE "https://public-api.nutrasoft.ca/v1/equipment/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": {
    "id": 123,
    "code": "SAMPLE-01",
    "name": "Sample name",
    "out_of_service": false,
    "warehouse_id": 123
  }
}