Automate via API
Use case for developers and systems integrating with xTool via the REST API: create documents, send, validate, convert, list and status — programmatically.
What you do: get an API key with the right permissions → call the document API (and optionally format and transaction APIs) for upload, send, validation, etc.
Steps
1. Get an API key
In the web app: API (under your organisation) → create key → assign allowed methods (documents: list, upload, send; formats: validate, transform; transactions, organisations, auth me, Peppol lookup, PDF as needed) → copy the secret once. See Setup and API keys and permissions.
2. Authentication
Send the API key with every request, e.g. in the header:
See API reference.
3. Using the API
| Action | How |
|---|---|
| Upload document | POST upload model or upload XML with document body. See Create documents. |
| Send document | POST send with transaction_type (send.peppol or send.email); for email also email and optionally lang. See Send via Peppol, Send by email. |
| List and get documents | GET list (filters: direction, status, etc.) and GET by ID for details. |
| Validate and convert | Format API before or after upload as needed. See Validate and convert. |
Full list of endpoints: API reference (Scalar or Swagger).