Prudai Developer API: twaka
Twaka (u-logi) data of the own organisation in MAIA, read only from the nightly replica (invoices, payment matching, relations, orders, revenue, batch tracing). Personal tokens only; never issuable to a service key.
Basis-URL https://api.prudai.com/v1. Inloggen staat in Inloggen, scopes in Scopes en rechten, fouten in Fouten. Overzicht.
Price and margin per article over a period, with cost price coverage
GET /v1/twaka/article-prices
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Per article (sales invoices, by invoice date, credits included, max. 400 days): revenue, kg, quantity in the price unit, average/min/max price, number of invoices and customers. Optional filter on main group or debtor number. Margin only where Twaka has a cost price (Article.PurchasePrice > 0); cost_coverage reports how many articles and which share of revenue have one. No estimated margins.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
fromverplicht
From (YYYY-MM-DD).toverplicht
To (YYYY-MM-DD).main_group_id
Only articles of this main group (id from getTwakaRevenue group_by=main_group). min. 0debtor_number
Only sales to this debtor. max. lengte 40limit
Number of articles. standaard:50· min. 1 · max. 500
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/article-prices?from=%3Cfrom%3E&to=%3Cto%3E" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka article-pricesTrace a batch to the orders, customers and invoices did it go (recall, HACCP)
GET /v1/twaka/batches/{batch}/trace
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
By batch id or external batch code: registrations of the batch grouped per order, customer, article and invoice (kg and count), plus what is not on an order yet.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
batchverplicht
Batch id or external batch code.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/batches/<batch>/trace" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-batches traceWhich invoices belong to this payment (candidates with a score)
GET /v1/twaka/invoice-matches
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Give a payment amount, the payment reference (description/specification text; invoice numbers in it are recognised), optionally debtor_number and date. Returns up to 25 candidate invoices with a score (0-100) and the reasons. Combinations of several invoices and booking are done by the settlement proposal in MAIA (Exact).
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
amount
Payment amount in euro (e.g. 1234.56).reference
Payment description or specification text. max. lengte 500debtor_number
Debtor number, if known.date
Payment date (YYYY-MM-DD); without a debtor, amount matches are searched in the 400 days before it.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/invoice-matches" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka invoice-matchesList Twaka invoices per debtor and period (open, paid, credit)
GET /v1/twaka/invoices
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Filters: debtor_number or relation_id, invoice date from/to, status open (open amount ≠ 0), paid, credit or all. Per invoice: number, dates, amounts incl./excl. VAT, open amount, credit link, raw status_code/type_code and the relation.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
debtor_number
Debtor number of the relation.relation_id
Twaka relation id.from
Invoice date from (YYYY-MM-DD).to
Invoice date to (YYYY-MM-DD).status
open, paid, credit or all (default). Een van:open,paid,credit,alllimit
Page size. standaard:50· min. 1 · max. 200offset
Offset. standaard:0· min. 0
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/invoices" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-invoices listOne Twaka invoice with lines and VAT per rate
GET /v1/twaka/invoices/{invoice_number}
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
The invoice by its number, with up to 500 lines (article, quantities, kg, price, total, VAT %, order and customer reference) and the VAT summary per rate. No PDF (Twaka keeps none).
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
invoice_numberverplicht
Twaka invoice number.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/invoices/1" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-invoices getList Twaka orders by customer reference, delivered but not invoiced, or stuck in a status
GET /v1/twaka/orders
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Filters: customer_reference, debtor_number, uninvoiced=true (sales order delivered, no invoice, not cancelled), status_code with older_than_days (orders that hang), delivery date from/to.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
customer_reference
Customer reference on the order.debtor_number
Debtor number.uninvoiced
Only delivered sales orders without an invoice.status_code
Twaka order status code.older_than_days
Status unchanged for more than this many days. min. 1from
Delivery date from (YYYY-MM-DD).to
Delivery date to (YYYY-MM-DD).limit
Page size. standaard:50· min. 1 · max. 200offset
Offset. standaard:0· min. 0
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/orders" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-orders listStatus history of one Twaka order
GET /v1/twaka/orders/{order_id}/history
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Every status change of the order with its date (up to 200).
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
order_idverplicht
Twaka order id.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/orders/<order_id>/history" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-orders historyFind Twaka relations (customers, suppliers) by debtor number or name
GET /v1/twaka/relations
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Search by debtor_number or q (name, code or debtor number). Per relation: code, name, debtor/creditor number, customer/supplier flags, blocked, billing city.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
debtor_number
Exact debtor number.q
Name, code or debtor number (min. 2 characters).limit
Page size. standaard:50· min. 1 · max. 200offset
Offset. standaard:0· min. 0
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/relations" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-relations listOne Twaka relation with its contact persons (invoice contact first)
GET /v1/twaka/relations/{relation_id}
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
The relation and its active contact persons: name, e-mail, phone and roles (invoice, purchase, quality, general). Nothing else about contacts is copied.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
relation_idverplicht
Twaka relation id.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/relations/<relation_id>" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka-relations getRevenue per customer, article or main group over a period (vs. previous year)
GET /v1/twaka/revenue
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Sum of invoice line totals (sales invoices, by invoice date, credits included) per group_by over from-to (max. 400 days), with kg and number of invoices, sorted by revenue. compare=previous_year adds the same period a year earlier. Margin is not included (no reliable cost price in Twaka).
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Parameters
group_byverplicht
customer, article or main_group. Een van:customer,article,main_groupfromverplicht
From (YYYY-MM-DD).toverplicht
To (YYYY-MM-DD).compare
previous_year. Een van:previous_yearlimit
Number of groups. standaard:50· min. 1 · max. 500
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/revenue?group_by=customer&from=%3Cfrom%3E&to=%3Cto%3E" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka revenueHow fresh is the Twaka data (last change per table)
GET /v1/twaka/sync-status
Personal tokens only (prudai login or a personal token); read only. MAIA organisations with a Twaka (u-logi) connection, each reading only its own replica; without a connection 403 twaka_not_connected. Data from the nightly replica (04:30), never live from the customer server.
Latest Modified/Created per core table (invoices, orders, relations, batches, registrations) and the sync schedule.
- Stand: binnenkort, nog niet op productie.
- Scope:
prudai:twaka:read - Goedkeuring:
none, geen extra stap.
Antwoorden
| Status | Betekenis |
|---|---|
200 | The result. |
401 | Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment. |
403 | Authenticated, but not allowed (missing scope, product not on the key or organisation, organisation suspended, Developer API switched off for the organisation, IP not on the allowlist, depth not permitted, licence does not permit redistribution). |
404 | Unknown model, source or document. |
422 | Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body). |
429 | Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded. |
503 | Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged. |
curl -s "https://api.prudai.com/v1/twaka/sync-status" \ -H "Authorization: Bearer $PRUDAI_TOKEN"prudai leo twaka sync-status