Skip to content

Recipe

Building a minimal QUiCK integration

Put a working integration together from scratch: token, first call, company data, reusable client.

Beginner~20 min5 steps

Prerequisites

  • An active QUiCK account with the Administrator role
  • A created Public API token
  • curl or Node.js 18+ available

1. Create an API token

In the QUiCK app click the company name in the top right, then the gear icon next to the company. In the API Tokens section choose Create new API token → give it a name → CreateCopy token.

Store it as a secret

Keep the token in an environment variable and never commit it to the repository.

bash
export QUICK_API_TOKEN="9c4f2e7a8b1d43f0a6e5c2b9d8f70123"

2. First call — check the connection

GET /1/pulse/ validates the token and the network path in one go, and returns something useful: the balances of the cash and bank accounts.

bash
curl -sS https://api.quick.riport.co.hu/1/pulse/ \
  -H "Authorization: Token $QUICK_API_TOKEN"

A successful response:

json
{
  "summary": 1284500,
  "accounts": [
    { "id": 12, "name": "Bank – HUF", "currency": "HUF", "current_balance": "1284500.00" }
  ]
}

3. Read the company data

GET /2/company-info/ returns the base data of the token''s company — including the id you may need for the Quick-Company-Id header:

bash
curl -sS https://api.quick.riport.co.hu/2/company-info/ \
  -H "Authorization: Token $QUICK_API_TOKEN"
json
{
  "id": 4821,
  "name": "Riport Applications Kft.",
  "default_currency_name": "HUF",
  "advanced_accounting": true
}

It is worth storing advanced_accounting: it decides whether you may use ledger numbers on accounting assignments.

4. A reusable client

Handle the base URL, authentication and errors in one place:

ts
const BASE = process.env.QUICK_API_BASE ?? "https://api.quick.riport.co.hu";
const TOKEN = process.env.QUICK_API_TOKEN!;

export async function quickFetch(path: string, init: RequestInit = {}) {
  const res = await fetch(`${BASE}${path}`, {
    ...init,
    headers: {
      ...init.headers,
      Authorization: `Token ${TOKEN}`,
      "Content-Type": "application/json",
    },
  });

  if (!res.ok) {
    const body = await res.json().catch(() => ({}));
    throw new Error(`QUiCK ${res.status}: ${body._error ?? res.statusText}`);
  }
  return res.json();
}

// usage
const pulse = await quickFetch("/1/pulse/");
const company = await quickFetch("/2/company-info/");

5. Where to go next

  • List partners: GET /1/partners/
  • List and filter expenses: GET /1/expenses/ — see the Listing incoming invoices recipe
  • Upload an expense document: POST /2/expenses/create/
  • The full endpoint list is runnable in the API Reference

Related endpoints

  • GET/v1/ping
  • GET/v1/company

Related terms

Common pitfalls

The token ends up in the frontend

The Public API token is a server-side secret with access to all company accounting data. Do not call the API directly from a browser — put your own backend proxy in front.

The base URL stays hard-coded

Introduce a `QUICK_API_BASE` environment variable from day one so it can be swapped per environment without touching code.

Dropping the trailing slash

Endpoints are valid with a trailing slash (`/1/pulse/`). The slash-less form may redirect or 404, and on a POST it can silently lose the request body.