Errors
Cannot Parse Document
A document's file is not a readable PDF or DOCX. Check that the URL returns the actual file and that it opens correctly, then retry.
What Happened
The file that SignatureAPI downloaded from a document’s url could not be read as a PDF or DOCX. The detail property names the document by its position in the documents array, such as documents[0], and the format it was parsed as.
Example response
422 Unprocessable Content (application/problem+json)
{
"type": "https://signatureapi.com/docs/v1/errors/cannot-parse-document",
"title": "Could Not Parse Document",
"status": 422,
"detail": "documents[0] could not be parsed as a PDF."
}How to Fix
- Check that the URL returns the file itself and not an HTML page, a login screen or a redirect.
- If you used an upload, send the file bytes unchanged with the matching
Content-Typeheader:application/pdforapplication/vnd.openxmlformats-officedocument.wordprocessingml.document. - Download the file from the URL and open it in a PDF reader or in Microsoft Word.
- For a DOCX file made in another editor, such as Google Docs or LibreOffice, open it in Microsoft Word and save it again.
Still stuck? Contact support.