Skip to content

Dates Units & Currencies

Date and time format

Date and DateTime follow the ISO 8601 format in requests and responses.

Year : YYYY (e.g. 2016)
Year and month : YYYY-MM (e.g. 2015-06)
Complete date : YYYY-MMM-DD (e.g. 2026-06-13)

Complete date plus hours and minutes:
YYYY-MM-DDThh:mmTZD
2016-06-13T19:20+01:00

Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD
2016-06-13T19:20:30+01:00

Complete date plus hours, minutes, seconds and a decimal fraction of a second
1997-07-16T19:20:30.45+01:00

YYYY = four-digit year
MM = two-digit month (01=January, etc.)
DD = two-digit day of month (01 to 31)
hh = two-digit of hour (00 to 23) (am/pm NOT allowed)
mm = two-digit of minute (00 to 59)
ss = two-digit of second (00 to 59)
s = one or more digits representing a decimal fraction of a second
TZD = time zone designator (Z or +hh:mm or -hh:mm)

Incoming POST/PUT requests with DateTime can have a timezone and will be converted to UTC. DateTime in responses are always in UTC.

Querying dates

When querying or filtering, partial dates should also be supported where appropriate. The query format must match the date format in the database. For example, the query :

GET v1/assets?production_date=2016-06

should return only those assets, where the production date is set to 2016-06, not those assets where the additional day information is available.

To retrieve all assets produced in June 2016, the date range query is as follows.

GET v1/assets?production_date_from=2016-06-01&production_date_to=2016-06-30

Currency

Example currency (enum) Three-letter ISO currency code, in lower case. Must be a supported currency.

Units

Currently available units can be retrieved using the units the units endpoint

v1/units

The following units exist as a fallback, if a requested unit is not available:

  • other: a known unit that is not available in the API
  • unknown: an unknown unit.

Values are stored in the original and in the base units, so that a conversion to another unit is possible when querying the values.

Conversion is possible between the base unit and its derived units. For example, values with the unit degree Celsius are also stored in the base unit Kelvin and can be converted to Kelvin, Fahrenheit, Rankine and other units derived from Kelvin.