PUT
Edit a unit of measure
Company space For: Manager · Permission: uom_units.update Conditions
  • Built-in units cannot be changed.
  • The name is lowercased and must stay unique within the category; the code must be unique in the organization (case-insensitive).
  • Only the name and the code can change; the conversion factor and the reference flag cannot.
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 owns the unit (27-character KSUID).

unit
string
required

Identifier of the unit to update (27-character KSUID). It must belong to the category.

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
name
string

New unit name, lowercased; at most 120 characters and unique within the category. Omit to keep the current name.

Maximum string length: 120
code
string

New short symbol, at most 10 characters, unique among the organization's units ignoring case. Omit to keep the current code.

Maximum string length: 10

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