Skip to navigation

Create Unit

Create Unit.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
aliaseslist of stringsRequired
Alternative abbreviations for this unit, e.g. alternate symbols.
conversionFactorstringRequiredformat: "decimal"
Conversion factor relative to the UnitType's base unit.
namestringRequired

The long-form name, e.g. “milliliter”.

symbolstringRequired

The short-form label, e.g. “mL”.

unitTypeIdstringRequired
The API ID of the UnitType this unit belongs to.

Response

Created
__typenamestringOptional
aliaseslist of stringsOptional

Any additional short-form labels that should be recognized in input

archiveReasonstring or nullOptional
archivedbooleanOptional
conversionFactorstringOptionalformat: "decimal"
Conversion factor relative to the UnitType's baseUnit. E.g. for a kilometer, the baseUnit is meter and the conversionFactor is 1000.
createdAtstring or nullOptionalformat: "datetime"
idstringOptional
modifiedAtstring or nullOptionalformat: "datetime"
namestringOptional

Default long-form identifier, e.g. “meter”.

symbolstringOptional

Default short-form label, e.g. “m” for meter.

unitTypeobjectOptional

The unit type this unit belongs to. Units within the same UnitType are inter-convertible.

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error