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

Productions

Production runs, what they plan to consume and what they consumed, lot by lot.

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

The Production object

  • idinteger
  • consumed_stepsarray of objectsnullable

    What the run consumed, lot by lot. On GET /productions/{production_id} only; null elsewhere.

    Show 3 fields of consumed_steps
    • lot_idintegernullable

      Set on consumption only, not on a plan.

    • product_idintegernullable
    • quantity_basenumbernullable

      In the component product's base unit.

  • end_datestringnullable
    • UTC timestamp
  • expiration_datestringnullable
    • UTC timestamp
  • location_idintegernullable
  • lot_numberstringnullable
  • planned_stepsarray of objectsnullable

    What the run intends to consume. On GET /productions/{production_id} only; null elsewhere.

    Show 3 fields of planned_steps
    • lot_idintegernullable

      Set on consumption only, not on a plan.

    • product_idintegernullable
    • quantity_basenumbernullable

      In the component product's base unit.

  • produced_qty_display_unitsnumbernullable

    What was produced, in the product's display unit.

  • product_idintegernullable
  • production_line_idintegernullable
Show 4 more attributes
  • production_nointegernullable

    The run number, unique within your account.

  • production_qty_display_unitsnumbernullable

    The planned quantity, in the product's display unit. Step quantities are in base units.

  • start_datestringnullable
    • UTC timestamp
  • statusstring
    • one ofPLANNEDIN_PROGRESSIN_PROGRESS_TRANSFORMATIONCOMPLETEDCANCELLEDON_HOLDQUARANTINE

Operations

List production runs

get/productionsmanufacturing:read

planned_steps and consumed_steps are null here: retrieve a run for them.

Query parameters

  • statusarray of stringnullable

    Repeat the parameter to match any of several statuses.

    • one ofPLANNEDIN_PROGRESSIN_PROGRESS_TRANSFORMATIONCOMPLETEDCANCELLEDON_HOLDQUARANTINE
  • product_idintegernullable
    • > 0
  • production_line_idintegernullable
    • > 0
  • lot_numberstringnullable
  • searchstringnullable

    Free-text match.

  • sortstringnullable

    Comma-separated field:direction pairs, e.g. id:desc. Sortable: end_date, id, production_no, start_date, status. 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 Production objects in data, with pagination.
Errors
400 401 403 429 500 503
GET /productions
curl "https://public-api.nutrasoft.ca/v1/productions?limit=50" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": [
    {
      "id": 123,
      "consumed_steps": [
        {
          "lot_id": 123,
          "product_id": 123,
          "quantity_base": 12.5
        }
      ],
      "end_date": "2026-09-10T14:30:00Z",
      "expiration_date": "2026-09-10T14:30:00Z",
      "location_id": 123,
      "lot_number": "LOT-2026-0142",
      "planned_steps": [
        {
          "lot_id": 123,
          "product_id": 123,
          "quantity_base": 12.5
        }
      ],
      "produced_qty_display_units": 12.5,
      "product_id": 123,
      "production_line_id": 123,
      "production_no": 10,
      "production_qty_display_units": 12.5,
      "start_date": "2026-09-10T14:30:00Z",
      "status": "PLANNED"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1,
    "has_more": false
  },
  "order": "id:asc"
}

Retrieve a production run

get/productions/{production_id}manufacturing:read

Includes planned_steps, what the run intends to consume, and consumed_steps, what it consumed lot by lot, both in base units.

Path parameters

  • production_idintegerrequired

    The run's id.

    • > 0
Returns
200 One Production object in data.
Errors
400 401 403 404 429 500 503
GET /productions/{production_id}
curl "https://public-api.nutrasoft.ca/v1/productions/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": {
    "id": 123,
    "consumed_steps": [
      {
        "lot_id": 123,
        "product_id": 123,
        "quantity_base": 12.5
      }
    ],
    "end_date": "2026-09-10T14:30:00Z",
    "expiration_date": "2026-09-10T14:30:00Z",
    "location_id": 123,
    "lot_number": "LOT-2026-0142",
    "planned_steps": [
      {
        "lot_id": 123,
        "product_id": 123,
        "quantity_base": 12.5
      }
    ],
    "produced_qty_display_units": 12.5,
    "product_id": 123,
    "production_line_id": 123,
    "production_no": 10,
    "production_qty_display_units": 12.5,
    "start_date": "2026-09-10T14:30:00Z",
    "status": "PLANNED"
  }
}

Change a production run's status

post/productions/{production_id}/statusmanufacturing:write

Moves a run between PLANNED, ON_HOLD, QUARANTINE and CANCELLED. Starting and completing a run happen on the production floor, so IN_PROGRESS, IN_PROGRESS_TRANSFORMATION and COMPLETED are refused with 409, as are runs already COMPLETED or CANCELLED and signed, locked records. The response carries no steps.

Path parameters

  • production_idintegerrequired

    The run's id.

    • > 0

Request body

  • statusstringrequired

    PLANNED, ON_HOLD, QUARANTINE or CANCELLED. IN_PROGRESS, IN_PROGRESS_TRANSFORMATION and COMPLETED are refused with 409: starting and completing a run happen on the production floor.

    • one ofPLANNEDIN_PROGRESSIN_PROGRESS_TRANSFORMATIONCOMPLETEDCANCELLEDON_HOLDQUARANTINE
Returns
200 One Production object in data.
Errors
400 401 403 404 409 429 500 503
POST /productions/{production_id}/status
curl -X POST "https://public-api.nutrasoft.ca/v1/productions/123/status" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "ON_HOLD"
}'
Response200
{
  "data": {
    "id": 123,
    "consumed_steps": [
      {
        "lot_id": 123,
        "product_id": 123,
        "quantity_base": 12.5
      }
    ],
    "end_date": "2026-09-10T14:30:00Z",
    "expiration_date": "2026-09-10T14:30:00Z",
    "location_id": 123,
    "lot_number": "LOT-2026-0142",
    "planned_steps": [
      {
        "lot_id": 123,
        "product_id": 123,
        "quantity_base": 12.5
      }
    ],
    "produced_qty_display_units": 12.5,
    "product_id": 123,
    "production_line_id": 123,
    "production_no": 10,
    "production_qty_display_units": 12.5,
    "start_date": "2026-09-10T14:30:00Z",
    "status": "PLANNED"
  }
}