Unit of Measure
This is an object representing a Fishbowl unit of measure (UOM).
Related guide: Unit of Measure
The UOM object
Attributes
-
id integerThe UOM's unique identification number.
-
name stringThe UOM name.
-
abbreviation stringThe UOM abbreviation.
-
description stringThe UOM description.
-
type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'The basic type of the UOM.
-
active booleanThe active status of the UOM.
-
integral booleanIndicates if the quantity must be a whole number.
-
readOnly booleanIndicates if the UOM is read-only.
-
conversions listA 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 integerThe current page of the results.
-
pageSize integerThe number of returned results per page. (Default 100)
-
name stringThe UOM name.
-
abbreviation stringThe UOM abbreviation.
-
description stringThe UOM description.
-
type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'The basic type of the UOM.
-
active booleanThe 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 stringThe UOM name.
-
abbreviation stringThe UOM abbreviation.
-
description stringThe UOM description.
-
type string: 'Area' | 'Count' | 'Length' | 'Time' | 'Volume' | 'Weight'The basic type of the UOM.
-
active boolean optionalThe active status of the UOM.
-
readOnly boolean optionalIndicates if the UOM is read-only.
-
conversions list optionalA 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 stringThe UOM name.
-
abbreviation stringThe UOM abbreviation.
-
description stringThe UOM description.
-
active boolean optionalThe active status of the UOM.
-
readOnly boolean optionalIndicates if the UOM is read-only.
-
conversions list optionalA 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
{}