Skip to content
Which document types are supported?

Which document types are supported?

Two: invoice and resume. The type goes in the path.

curl -X POST https://cloud.unidoc.io/api/uniai/extract/invoice \
  -H "X-API-KEY: $UNIDOC_LICENSE_API_KEY" -F "[email protected]"

curl -X POST https://cloud.unidoc.io/api/uniai/extract/resume \
  -H "X-API-KEY: $UNIDOC_LICENSE_API_KEY" -F "[email protected]"

Anything else is rejected before the file is read:

{"success":false,"message":"unsupported structured type: contract","errors":null}

cv is not a type

The resume type is called resume, and /extract/cv returns a 400 even though “CV” and “resume” mean the same document. If you are getting unsupported structured type: cv, that is the whole problem.

What each one returns

Completely different shapes, so the type you pick determines the response schema.

TypeShape
invoiceNumbers, dates, two party objects, line items, subtotal, taxes, total, notes
resumeName and contact, then arrays: education, work history, skills, certifications, languages, projects, references

Extract an invoice and extract a resume list every field.

Sending the wrong type at the right document

Nothing stops you posting a resume to /extract/invoice. The request succeeds and you get an object shaped like an invoice with almost nothing in it, because the model looked for a total and a seller and found neither. A near-empty response is a good signal that the type does not match the document.

Other document types

There is no way to supply your own schema, and no general-purpose extraction type. If you need a document class that is not one of these two, support is the place to ask.

For pulling text or tables out of a PDF without any structuring, UniPDF does that locally with no hosted service involved: see the extraction guides.

Last updated on