GET
View a unit of an item
Company space For: Manager, Cashier and seller, Stock keeper, Buyer · Permission: variant_units.retrieve, bundle_units.retrieve Conditions
  • The permission depends on the type of item: variant_units.retrieve or bundle_units.retrieve.
Part of Set prices and units of sale.

Authorizations

Authorization
string
header
required

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

Path Parameters

stockable
string
required

Identifier of the sellable item (stockable): the stockable record of a product variant or of a bundle, not the variant or bundle identifier itself.

unit
string
required

Identifier of the unit of measure (27-character KSUID).

Query Parameters

response
enum<string>
default:resource

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

Available options:
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, stockable_id, uom_unit_id, sku, barcode, is_active, sort_order, 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: uomUnit, prices, stockable, stockable.vat_rate, stockable.taxes, stockable.subject.

Response

200 - application/json

Resource.

id

Identifier of the unit of sale (27-character KSUID string).

stockable_id

Identifier of the item the unit belongs to.

uom_unit_id

Identifier of the unit of measure (for example piece or box) this unit of sale uses.

sku

Stock keeping unit code, unique within the organization. Generated as ITEM-UNIT-001 when not sent at creation.

barcode

Barcode of the unit, unique within the organization when set; null when none.

is_active
boolean

Whether the unit can be used for new prices and sales. A unit already used by orders is deactivated instead of deleted.

sort_order
integer

Display position of the unit; lower values come first. 0 when not sent at creation.

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

uom_unit
object | null

Unit of measure object. Only returned when selected with ?include=uomUnit.

prices
array

Prices of this unit for the caller's company. Only returned when selected with ?include=prices.

stockable
object | null

The item the unit belongs to. Only returned when selected with ?include=stockable.