Quick Start
Data Types
Field formats used consistently across every Spare API response
Every Spare API response is JSON. These primitive types are the same across every endpoint and every market.
| Type | Format | Notes |
|---|---|---|
Boolean | true / false | Standard JSON boolean |
Date | YYYY-MM-DD | Calendar date, no time component |
Datetime | ISO-8601 | e.g. 2026-07-06T09:30:00Z |
Float | Double-precision number | A real number, not a fixed-point decimal |
Integer | 64-bit number | Whole numbers; amounts are typically minor units (e.g. fils, halalas) |
Object | JSON object | Compliant with RFC 4627 |
String | UTF-8 | A UTF-8 compatible sequence of characters |
Amounts are integers
Monetary amounts are represented as integers in the currency's minor unit (for example, 10000 for 100.00), not floats. This avoids floating-point rounding errors on financial values.
Example response
{
"data": {
"id": "res_01hz3x9k2p",
"createdAt": "2026-07-06T09:30:00Z",
"isActive": true,
"amount": 10000,
"score": 0.87,
"metadata": {
"reference": "your-internal-id"
}
},
"error": null
}Key takeaways
- All responses are JSON; dates and datetimes follow
YYYY-MM-DDand ISO-8601 respectively. - Monetary amounts are integers in minor units, never floats.
- These formats are identical across every market and every endpoint.