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

Tags

Labels for products, customers or suppliers. Each list is for one target type, set with ref_type.

catalog:readcatalog:writehttps://public-api.nutrasoft.ca/v1
Linked fromProductstag_ids

The Tag object

  • idinteger
  • descriptionstringnullable
  • namestring
  • ref_typestring

    What this tag can be attached to. Fixed when the tag is created.

    • one ofPRODUCTCUSTOMERSUPPLIER

Operations

List tags

get/tagscatalog:read

Tags for one target type; ref_type is required.

Query parameters

  • ref_typestringrequired

    Which target type's tags to return.

    • one ofPRODUCTCUSTOMERSUPPLIER
  • searchstringnullable

    Free-text match on the name.

  • namestringnullable

    Partial match on the name.

  • sortstringnullable

    Comma-separated field:direction pairs, e.g. id:desc. Sortable: 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 Tag objects in data, with pagination.
Errors
400 401 403 429 500 503
GET /tags
curl "https://public-api.nutrasoft.ca/v1/tags?limit=50" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": [
    {
      "id": 123,
      "description": "string",
      "name": "Sample name",
      "ref_type": "PRODUCT"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 1,
    "has_more": false
  },
  "order": "id:asc"
}

Retrieve a tag

get/tags/{tag_id}catalog:read

Path parameters

  • tag_idintegerrequired

    The tag's id.

    • > 0
Returns
200 One Tag object in data.
Errors
400 401 403 404 429 500 503
GET /tags/{tag_id}
curl "https://public-api.nutrasoft.ca/v1/tags/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": {
    "id": 123,
    "description": "string",
    "name": "Sample name",
    "ref_type": "PRODUCT"
  }
}

Create a tag

post/tagscatalog:write

A tag's name is unique per ref_type within your account, and ref_type cannot be changed later. A duplicate is a 409.

Request body

  • namestringrequired

    Unique within your account, per ref_type.

    • min 1 chars
    • max 100 chars
  • ref_typestringrequired

    What this tag can be attached to. Cannot be changed later.

    • one ofPRODUCTCUSTOMERSUPPLIER
  • descriptionstringnullable
    • max 500 chars
Returns
201 One Tag object in data.
Errors
400 401 403 409 429 500 503
POST /tags
curl -X POST "https://public-api.nutrasoft.ca/v1/tags" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Sample name",
  "ref_type": "PRODUCT"
}'
Response201
{
  "data": {
    "id": 123,
    "description": "string",
    "name": "Sample name",
    "ref_type": "PRODUCT"
  }
}

Update a tag

patch/tags/{tag_id}catalog:write

Omitted fields are left unchanged. ref_type cannot be changed.

Path parameters

  • tag_idintegerrequired

    The tag's id.

    • > 0

Request body

  • descriptionstringnullable
    • max 500 chars
  • namestringnullable
    • min 1 chars
    • max 100 chars
Returns
200 One Tag object in data.
Errors
400 401 403 404 409 429 500 503
PATCH /tags/{tag_id}
curl -X PATCH "https://public-api.nutrasoft.ca/v1/tags/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "string"
}'
Response200
{
  "data": {
    "id": 123,
    "description": "string",
    "name": "Sample name",
    "ref_type": "PRODUCT"
  }
}

Delete a tag

delete/tags/{tag_id}catalog:write

Refused with 409 while the tag is attached to a product, customer, supplier or HACCP plan.

Path parameters

  • tag_idintegerrequired

    The tag's id.

    • > 0
Returns
200 One Tag object in data.
Errors
400 401 403 404 409 429 500 503
DELETE /tags/{tag_id}
curl -X DELETE "https://public-api.nutrasoft.ca/v1/tags/123" \
  -H "Authorization: Bearer $NUTRASOFT_API_KEY"
Response200
{
  "data": {
    "id": 123,
    "description": "string",
    "name": "Sample name",
    "ref_type": "PRODUCT"
  }
}