Mappings
Our API uses enums to describe the multiple statuses a task can be in during processing and various other type-like values.
We also return textual representations of these enums for ease of use where appropriate.
Below you can find these various enums and their respective mappings.
Task Status and Integration Status
There are two distinct types of task statuses:
TaskStatus: this status identifies the processing state of the task. It shows if the task is queued, pre-processing, recognizing, processed or deleted, among others, with a high degree of granularity.IntegrationStatus: this status identifies the integration state of the task. It shows if the task has been queued for integration, if it was successful or if it failed.
You can use both TaskStatus and IntegrationStatus to control and understand the lifecycle of your tasks. Common use cases include:
Creating detailed task listings, such as the Tasks Inbox page, with detailed information about the processing state of the task, and conditional access to the Task Viewer if the task is in the
To Reviewstate.Understanding when the task needs manual (or automatic) re-processing, for example if it is stuck in
Pre-Processing in Progressfor long periods of time.Creating batch logic in your application, by understanding if all tasks in your batch are already in the
Processedstate.Understanding if a Task needs to be reviewed again, if the integration status is
Failed.
Below you can find two tables mapping these values, with a small description for each one.
Task Status
Deleting
19
Task was queued for deletion
Deleted
20
Task was deleted and moved to history
QueuedForPreProcessing
30
Task was queued for pre-processing
PreProcessingInProgress
31
Task is currently in pre-processing
PreProcessingFailed
32
Task has failed pre-processing
PreProcessingDownloadFailed
33
Task has failed download at the pre-processing step
PreProcessingSuccessful
34
Task has completed pre-processing
PreProcessingGetPagesFailed
35
Task has failed due to not being able to obtain total pages
PreProcessingInsufficientVolume
36
Task has failed due to insufficient licensing volume
PreProcessingLicenseExpired
37
Task has failed due to an expired license
PreProcessingSplittingInProgress
38
Task is currently being split into multiple, smaller tasks
PreProcessingSplittingFailed
39
Task failed split
QueuedForRecognizing
40
Task was queued for recognizing
RecognizingInProgress
41
Task is currently being recognized
RecognizingFailed
42
Task has failed at the recognizing step
RecognizingSuccessful
43
Task has completed recognizing
QueuedForPostProcessing
50
Task was queued for post-processed
PostProcessingInProgress
51
Task is currently being post-processed
PostProcessingFailed
52
Task has failed post-processing
PostProcessingSuccessful
53
Task has completed post-processing successfully
ToReview
60
Task is ready for review
InReview
70
Task is currently being reviewed
QueuedForExport
90
Task was queued for integration with the external system
ExportInProgress
91
Task is currently being exported
ExportFailed
92
Task failed export
ExportSuccessful
93
Task has completed export
Processed
100
Task was successfully exported and has been fully processed
SplitProcessed
101
Task was successfully split into multiple parts
ProcessedAfterPeriodAndDeletedFiles
110
Task was processed after the time period and its additional files have been deleted
ValidationErrorInvalidDimensions
400
Task has invalid image dimensions
PreProcessingConvertToPdfFailed
405
Task failed due to an error while converting file to PDF
PreProcessingFileLengthCountFailed
406
Task failed due to an error while counting file length
PreProcessingUnknownLicenseError
407
Task failed due to an unknown license error
PreProcessingPDFReaderError
408
Task failed due to an error while attempting to read the PDF file
Integration Status
Never
1
No integration attempt was ever issued for this task
Queued
2
Task is currently queued for integration
Successful
3
Last integration attempt was successful. All detected entities were added to the external system
Failed
4
Last integration attempt failed. One or more detected entities were not added to the external system
Task Type
The TaskType enum describes the type of a given task in our system.
We can use this type not only to identify what kind of file is being processed, but also to write conditional logic and pages specific to each type of task.
Invoice
10
For general invoices and Portuguese invoices tasks which may include supported QR Codes
Receipt
20
For receipt tasks
LegalDocument
30
For legal document tasks. Only available to certain Organizations
Transcript
40
For transcription tasks of audio and video files.
Labelling
50
For labeling tasks, used to label documents to create custom templates
Custom
60
For tasks using custom templates for recognition
Subtitles
70
For subtitling tasks of video files
DocumentAnonymization
80
For anonymizing data of document tasks
ImageAnonymization
90
For anonymizing data of images tasks
IdDocument
100
For identification documents tasks
Layout
110
For layout detection of tasks
Task Assignment Order Type
The TaskAssignmentOrderType enum defines the sequence in which a task assignment must be reviewed.
AnyUser
10
Any assigned user can conduct the review, and once one completes it, the task will be finished
AnyOrder
20
Any assigned user can review it, but the task will only be finished once all assignees have finished their revisions
Sequence
30
The task can only be reviewed by the assigned users in the specified sequence. The task will be finished only after all assignees have completed their revisions
Workspace Type
The WorkspaceType enum describes the type of workspace you are working with.
Similarly to the TaskType enum, this enum allows us to completely change the UI/UX of a given workspace if necessary, providing custom logic depending on its value.
Standard
10
For standard workspaces focused on processing Tasks and exporting them to some external system
LabelingAndTraining
20
For workspaces focused on loading files for labeling, and then using that information to train new custom templates
Template Type
The TemplateType enum helps identify what kind of template was used to create a given workspace.
This enum is predominantly used for display purposes, or as a fallback when the actual template used cannot be identified.
BuiltIn
10
The default built-in templates created by the SmartDocumentor team - the default template selections when you create a new workspace
Template
20
A custom template, created by an user of your Organization, of the Template type. This type excels at detecting fields in documents with very similar layouts and structure
TrainTemplate
30
A special built-in template type used to create workspaces to train custom Template models. This is the template type used when you create a new custom template and select the Template type
Neural
40
A custom template, created by an user of your Organization, of the Neural type. This type can use AI to detect fields in documents with irregular layouts and structures
TrainNeural
50
A special built-in template type used to create workspaces to train custom Neural models. This is the template type used when you create a new custom template and select the Neural type
Speaker Source
The SpeakerSource enum helps identify which source the speaker was retrieved from.
Task
10
Speaker belongs only to Task locally
Batch
20
The Speaker belongs to a Batch
Workspace
30
The Speaker belongs to a workspace
Known Metadata Keys
These are case sensitive text values that can be matched to trigger specific behavior. However any text values can be considered for metadata key or metadata values.
SentByEmail
string(optional, available in all Workspaces)
Email address of the user that has inserted the document/task in the system
Any valid email address
Receipt Type
The ReceiptType enum helps identify which type of receipt was retrieved from the document.
RetailMeal
"Types.Receipts.Meal"
For receipts related to meals
Supplies
"Types.Receipts.Supplies"
For receipts related to supplies
Hotel
"Types.Receipts.Hotel"
For receipts related to hotels
FuelAndEnergy
"Types.Receipts.FuelAndEnergy"
For receipts related to fuel and energy
Transportation
"Types.Receipts.Transportation"
For receipts related to transportation
Communication
"Types.Receipts.Communication"
For receipts related to communication
Subscriptions
"Types.Receipts.Subscriptions"
For receipts related to subscription
Entertainment
"Types.Receipts.Entertainment"
For receipts related to entertainment
Training
"Types.Receipts.Training"
For receipts related to training
Healthcare
"Types.Receipts.Healthcare"
For receipts related to healthcare
Other
"Types.Receipts.Other"
For other type of receipts
Id Document Type
The IdDocumentType enum helps identify which type of Id was retrieved from the document.
DriverLicense
"Types.IdDocuments.DriverLicense"
For driver license documents
Passport
"Types.IdDocuments.Passport"
For passport documents
NationalIdentityCard
"Types.IdDocuments.NationalIdentityCard"
For national identity card documents
ResidencePermit
"Types.IdDocuments.ResidencePermit"
For residence permit documents
UsSocialSecurityCard
"Types.IdDocuments.UsSocialSecurityCard"
For US social security card documents
IdDocument
"Types.IdDocuments.IdDocument"
For id documents
Other
"Types.IdDocuments.Other"
For other type of documents
Last updated