Skip to content

Playbook

Reconciling the partner directory

Comparing an external system's partners with QUiCK — discovering new partners and verifying tax-number matches.

Advanced~20 min4 steps

This playbook shows how to reconcile the partners of your external system (customers/vendors) with the partner directory stored in QUiCK. Matching is based on the tax number (tax_number).

Prerequisites

  • A Public API token
  • An external partner list containing tax numbers

1. Fetch the first page

bash
curl -H "Authorization: Token $QUICK_TOKEN" \
  "https://api.quick.riport.co.hu/1/partners/?page_size=100"

The response uses the standard paginated shape:

json
{
  "count": 837,
  "next": "https://api.quick.riport.co.hu/1/partners/?page=2&page_size=100",
  "previous": null,
  "results": [ /* ... */ ]
}

2. Pull the full list page by page

javascript
let url = `${BASE}/1/partners/?page_size=100`;
const partners = [];
while (url) {
  const res = await fetch(url, { headers: { Authorization: `Token ${TOKEN}` }});
  const page = await res.json();
  partners.push(...page.results);
  url = page.next;
}

3. Match on tax_number

Build a Map of the QUiCK partners keyed by tax number, then iterate over your external list:

javascript
const byTax = new Map(partners.map(p => [normalizeTax(p.tax_number), p]));
for (const external of myList) {
  const match = byTax.get(normalizeTax(external.tax_number));
  if (!match) console.log('missing in QUiCK:', external);
}

4. Handling is_customer / is_vendor

A partner can be a customer and a vendor at the same time. The QUiCK partner record signals the role with the is_customer and is_vendor boolean fields — align your reconciliation with that.

Related endpoints

  • GET/1/partners/

Related terms

Common pitfalls

Tax number format mismatch

A Hungarian tax number may appear as `12345678-1-42` or `12345678142`. Normalise both sides (for example keep digits only) before matching.

Ignoring pagination

If you only use the first page (`results`), hundreds of partners can be missed. Always follow the `next` URL until it returns `null`.