Skip to main content
POST
PDF to E-Invoice
Full reference: PDF to E-Invoice covers supported profiles, validation, warnings and limits. This operation starts a background job. Use Background Job Check for the final result.
Error examples summarize shared response-code meanings; actual message text varies by failure.

Authorizations

x-api-key
string
header
required

Body

application/json
url
string<uri>
required

Source PDF URL accessible to PDF.co. Encrypted and digitally signed PDFs are not supported.

xml_url
string<uri>
required

Supported invoice XML formats: Factur-X or ZUGFeRD.

Provide the URL of your XML file as the value. Use a public or temporary presigned XML URL. The source PDF HTTP credentials do not apply to this URL. XML is limited to 5 MiB and must be a supported CrossIndustryInvoice document without DTD or entity declarations. Malformed XML, missing or duplicate guideline identifiers, and unsupported profiles are rejected. The XML determines the detailed profile, conformance level, and canonical embedded filename.

profile
enum<string>
required

profile selects the invoice family. It is distinct from the profiles configuration parameter used by other endpoints.

Expected invoice family. Detailed conformance and embedded filename are derived from supported XML guideline identifiers.

Available options:
facturx,
zugferd
httpusername
string

HTTP authentication username for the source PDF URL only. Does not unlock PDF encryption.

httppassword
string

HTTP authentication password for the source PDF URL only. Does not apply to xml_url.

callback
string<uri>

Callback URL for the asynchronous terminal result.

name
string

Output file name. The endpoint appends .pdf when needed. If omitted, it derives the name from url when possible.

expiration
integer
default:60

Number of minutes before the temporary output URL expires. After this period, generated files are deleted from PDF.co Temporary Files Storage. The maximum retention depends on your subscription plan. To store permanent input files (e.g. re-usable images, pdf templates, documents) consider using PDF.co Built-In Files Storage.

Response

Job accepted. No converted PDF or report URL is available yet. Poll /v1/job/check or use a callback.

pageCount
integer

Always 1 in the submission response, even for multi-page PDFs. This value is a submission placeholder and does not represent the actual number of pages in the output PDF. The actual output page count is returned in the final job-check or callback result.

error
boolean
status
integer

Numeric submission HTTP status, not the string background job status.

duration
integer
name
string
validationReportName
string
jobId
string

Use as jobid in POST /v1/job/check.

credits
integer

100 processing credits for the asynchronous submission, regardless of page count.

remainingCredits
integer