PDF to e-invoice
pdf_to_e_invoiceEmbeds invoice XML into a PDF, converts it to PDF/A-3, and validates the result to produce a Factur-X or ZUGFeRD e-invoice.
Instructions
Create a Factur-X or ZUGFeRD e-invoice by embedding invoice XML into a PDF, converting it to PDF/A-3 and validating it with veraPDF and Mustang.
The job always runs in the background: this returns a job ID, and the result comes from 'wait_job_completion'.
An e-invoice that fails validation ends as a failed job and the charge is refunded; validationReportUrl in the result explains why.
Ref: https://developer.pdf.co/api/pdf-to-e-invoice.md
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"xml_url": "<xml_url>",
"profile": "<profile>"
},
"name": "pdf_to_e_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files. | |
| name | No | File name for the output PDF. (Optional) | |
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
| profile | Yes | Invoice profile family: 'facturx' (Factur-X) or 'zugferd' (ZUGFeRD). | |
| xml_url | Yes | URL to the invoice XML (CrossIndustryInvoice) to embed. Use a public or temporary presigned URL; the HTTP auth inputs do not apply to it. The XML decides the conformance level (MINIMUM, BASIC WL, BASIC, EN16931 or EXTENDED). | |
| expiration | No | Lifetime of the output and report links in minutes; the files are deleted afterwards. API default is 60. (Optional) | |
| httppassword | No | HTTP auth password for the source PDF URL only. (Optional) | |
| httpusername | No | HTTP auth user name for the source PDF URL only. (Optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tips | No | ||
| status | Yes | ||
| content | Yes | ||
| credits_used | No | ||
| credits_remaining | No |