Data Types
CoolR APIs generally use the following JSON-compatible data types.
String
- For storing alphanumeric data
- Most of our fields primarily accept ASCII character set
- Only certain fields accept Unicode - primarily the name and address fields
Number
Number fields can contain:
- Integers
- Decimals
Boolean
true/ false
Date/ Time
JSON has no built-in date/time type. Unless otherwise specified, dates are encoded in ISO format.
Some additional considerations:
Timezone
Almost all of the event data generated by our system represents the data in UTC. Most of our APIs also return the data both in UTC and Local Time Zone format. When working across multiple timezones, converting from UTC to local or identifying the timezone for local time may be confusing.
Our general rule of thumb is:
- Local Time represents the time of the location of the unit when the data was captured
- Modification timestamp data only stores data in UTC
JSON
It is not a data type in itself. However, some data elements may return string encoded JSON to represent complex data. For example, an image can have product analysis with multiple attributes. The decoded content looks like this:
{
"tags": [
{
"ProductId": 24665,
"HasTag": 0,
"StockLevelList": [],
"StockLevel": 0,
"TierList": [
2
],
"Tier": 2,
"isEmpty": false,
"IsForeign": false
},
{
"ProductId": 24664,
"HasTag": 0,
"StockLevelList": [],
"StockLevel": 0,
"TierList": [
2
],
"Tier": 2,
"isEmpty": false,
"IsForeign": false
}
]
}