Skip to content

REST API Reference

TaprNext exposes Frappe-style RPC methods under /api/method/... and standard resource APIs under /api/resource/.... Prefer the documented PEPPOL and invoice methods for integrations.

Authorization: token <api_key>:<api_secret>

Generate keys for a user with the right roles and Legal Entity permissions. Base URL:

https://your-site.tapr.ch
MethodPathNotes
Send raw XML or Factur-X PDFPOST /api/method/tapr_next.api.peppol.transmission.send_peppol_invoiceQuery: receiver_id, sender_id, country_code; for XML also doc_type_id, process_id. Body: XML or PDF. Metered.
Create SI from XML and sendPOST /api/method/tapr_next.api.peppol.transmission.send_invoiceFull create-and-send flow from posted XML
Delivery / statusGET/POST /api/method/tapr_next.api.peppol.transmission.check_statusreference_id
Validate XMLPOST /api/method/tapr_next.api.peppol.transmission.validate_xmlBody: XML
POST /api/method/tapr_next.api.peppol.transmission.send_peppol_invoice?receiver_id=9930:DE123&sender_id=9927:CHE123&country_code=CH&doc_type_id=...&process_id=urn:fdc:peppol.eu:2017:poacc:billing:01:1.0
Authorization: token key:secret
Content-Type: application/xml
MethodPath
Receive (API storage mode)POST /api/method/tapr_next.api.peppol.inbound.receive_peppol_message
List received invoicestapr_next.api.peppol.inbound.get_received_invoices
Get one received invoicetapr_next.api.peppol.inbound.get_received_invoice — name or reference_id; returns header, totals and items / charges / taxes; include_xml=1 adds raw_xml
Confirm posted externallytapr_next.api.peppol.inbound.confirm_invoice_posted
SMP lookup (metered)tapr_next.api.peppol.lookup.lookup_participant
SMP lookup (internal)tapr_next.api.peppol.lookup.lookup_peppol_participant
Receiver formatstapr_next.api.peppol.documents.get_peppol_receiver_formats
Set document formattapr_next.api.peppol.documents.set_peppol_document_format
Validate invoice XML on SI/PItapr_next.api.peppol.documents.validate_invoice_xml
MethodPath
Configure webhooktapr_next.api.peppol.webhooks.configure_webhook (System Manager)
Retrigger deliverytapr_next.api.peppol.webhooks.retrigger_webhook

Event types include Invoice Received, MLR Received, and All. Auth options: none, bearer, API key header, basic; optional HMAC secret.

MethodPath
Process uploaded filetapr_next.api.invoices.process_uploaded_file (invoice_type: purchase | sales)
Create draft from New Invoice formtapr_next.api.invoices.create_draft_invoice — peppol_receiver_id is required on a Sales Invoice and optional on a Purchase Invoice. Optional peppol_registration picks the legal entity’s own PEPPOL ID (sender on SI, receiver on PI) and must be an active registration of that entity
Duplicate invoicetapr_next.api.invoices.duplicate_invoice
Workflow applytapr_next.api.workflow.apply_workflow_action
Workflow states / actionstapr_next.api.workflow.*
POST /api/resource/Sales Invoice
GET /api/resource/Sales Invoice?filters=...
GET /api/resource/Purchase Invoice/<name>

Use JSON bodies consistent with DocType fields (legal entity, lines, PEPPOL receiver id, totals). Server validate hooks recompute tax/totals in many cases — prefer sending clean line inputs.

MethodPurpose
tapr_next.api.erp.lookup_purchase_orderPurchase order lookup
tapr_next.api.erp.lookup_vendorVendor lookup
tapr_next.api.erp.get_erp_vendors / get_erp_items / get_erp_currencies / get_erp_purchase_ordersERP master data search

ERP sync is otherwise scheduled: AR invoices are fetched every 10 minutes and pending AP posts are retried hourly. An ERP can call this endpoint to run those jobs now for one legal entity. The schedules keep running as a safety net.

POST /api/method/tapr_next.api.erp_events.notify_erp_activity
Authorization: token <api_key>:<api_secret>
Content-Type: application/json
{"event_type": "invoice.ready", "erp_type": "erpnext", "legal_entity": "Your Company AG", "reference": "ACC-SINV-2026-00042"}
ParameterRequiredNotes
event_typeYesinvoice.ready → AR fetch; invoice.posted → AR fetch + AP pending posts; invoice.paid, invoice.cancelled → AP pending posts. Other values return status: "ignored"
erp_typeYesMust match the ERP type on the legal entity’s setup row (erpnext, d365, …)
legal_entityYesLegal Entity name, or the ERP company name configured on the setup row
reference, event_id, occurred_atNoLogged only

The response always has the same keys: status (accepted / ignored / error), message, legal_entity, event_type, jobs, duplicate_jobs, duplicate. A job already queued for that entity is not queued twice. Callers need System Manager, Accounts Manager or Sales Manager and permission on the legal entity; rate limit is 60 calls per minute per calling IP and legal entity.

MethodPurpose
tapr_next.api.locks.acquire_invoice_lockEnter edit mode
tapr_next.api.locks.release_invoice_lockRelease
tapr_next.api.locks.refresh_invoice_lockKeep-alive
tapr_next.api.locks.get_invoice_lock_statusStatus
tapr_next.api.locks.force_release_invoice_lockAdmin unlock
MethodPurpose
tapr_next.api.user.get_current_user_rolesRoles for session user
tapr_next.api.user.get_user_legal_entitiesPermitted LEs
tapr_next.api.subscription.get_subscription_infoPlan and limits
  • Some PEPPOL methods are metered against plan quotas (messages / API calls).
  • Expect HTTP errors when quotas are exceeded; upgrade plan or wait for reset.
  • Free plan defaults include low monthly message and user limits.
  1. Use a dedicated integration user with least privilege.
  2. Validate XML before production sends.
  3. Prefer idempotent client keys where the gateway supports them.
  4. Log reference_id from sends for MLR/status correlation.
  5. Handle validation error payloads — they often include field-level PEPPOL rule text.