> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gobl.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Unit

Unit defines how the quantity of the product should be interpreted either using a GOBL lower-case key (e.g. 'kg'), or UN/ECE code upper-case code (e.g. 'KGM').

## Schema ID

`https://gobl.org/draft-0/org/unit`

## Values

| Value        | Title              | Description                                                                                                                                 |
| ------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `mg`         | Milligrams         |                                                                                                                                             |
| `g`          | Metric grams       |                                                                                                                                             |
| `kg`         | Metric kilograms   |                                                                                                                                             |
| `t`          | Metric tons        |                                                                                                                                             |
| `mm`         | Milimetres         |                                                                                                                                             |
| `cm`         | Centimetres        |                                                                                                                                             |
| `dm`         | Decimetres         | A unit of length equal to one-tenth of a metre.                                                                                             |
| `m`          | Metres             |                                                                                                                                             |
| `km`         | Kilometers         |                                                                                                                                             |
| `in`         | Inches             |                                                                                                                                             |
| `ft`         | Feet               |                                                                                                                                             |
| `mm2`        | Square millimetres |                                                                                                                                             |
| `cm2`        | Square centimetres |                                                                                                                                             |
| `dm2`        | Square decimetres  |                                                                                                                                             |
| `m2`         | Square metres      |                                                                                                                                             |
| `ac`         | Acres              | A unit of area equal to 43,560 square feet.                                                                                                 |
| `ha`         | Hectares           | A unit of area equal to 10,000 square metres.                                                                                               |
| `mm3`        | Cubic millimetres  |                                                                                                                                             |
| `cm3`        | Cubic centimetres  |                                                                                                                                             |
| `dm3`        | Cubic decimetres   |                                                                                                                                             |
| `m3`         | Cubic metres       |                                                                                                                                             |
| `ml`         | Millilitres        |                                                                                                                                             |
| `cl`         | Centilitres        |                                                                                                                                             |
| `l`          | Litres             |                                                                                                                                             |
| `w`          | Watts              |                                                                                                                                             |
| `kw`         | Kilowatts          |                                                                                                                                             |
| `kwh`        | Kilowatt Hours     |                                                                                                                                             |
| `rate`       | Rate               | A unit of quantity expressed as a rate for usage of a facility or service.                                                                  |
| `mon`        | Months             | Unit of time equal to 1/12 of a year of 365,25 days.                                                                                        |
| `day`        | Days               |                                                                                                                                             |
| `s`          | Seconds            |                                                                                                                                             |
| `h`          | Hours              |                                                                                                                                             |
| `min`        | Minutes            |                                                                                                                                             |
| `piece`      | Pieces             | A unit of count defining the number of pieces (piece: a single item, article or exemplar).                                                  |
| `item`       | Items              | A unit of count defining the number of items regarded as separate units.                                                                    |
| `pair`       | Pairs              | A unit of count defining the number of pairs (pair: item described by two's).                                                               |
| `dozen`      | Dozens             | A unit of count defining the number of units in multiples of 12.                                                                            |
| `assortment` | Assortments        | A unit of count defining the number of assortments (assortment: a collection of items or components of a single product packaged together). |
| `service`    | Service Units      | A unit of count defining the number of service units (service unit: defined period / property / facility / utility of supply).              |
| `job`        | Jobs               | A unit of count defining the number of jobs.                                                                                                |
| `activity`   | Activities         | A unit of count defining the number of activities (activity: a unit of work or action).                                                     |
| `trip`       | Trips              | A unit of count defining the number of trips (trip: a journey to a place and back again).                                                   |
| `group`      | Groups             | A unit of count defining the number of groups (group: set of items classified together).                                                    |
| `outfit`     | Outfits            | A unit of count defining the number of outfits (outfit: a complete set of equipment / materials / objects used for a specific purpose).     |
| `kit`        | Kits               | A unit of count defining the number of kits (kit: tub, barrel or pail).                                                                     |
| `basebox`    | Base Boxes         | A unit of area of 112 sheets of tin mil products (tin plate, tin free steel or black plate) 14 by 20 inches, or 31,360 square inches.       |
| `pk`         | Bulk Packs         | A unit of count defining the number of items per bulk pack.                                                                                 |
| `one`        | One                | A single generic unit of a service or product.                                                                                              |
| `bag`        | Bags               |                                                                                                                                             |
| `box`        | Boxes              |                                                                                                                                             |
| `bin`        | Bins               |                                                                                                                                             |
| `can`        | Cans               |                                                                                                                                             |
| `tub`        | Tubs               |                                                                                                                                             |
| `case`       | Cases              |                                                                                                                                             |
| `tray`       | Trays              |                                                                                                                                             |
| `portion`    | Portions           |                                                                                                                                             |
| `set`        | Sets               | A unit of count defining the number of sets (set: a number of objects grouped together).                                                    |
| `roll`       | Rolls              |                                                                                                                                             |
| `carton`     | Cartons            |                                                                                                                                             |
| `cylinder`   | Cylinders          |                                                                                                                                             |
| `barrel`     | Barrels            |                                                                                                                                             |
| `jerrican`   | Jerricans          | Jerrican, cylindrical                                                                                                                       |
| `carboy`     | Carboys            |                                                                                                                                             |
| `demijohn`   | Demijohn           |                                                                                                                                             |
| `bottle`     | Bottles            |                                                                                                                                             |
| `6pack`      | Six Packs          |                                                                                                                                             |
| `canister`   | Canisters          |                                                                                                                                             |
| `pkg`        | Packages           | Standard packaging unit.                                                                                                                    |
| `bunch`      | Bunches            |                                                                                                                                             |
| `tetrabrik`  | Tetra-Briks        |                                                                                                                                             |
| `pallet`     | Pallets            |                                                                                                                                             |
| `reel`       | Reels              |                                                                                                                                             |
| `sack`       | Sacks              |                                                                                                                                             |
| `sheet`      | Sheets             |                                                                                                                                             |
| `envelope`   | Envelopes          |                                                                                                                                             |
| `lot`        | Lot                |                                                                                                                                             |
| `unit`       | Unit               | A type of package composed of a single item or object, not otherwise specified as a unit of transport equipment.                            |

## Validation Rules

| Field               | Test                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Validation Code / Message                                         |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| <small>Unit</small> | <ul class="gobl-test"><li>Matches ^\[A-Z0-9]{2,3}\$, or one of \[mg, g, kg, t, mm, cm, dm, m, km, in, ft, mm2, cm2, dm2, m2, ac, ha, mm3, cm3, dm3, m3, ml, cl, l, w, kw, kwh, rate, mon, day, s, h, min, piece, item, pair, dozen, assortment, service, job, activity, trip, group, outfit, kit, basebox, pk, one, bag, box, bin, can, tub, case, tray, portion, set, roll, carton, cylinder, barrel, jerrican, carboy, demijohn, bottle, 6pack, canister, pkg, bunch, tetrabrik, pallet, reel, sack, sheet, envelope, lot, unit]</li></ul> | `GOBL-ORG-UNIT-01`<br />Unit must be a valid value or UN/ECE code |
