Skip to content

Prudai Developer API: twaka

The operations of this part (Twaka).

Base URL https://api.prudai.com/v1. Logging in is in Login, scopes in Scopes and permissions, errors in Errors. Overview.

MethodPathWhat it doesState
GET/v1/twaka/article-pricesPrice and margin per article over a period, with cost price coverageComing soon
GET/v1/twaka/batches/{batch}/traceTrace a batch to the orders, customers and invoices did it go (recall, HACCP)Coming soon
GET/v1/twaka/invoice-matchesWhich invoices belong to this payment (candidates with a score)Coming soon
GET/v1/twaka/invoicesList Twaka invoices per debtor and period (open, paid, credit)Coming soon
GET/v1/twaka/invoices/{invoice_number}One Twaka invoice with lines and VAT per rateComing soon
GET/v1/twaka/ordersList Twaka orders by customer reference, delivered but not invoiced, or stuck in a statusComing soon
GET/v1/twaka/orders/{order_id}/historyStatus history of one Twaka orderComing soon
GET/v1/twaka/relationsFind Twaka relations (customers, suppliers) by debtor number or nameComing soon
GET/v1/twaka/relations/{relation_id}One Twaka relation with its contact persons (invoice contact first)Coming soon
GET/v1/twaka/revenueRevenue per customer, article or main group over a period (vs. previous year)Coming soon
GET/v1/twaka/sync-statusHow fresh is the Twaka data (last change per table)Coming soon

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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • from query · string (date) required
    From (YYYY-MM-DD).
  • to query · string (date) required
    To (YYYY-MM-DD).
  • main_group_id query · integer
    Only articles of this main group (id from getTwakaRevenue group_by=main_group). min 0
  • debtor_number query · string
    Only sales to this debtor. max length 40
  • limit query · integer
    Number of articles. default: 50 · min 1 · max 500

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/article-prices?from=%3Cfrom%3E&to=%3Cto%3E" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka article-prices

Trace 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • batch path · string required
    Batch id or external batch code.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/batches/<batch>/trace" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-batches trace

Which 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).

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • amount query · number
    Payment amount in euro (e.g. 1234.56).
  • reference query · string
    Payment description or specification text. max length 500
  • debtor_number query · string
    Debtor number, if known.
  • date query · string (date)
    Payment date (YYYY-MM-DD); without a debtor, amount matches are searched in the 400 days before it.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/invoice-matches" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka invoice-matches

List 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • debtor_number query · string
    Debtor number of the relation.
  • relation_id query · integer
    Twaka relation id.
  • from query · string (date)
    Invoice date from (YYYY-MM-DD).
  • to query · string (date)
    Invoice date to (YYYY-MM-DD).
  • status query · string
    open, paid, credit or all (default). One of: open, paid, credit, all
  • limit query · integer
    Page size. default: 50 · min 1 · max 200
  • offset query · integer
    Offset. default: 0 · min 0

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/invoices" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-invoices list

One 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).

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • invoice_number path · integer required
    Twaka invoice number.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/invoices/1" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-invoices get

List 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • customer_reference query · string
    Customer reference on the order.
  • debtor_number query · string
    Debtor number.
  • uninvoiced query · boolean
    Only delivered sales orders without an invoice.
  • status_code query · integer
    Twaka order status code.
  • older_than_days query · integer
    Status unchanged for more than this many days. min 1
  • from query · string (date)
    Delivery date from (YYYY-MM-DD).
  • to query · string (date)
    Delivery date to (YYYY-MM-DD).
  • limit query · integer
    Page size. default: 50 · min 1 · max 200
  • offset query · integer
    Offset. default: 0 · min 0

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/orders" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-orders list

Status 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).

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • order_id path · integer required
    Twaka order id.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/orders/<order_id>/history" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-orders history

Find 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • debtor_number query · string
    Exact debtor number.
  • q query · string
    Name, code or debtor number (min. 2 characters).
  • limit query · integer
    Page size. default: 50 · min 1 · max 200
  • offset query · integer
    Offset. default: 0 · min 0

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/relations" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-relations list

One 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • relation_id path · integer required
    Twaka relation id.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/relations/<relation_id>" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka-relations get

Revenue 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).

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Parameters

  • group_by query · string required
    customer, article or main_group. One of: customer, article, main_group
  • from query · string (date) required
    From (YYYY-MM-DD).
  • to query · string (date) required
    To (YYYY-MM-DD).
  • compare query · string
    previous_year. One of: previous_year
  • limit query · integer
    Number of groups. default: 50 · min 1 · max 500

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/revenue?group_by=customer&from=%3Cfrom%3E&to=%3Cto%3E" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka revenue

How 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.

  • State: coming soon, not in production yet.
  • Scope: prudai:twaka:read
  • Approval: none, no extra step.

Responses

StatusMeaning
200The result.
401Missing, malformed, unknown, expired or revoked key, or a key used against the wrong environment.
403Authenticated, 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).
404Unknown model, source or document.
422Well-formed request with invalid values (for example an unknown reasoning_effort, empty messages, or an Idempotency-Key reused with a different body).
429Rate limit, concurrency limit, Ultra daily quota or fair-use limit of the free sources operations exceeded.
503Temporarily unavailable (maintenance, overload, or the credit check could not be performed). Nothing ran, nothing is charged.
curl
curl -s "https://api.prudai.com/v1/twaka/sync-status" \
-H "Authorization: Bearer $PRUDAI_TOKEN"
CLI (coming soon)
prudai leo twaka sync-status