Skip to content
Developers
Pilot. The API is open to a small number of organisations and may change — every change is in the changelog.

Getting started

The Dnero API is a REST API over HTTPS. Requests and responses are JSON; every request carries an API key.

API keys are made in the Dnero portal, under Automation > Access > API keys, by someone with permission to manage API keys. When you make one you choose:

  • the sites it reaches,
  • what it may do at each: read or write, for the catalogue and for orders,
  • who is accountable for it and what it is for, so a review can tell whether it is still wanted.

The key is shown once, when it is made. Store it where your system keeps its other secrets. If it is lost, revoke it and make another.

GET /v1/me says which organisation your key belongs to, and every site it reaches with what it may do there:

Terminal window
curl https://api.dev.dnerohq.com/v1/me \
-H "Authorization: Bearer $DNERO_API_KEY"
{
"organisation": { "id": "52366491-9756-4f88-a166-b3c56b394835", "name": "Harbour Street Hospitality" },
"key": { "id": "6ad7bc857ea573b4d5412588", "name": "Website orders", "rateLimit": 120 },
"sites": [
{
"id": "9a3c74c2-741e-48c3-ad9e-b137ec1c7243",
"name": "Harbour Street",
"currency": "NZD",
"timeZone": "Pacific/Auckland",
"access": { "catalogue": "write", "orders": "read" }
}
]
}

Keep the site ids: every site-level path takes one.

  • Money is in the site’s currency, in minor units, as integers: 1250 is $12.50 at a site trading in NZD.
  • Times are RFC 3339, in UTC. A site’s timeZone says what local time they are.
  • Records are identified by their code, which stays the same across your sites.
  • Errors are problem details with a stable code.