Convert a Document to Markdown
POST/api/v8/partner/parse
Veryfi's Document to Markdown endpoint allows you to convert a document to markdown and stores the result. The following document types are supported: .jpeg, .ofd, .bmp, .heic, .txt, .zip, .webp, .rtf, .doc, .eml, .html, .htm, .avif, .jpg, .png, .docx, .xls, .gif, .odt, .xlsx, .heif, .pdf, .csv. The max file size is 20mb, min file size is 0.25kb. Rate limit is 20 requests per second.
Request
- application/json
- multipart/form-data
Body
External reference ID for tracking.
Possible values: non-empty
A path to a file in an S3 bucket, e.g. 'some/receipt.jpg
Possible values: non-empty
An S3 bucket for 'package_path', e.g. 'documents'.
Possible values: non-empty
Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls or uploading zip files.
Possible values: non-empty
A URL to a publicly accessible document to be sent to Veryfi for processing.
Possible values: non-empty
An array of URLs to publicly accessible documents to be sent to Veryfi for processing.
Possible values: non-empty
An optional filename. Useful to determine file type.
A field used to determine whether or not to return bounding boxes along with markdown.
Default value: document
Type of document being converted (e.g., 'receipt', 'invoice', 'contract').
Tags to attach to the document.
Possible values: >= 1 and <= 50
Default value: 50
Limit processing to number of pages.
Body
External reference ID for tracking.
Possible values: non-empty
A path to a file in an S3 bucket, e.g. 'some/receipt.jpg
Possible values: non-empty
An S3 bucket for 'package_path', e.g. 'documents'.
Possible values: non-empty
Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls or uploading zip files.
Possible values: non-empty
A URL to a publicly accessible document to be sent to Veryfi for processing.
Possible values: non-empty
An array of URLs to publicly accessible documents to be sent to Veryfi for processing.
Possible values: non-empty
An optional filename. Useful to determine file type.
A binary file. Submitting zipped documents through this parameter is the fastest way to process any document. Not every supported extension is enabled by default; see the Process a Document endpoint description for default vs by-request file types.
A field used to determine whether or not to return bounding boxes along with markdown.
Default value: document
Type of document being converted (e.g., 'receipt', 'invoice', 'contract').
Tags to attach to the document.
Possible values: >= 1 and <= 50
Default value: 50
Limit processing to number of pages.
Responses
- 201
- 400
Returns the document to markdown result with database ID.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
- Array [
- ]
The database ID of the markdown document
The markdown content of the converted document.
Page structures returned when details is true.
Type of document
External reference ID
Processing status
S3 path to the markdown document
S3 URL to the PDF file
S3 URL to the image file
Creation timestamp
Last update timestamp
Default value: ``
Document tags
meta DocumentToMarkdownMeta
Meta information about the processed document.
The total number of pages found in the submitted document.
The number of processed pages for the document. The default limit is 50 pages per document. Use max_pages_to_process on the POST request to lower the limit.
pages object[]
An array containing meta info about each processed page.
Possible values: <= 1
The average OCR score of the page.
The width of the page.
The height of the page.
is_blurry ClassNullableBoolField
The processed page is blurry or not
Possible values: <= 1
The score shows how confident the model is that the predicted value belongs to the field. See confidence scores explained for more information.
The extracted value.
source_documents object[]
An array containing meta info about originally submitted documents.
exif (object | null)
EXIF data from the source document
Possible values: <= 1
The average OCR score of the whole document.
Possible values: non-empty
The original file name of the uploaded document.
Possible values: [api.email, api.web, api, browser_extension, lens.bill, lens.invoice, lens.long_receipt, lens.other, lens.receipt, lens.web, lens]
Default value: api
The source of the document's submission for processing.
{
"id": 0,
"document_type": "string",
"status": "string",
"created": "string",
"updated": "string",
"tags": [
"string"
]
}
User error
- application/json
- Schema
- Example (from schema)
Schema
- FAILED_TO_PROCESS_DOCUMENTS
- FAILED_TO_EXTRACT
Default value: fail
Default value: Failed to process documents
Default value: fail
Default value: Failed to extract
{}