Data types
We use a coherent format for data such as currencies, amounts and dates across all Dojo APIs.
Currency and amount
We use the ISO 4217 alpha-3 format for defining currencies. British pounds are represented as GBP, with American dollars as USD.
We describe amounts in minor units according to the ISO 4217 standard. That means they're expressed in the smallest unit of currency. For example, 500 GBP represents £5, and 50 GBP represents £0.50.
{
"value": 500,
"currencyCode": "GBP"
}
Date and time
Date and time are described according to the ISO 8601 UTC format standard with the combined date, time, and timezone represented by one string.
For example, 2021-05-12T07:45:00Z
represents the 12th of May 2021 at 07:45:00, in the UTC timezone.
{
"transactionDateTime": "2021-05-12T07:45:00Z"
}
Country
Countries are described using two-letter country codes according to ISO 3166–1–alpha–2. For example, US for the United States of America, or GB for the United Kingdom.
{
"countryCode": "GB"
}