Data Types

The Spendesk API aims to have consistency across all endpoints, this page defines common data type formats that are used.

Date and Date-time

The ISO 8601 format is used for date and time:

  • Date format - yyyy-MM-dd e.g. 2023-09-12
  • Date-time format - yyyy-MM-ddTHH:mm:ssZ e.g. 2023-09-12T12:30:00Z

Date-times are expressed in UTC, which the trailing Z denotes (Z is equivalent to +00:00). Some responses include milliseconds, e.g. 2023-09-12T12:30:00.000Z.

Currency

The alphabetic ISO 4217 format is used for currency code:

  • Currency code format - USD for US dollar

All currency values are expressed in the smallest units of the currency (e.g. cents for EUR and USD, but yen for JPY).

  • Currency amount format - $130.99 would be returned as 13099