SpareSpare Docs
GuidesAPI Reference
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.

TypeFormatNotes
Booleantrue / falseStandard JSON boolean
DateYYYY-MM-DDCalendar date, no time component
DatetimeISO-8601e.g. 2026-07-06T09:30:00Z
FloatDouble-precision numberA real number, not a fixed-point decimal
Integer64-bit numberWhole numbers; amounts are typically minor units (e.g. fils, halalas)
ObjectJSON objectCompliant with RFC 4627
StringUTF-8A 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-DD and ISO-8601 respectively.
  • Monetary amounts are integers in minor units, never floats.
  • These formats are identical across every market and every endpoint.

On this page