Skip to Content
Grail Network

Conventions

The form of the answers, money, times, ids and lists.

The answers

Every answer is JSON. A single record comes in data:

{ "data": { "id": "019a8c12-7d40-7a3e-9f00-2b1c4d5e6f70" } }

A list comes in data, with its page in meta:

{ "data": [], "meta": { "page": 1, "pageSize": 20, "total": 0 } }

A list takes page (from 1) and pageSize in its query. Read meta.total to know how many pages exist.

Money

An amount is an object with the amount in cents as text, and its currency:

{ "amountAtomic": "191500", "currency": "USD" }

"191500" is $1,915.00. The amount is text, so no client loses a cent to a floating-point number. Every amount is in US dollars.

A rate or a price adjustment is a decimal number as text, such as "0.05" for 5%.

Times and ids

  • A time is UTC, in the form of RFC 3339 with milliseconds: 2026-11-25T10:00:00.120Z.
  • An id is a UUID. Grail Network makes it. Treat it as text.

Unknown fields and values

Grail Network adds fields to its answers and values to its lists, such as a new state. Your client must ignore a field that it does not know, and must accept a value of a list that it does not know. A strict parser that refuses an unknown value breaks at the next addition.

On this page