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

Warehouses

Your storage sites. Production lines and equipment belong to one.

inventory:readinventory:writehttps://public-api.nutrasoft.ca/v1

The Warehouse object

  • idinteger

    The warehouse's location id.

  • codestringnullable
  • descriptionstringnullable
  • is_activeboolean
  • namestringnullable

Operations

List warehouses

get/warehousesinventory:read

Your storage sites. Floor plans are not published.

Query parameters

  • namestringnullable

    Partial match on the name.

  • searchstringnullable

    Free-text match.

  • 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 Warehouse objects in data, with pagination.
Errors
400 401 403 429 500 503
GET /warehouses
curl "https://public-api.nutrasoft.ca/v1/warehouses?limit=50" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": [
    {
      "id": 123,
      "code": "SAMPLE-01",
      "description": "string",
      "is_active": true,
      "name": "Sample name"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1,
    "has_more": false
  },
  "order": "id:asc"
}

Retrieve a warehouse

get/warehouses/{warehouse_id}inventory:read

Path parameters

  • warehouse_idintegerrequired

    The warehouse's id.

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

Create a warehouse

post/warehousesinventory:write

Creates an active storage site with the default floor plan, ready to use in NutraSoft. code is unique among your warehouses; a duplicate is a 409.

Request body

  • codestringrequired

    Short code, unique among your warehouses.

    • min 1 chars
    • max 40 chars
  • namestringrequired
    • min 1 chars
    • max 100 chars
  • descriptionstringnullable
    • max 500 chars
Returns
201 One Warehouse object in data.
Errors
400 401 403 409 429 500 503
POST /warehouses
curl -X POST "https://public-api.nutrasoft.ca/v1/warehouses" \
  -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",
    "description": "string",
    "is_active": true,
    "name": "Sample name"
  }
}

Update a warehouse

patch/warehouses/{warehouse_id}inventory:write

Omitted fields are left unchanged, and a null is ignored rather than clearing the field. Changing code also moves the site's location path.

Path parameters

  • warehouse_idintegerrequired

    The warehouse's id.

    • > 0

Request body

  • codestringnullable
    • min 1 chars
    • max 40 chars
  • descriptionstringnullable
    • max 500 chars
  • namestringnullable
    • min 1 chars
    • max 100 chars
Returns
200 One Warehouse object in data.
Errors
400 401 403 404 409 429 500 503
PATCH /warehouses/{warehouse_id}
curl -X PATCH "https://public-api.nutrasoft.ca/v1/warehouses/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "code": "SAMPLE-01"
}'
Response200
{
  "data": {
    "id": 123,
    "code": "SAMPLE-01",
    "description": "string",
    "is_active": true,
    "name": "Sample name"
  }
}

Delete a warehouse

delete/warehouses/{warehouse_id}inventory:write

Deletes the site and every location under it. Refused with 409 while an inventory count is running there or any of its locations is still used by stock, movements, productions or counts.

Path parameters

  • warehouse_idintegerrequired

    The warehouse's id.

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