# Data Format

Treezor API follows the standards below regarding the formats of data it returns and accepts. Any exception will be detailed in the documentation when relevant.

# Requests

Apart from parameters that are explicitely expected in the URL (mostly IDs), Treezor expects all parameters in a JSON object.

# Example

Warning icon

Important – Correct number of parameters

Note that each endpoint expects a precise (n) number of parameters.

Providing n-x or n+x parameters can result in an error.

# Amounts

Amounts are expected as float with two decimals. They do not include the currency name.

# Example

  • 180.99 for an amount of 180,99
  • 1285.00 for an amount of 1285

# Currencies

Currencies follow the ISO 4217 standard, a 3-character code. While this code is usually in the 3 capitalized letters format, you may encounter the numerical version on some endpoints (e.g., EUR or 978 for Euro).

# Countries

Countries follow the ISO 3166-1 alpha-2 standard, a 2 capitalized letter code (e.g., FR for France).

Examples
  • FR for France
  • DE for Germany
  • CH for Switzerland

# Dates

Dates follow the RFC3339 (opens new window) standard.

They are provided and expected in Paris time, which is

  • UTC+2 Central European DST (Daylight Saving Time)
  • UTC+1 Central European otherwise.

# Examples

2020-08-25T07:06:13-07:00
1

You can read about UTC here (opens new window) and check UTC timezones by country there (opens new window).

# Phones

Phones numbers are expected with the country code prefix (e.g., +33), without leading zero.

Examples
  • The French number 06 05 04 03 02 is expected as +33605040302
  • The German number 013 456 7899 is expected as +491234567899

# Files

Files (such as documents and templates) are expected in base64 encoded format (opens new window) in a JSON object attribute. They are also returned as base64.

# Example

# IDs

  • Numerical identifiers such as userId, should be provided as integer.
  • Textuals identifiers such as client_id, should be provided as string.
Info icon

Ids are progressively migrated to UUIDv4 (opens new window).

You should anticipate this API-wide migration by typing all IDs as 36-character strings in your databases.

# Numerical example

# Textual example

# UUIDv4 example

# Texts, metas, tags

Strings are expected in Unicode (UTF-8).

# Addresses

Address lines (address{1-3} attributes) allow for 56 characters following the AFNOR XP Z 10-011 (opens new window) standard of May 1997.

Warning icon

Important – Mail carrier limitations

Due to mail carrier limitations, only the first 38 can be printed on envelopes (such as those used to deliver Cards).

Updated on: 5/7/2024, 1:08:28 PM