Skip to Content

Quick start

Create an API key and make your first calls in five minutes.

Create an API key

Sign in to the Ajour back office. Go to Settings → API keys and select Create key. Give the key a name, choose its scopes, and choose the locations it can see. For this guide, select catalog:read and sales:read.

Copy the key. Ajour shows it one time only. It looks like this:

ajr_live_7Kq2Vx9b_Q3n8...

Keep the key in an environment variable

export AJOUR_API_KEY="ajr_live_7Kq2Vx9b_Q3n8..."

Do not put the key in source code, a URL or an e-mail.

Check the key

curl https://api.ajour.dk/v1/company \
  -H "Authorization: Bearer $AJOUR_API_KEY"

The response shows your company and the key's scopes and locations:

{
  "id": 412,
  "name": "Café Nørrebro ApS",
  "cvr": "12345678",
  "currency": "DKK",
  "timeZone": "Europe/Copenhagen",
  "workHours": { "start": "07:00", "end": "23:00" },
  "key": { "keyId": "7Kq2Vx9b", "scopes": ["catalog:read", "sales:read"], "locationIds": null }
}

List your locations

curl https://api.ajour.dk/v1/locations \
  -H "Authorization: Bearer $AJOUR_API_KEY"

Get the key figures for a period

curl "https://api.ajour.dk/v1/sales/summary?from=2026-11-01&to=2026-11-21" \
  -H "Authorization: Bearer $AJOUR_API_KEY"
{
  "period": { "from": "2026-11-01", "to": "2026-11-21" },
  "currency": "DKK",
  "vat": "include",
  "metrics": {
    "totalTurnover": 486210.50,
    "posTurnover": 451900.00,
    "onlineTurnover": 34310.50,
    "transactions": 6120,
    "averageTransaction": 79.45,
    "discount": 8120.00,
    "returns": 1340.00,
    "contributionMargin": 301455.20,
    "contributionMarginPercent": 62.0
  }
}

These are the same figures as the key figure cards on your Ajour dashboard.

Get sales per product group

curl "https://api.ajour.dk/v1/sales/breakdown?groupBy=productGroup&from=2026-11-01&to=2026-11-21" \
  -H "Authorization: Bearer $AJOUR_API_KEY"

Next steps

On this page