Input formatting
This document focuses on the data you are going to send to the Bookinglayer API via POST/PUT/PATCH endpoints. It lists the formatting expected by the API as well as describes some custom data reused amongst endpoints.
Formatting
Dates
Dates should always be sent in the yyyy-mm-dd
format. December 20th 2023 would be sent as 2023-12-20
.
Times
Time should always be sent in the HH:MM
format (zero-prefixed hours followed by a colon and then zero-prefixed minutes). Twelve hours and thirty five minutes would be sent as 12:35
.
Datetimes
Some fields contain combinations of date and time. These fields are marked with datetime
types and expect the following format: yyyy-mm-dd HH:MM:SS
. December 20th 2023 at nineteen hours, thirteen minutes and nine seconds would be sent as 2023-12-20 19:13:09
.
Numbers
Numbers are sent as floats. Most resource fields support precision of two decimals, with a few exceptions that are noted in their respective documentation pages.
Country codes
Whenever there is a need to specify some country Bookinglayer expects ISO 3166 Alpha-2 country codes. A list of all codes in available on the ISO website, under the Alpha-2 column.
Note that this format isn't used exclusively for countries, it can be used for other fields such as Person nationalities or phone country codes.
Last updated