Fishbowl
Fishbowl Advanced REST API Documentation

Unit of Measure

This is an object representing a Fishbowl unit of measure (UOM).

Related guide: Unit of Measure


The UOM object
Attributes

  • id integer
    The UOM's unique identification number.

  • name string
    The UOM name.

  • abbreviation string
    The UOM abbreviation.

  • description string
    The UOM description.

  • type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'
    The basic type of the UOM.

  • active boolean
    The active status of the UOM.

  • integral boolean
    Indicates if the quantity must be a whole number.

  • readOnly boolean
    Indicates if the UOM is read-only.

  • conversions list
    A list of the UOM conversions.

THE UOM OBJECT
{
  "id": 1,
  "name": "Each",
  "abbreviation": "ea",
  "description": "A single item.",
  "type": "Count",
  "active": true,
  "integral": true,
  "readOnly": true,
  "conversions": [
    {
      "id": 32,
      "description": "1 Pair = 2.0 Each",
      "targetUom": {
        "id": 18,
        "name": "Pair",
        "abbreviation": "pr"
      },
      "divisor": "2",
      "multiplier": "1"
    }
  ]
}

Search for units of measure

Searches for units of measure.

Parameters

  • pageNumber integer
    The current page of the results.

  • pageSize integer
    The number of returned results per page. (Default 100)

  • name string
    The UOM name.

  • abbreviation string
    The UOM abbreviation.

  • description string
    The UOM description.

  • type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'
    The basic type of the UOM.

  • active boolean
    The active status of the UOM.
Attributes

    No attributes.


GET /api/uoms
curl --location \
--request GET '<YOUR SERVER>/api/uoms' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>'
RESPONSE
{
  "totalCount": 1,
  "totalPages": 1,
  "pageNumber": 1,
  "pageSize": 100,
  "results": [
    {
      "id": 1,
      "name": "Each",
      "abbreviation": "ea",
      "description": "A single item.",
      "type": "Count",
      "active": true
    }
  ]
}

Get a unit of measure

Retrieves the details of a unit of measure. You only need to provide the unique UOM ID.

Attributes

    No attributes.


GET /api/uoms/:id
curl --location \
--request GET '<YOUR SERVER>/api/uoms/:id' \
--header 'Authorization: Bearer <TOKEN>'
RESPONSE
{
  "id": 1,
  "name": "Each",
  "abbreviation": "ea",
  "description": "A single item.",
  "type": "Count",
  "active": true,
  "integral": true,
  "readOnly": true,
  "conversions": [
    {
      "id": 32,
      "description": "1 Pair = 2.0 Each",
      "targetUom": {
        "id": 18,
        "name": "Pair",
        "abbreviation": "pr"
      },
      "divisor": "2",
      "multiplier": "1"
    },
    {
      "id": 34,
      "description": "1 Package = 20.0 Each",
      "targetUom": {
        "id": 19,
        "name": "Package",
        "abbreviation": "pk"
      },
      "divisor": "20",
      "multiplier": "1"
    }
  ]
}

Create a unit of measure

Creates a unit of measure.

Attributes

  • name string
    The UOM name.

  • abbreviation string
    The UOM abbreviation.

  • description string
    The UOM description.

  • type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'
    The basic type of the UOM.

  • active boolean optional
    The active status of the UOM.

  • readOnly boolean optional
    Indicates if the UOM is read-only.

  • conversions list optional
    A list of the UOM conversions.

POST /api/uoms
curl --location \
--request POST '<YOUR SERVER>/api/uoms' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '<UOM JSON>'
RESPONSE
{
  "id": 25,
  "name": "box",
  "abbreviation": "bx",
  "description": "A cardboard container",
  "type": "Count",
  "active": true,
  "integral": false,
  "readOnly": false,
  "conversions": [
    {
      "id": 37,
      "description": "1 box = 15.0 Each",
      "targetUom": {
        "id": 1,
        "name": "Each",
        "abbreviation": "ea"
      },
      "divisor": "15",
      "multiplier": "1"
    }
  ]
}

Update a unit of measure

Update a unit of measure.

Attributes

  • name string
    The UOM name.

  • abbreviation string
    The UOM abbreviation.

  • description string
    The UOM description.

  • active boolean optional
    The active status of the UOM.

  • readOnly boolean optional
    Indicates if the UOM is read-only.

  • conversions list optional
    A list of the UOM conversions. Any existing conversions will be deleted if the field is not included or the list is blank.

POST /api/uoms/:id
curl --location \
--request POST '<YOUR SERVER>/api/uoms/:id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '<UOM JSON>'
RESPONSE
{
  "id": 25,
  "name": "box",
  "abbreviation": "bx",
  "description": "A cardboard container",
  "type": "Count",
  "active": true,
  "integral": false,
  "readOnly": false,
  "conversions": [
    {
      "id": 37,
      "description": "1 box = 15.0 Each",
      "targetUom": {
        "id": 1,
        "name": "Each",
        "abbreviation": "ea"
      },
      "divisor": "15",
      "multiplier": "1"
    }
  ]
}

Delete a unit of measure

Deletes the unit of measure with the specified ID.

Attributes

    No attributes.


DELETE /api/uoms/:id
curl --location \
--request DELETE '<YOUR SERVER>/api/uoms/:id' \
--header 'Authorization: Bearer <TOKEN>'
RESPONSE
{}