POST
Add units to a category
Company space For: Manager · Permission: uom_units.create Conditions
  • The category cannot be the reserved bundle category (exowpee_bundle_count).
  • Unit names are lowercased and must not already exist in the category.
  • Codes are at most 10 characters, distinct inside the payload (case-insensitive) and not already used by any unit of the organization.
  • Conversion factors are integers greater than 1: a new unit can never be the reference unit.
What else happens
  • Inserts the units as custom (not built-in, not reference) units of the category.
Part of Units of measure.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

uom_category
string
required

Identifier of the category that receives the units (27-character KSUID).

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, category_id, name, code, conversion_factor, is_reference, created_at, updated_at.

include
string

Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .

Body

application/json
units
object[]
required

Units to add to the category. Required, at least one.

Minimum array length: 1

Response

Resource (only with response=resource).

id

Identifier of the unit (27-character KSUID).

category_id

Identifier of the category that owns the unit (27-character KSUID).

name

Lowercase name of the unit, unique within its category.

code

Short symbol of the unit, unique among the organization's units ignoring case.

conversion_factor
integer

Whole number of reference units in one of this unit; 1 for the reference unit.

is_reference
boolean

True when this unit is the base unit of its category.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).