How to upload documents or batches to the Parashift Platform via API, which attributes to set to influence processing and skip workflow steps.
Uploading Documents or Batches to the Parashift Platform is super easy and can be done with one simple POST. Next to the files to be processed you can also set different attributes in the body that influence how a document is processed like turning on/off human validation, outsourcing validation work or skipping workflow steps like Separation, Classification or Extraction.
All you need to upload a document or batch is an API Key, your file encoded in base64 and the following POST:
curl --location --request POST 'https://api.parashift.io/v2/documents' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Authorization: Bearer SuperSecretKeySearchTheDocumentationForApiToFindOutHow' \
Alternatively, you can also upload a batch by just changing the endpoint to https://api.parashift.io/v2/batches and the type inside the body to "type": "batches"
The only attribute that is absolutely required is the files as base64 string, everything else is optional and can be set depending on use case.
|null||Used for identification and displayed in the App at various spots|
|null||Provide some meta information to your docs that we drag through the workflow|
|null||Used for identification, can be queried very easily|
|null||used to skip Classification (see below)|
|true||Used to disable manual validation steps (see below)|
|client||In the upload configuration, you can define Separation configuration, workflow rules, SLA times and much more. (read more)|
|not_for_training(boolean)||document||false||Used to disable training on this document, very useful option for test documents|
|null||An array of your files as base64 string. You can upload different file types (pdf, jpg, png) in the same POST and also multiple pages that we will merge for you on processing.|
Skip Workflow Steps
If you want your documents to run through all workflow steps (read up on our workflow), then create a batch that will run through Separation which creates documents which in turn run through Classification and Extraction.
If the documents you are about to upload are already properly separated then you can also skip Separation and directly create a document.
If you already know the document type of the document you are about to upload then you can fix a classification scope with one entry which will lead to Classification getting skipped.
Alternatively, if you have many document types active in your tenant but know that the document you are about to upload can only be of a certain range of document types you can fix a classification scope also with multiple entries which will lead to Classification getting filtered down on the provided document types.
If you are not interested in extracting any data from the document besides the document type you can also configure the platform to not extract any fields.
Limits and prerequisites
There are some limitations to the files uploaded to the API.
- The base64 encoded file must be a pdf, jpg, png or tiff for automated processing (Other mime types can be uploaded and processed manually, this has to be configured)
- The minimum file size is 100 bytes (otherwise the Platform assumes something went wrong if a file is this small)
- The maximum file size is 20 MB (if you need this limit extended reach out)