Skip to content

Data types

An amount is a Money object. The amount is a whole number in minor units. Never use a float for money.

{ "amount": 12150, "precision": 2, "currency": "EUR", "label": "€121.50" }
Field Meaning
amount The value in minor units, as a 64-bit integer.
precision The number of decimals of amount. A unit price has 3, every other amount has 2.
currency The ISO 4217 code, for example EUR or USD.
label The value formatted for display. Do not parse it.

The value is amount / 10^precision. In the example: 12150 / 100 = 121.50.

A record in a foreign currency also has its total in the default currency of the workspace (baseGrandTotal). Add those base totals when you add records in more currencies.

A date is a Carbon object:

{ "unix": 1767225600, "tz": "Europe/Amsterdam" }

unix is the unix time in seconds. tz is the name of the time zone of the date.

A date filter takes a unix time as a string: issueDate: [{ after: "1767225600" }].

  • uid: the UUID v7 of the record. Use it in REST paths and bodies.
  • id (GraphQL only): the IRI, for example /invoices/01936f6e-.... Use it in GraphQL arguments.

A billing record has a sequenceId (a number) and a displaySequenceId (the number as Shypr shows it on the document). Show the displaySequenceId to people. A record that came from a data import keeps its old number in displaySequenceId.