# Data Standards

Common data structures and their format

hr
## Standards

### Dates

All dates in the API are formatted according to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601).

JSON
```json JSON
// Dates must be in ISO 8601 format
{
   "dates": [
      {
         "start": "2023-09-23T13:50:00+01:00",
         "end": "2023-09-23T16:50:00+01:00"
      }
   ]
}
```

### Countries

All countries in the API are represented using two-letter codes as defined by the ISO 3166-1 alpha-2 standard. This concise, internationally recognized format ensures consistency throughout our API. For example:

- **DE** represents Germany
- **FR** represents France
- **US** represents the United States


For a complete list of country codes, please refer to the [ISO 3166-1 alpha-2 Wikipedia article](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

JSON
```json JSON
// Country codes must follow the ISO 3166-1 alpha-2 standard
{
  "country": "DE"
}
```

### Dimensions

All dimensions (length, width, height) are expressed in centimeters (cm) and may include decimal values. Please ensure you use a period (.) as the decimal separator. Weights are expressed in kilograms (kg) and may also include decimals, while quantities must be whole numbers. Additionally, you can optionally include an `is_stackable` boolean attribute immediately after the weight; if omitted, its default value is `false`.

JSON
```json JSON
// Dimensions: cm (decimals allowed, period as separator); Weight: kg (decimals allowed); Quantity: integer; Optional: is_stackable (boolean, default false)
{
    "items": [
        {
            "quantity": 2,
            "length": 120,
            "width": 100.5,
            "height": 80,
            "weight": 320,
            "is_stackable": false

        }
    ]
}
```

### Phone Numbers

All phone numbers in the API must be provided in the [E.164 format](https://en.wikipedia.org/wiki/E.164). This international standard requires:

- The number starts with a **+** sign
- Followed by the country code (e.g., **49** for Germany)
- And then the rest of the digits with no spaces or special characters


This format ensures that phone numbers are represented consistently and unambiguously across regions.

JSON
```json JSON
// Phone numbers must be provided in E.164 format
{
  "phone": "+49123456789"
}
```