POST
Create a measurement category
Company space For: Manager · Permission: uom_categories.create Conditions
  • The name is trimmed and lowercased, required, at most 120 characters, unique among the organization’s categories and cannot be the reserved name exowpee_bundle_count.
  • At least one unit is required; unit names must be distinct and unit codes distinct (case-insensitive) and not already used by any unit of the organization.
  • Exactly one unit must be the reference unit and its conversion factor must be 1; every other unit needs a conversion factor greater than 1.
  • Conversion factors are integers.
What else happens
  • Creates the category (custom, not built-in) and inserts all its units in the same transaction; unit names are stored lowercased.
Part of Units of measure.

Authorizations

Authorization
string
header
required

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

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, name, 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: units.

Body

application/json
name
string
required

Name of the category. Trimmed and lowercased; required, at most 120 characters, unique in the organization and not the reserved exowpee_bundle_count.

Maximum string length: 120
units
object[]
required

Units of the category. Required, at least one; exactly one must be the reference unit.

Minimum array length: 1

Response

Resource (only with response=resource).

id

Identifier of the category (27-character KSUID).

name

Lowercase name of the category, unique within the organization.

units
array

Units of the category of the current organization. Present only when requested with include=units.

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).