MOST Docs
mostQI APImostValid API
DEMO
  • Generative Content Extraction
  • Content Extraction
  • Multipage Content Extraction
  • Vio Extraction
  • Liveness
  • Facematch
  • Invoice Extraction
  • Address Parsing
  • License Plate
mostQI APImostValid API
DEMO
  • Generative Content Extraction
  • Content Extraction
  • Multipage Content Extraction
  • Vio Extraction
  • Liveness
  • Facematch
  • Invoice Extraction
  • Address Parsing
  • License Plate
Help Desk
MOST Linkedin
MOSTQI Instagram
MOST Youtube
pt-BRen-US
pt-BRen-US
  1. mostValid
  • Introduction
  • Consuming the API
  • API Characteristics
  • Error messages
  • Support Material
  • mostValid
    • Authenticate (Get JWT)
      POST
    • Content Extraction
      POST
    • Process Status
      POST
  1. mostValid

Content Extraction

POST
https://mostvalid.com.br/process-image/content-extraction
webhookregrastarefasextracaoocr
Last modified:2024-07-26 18:00:04
Accepted values for the scoreFlag parameter
IGNORE_NULL: Evaluation will only be conducted on fields, tables, or documents returned by mostQI that have scores lower than the specified configuration. In other words, returns with null scores will be ignored in the task generation process.
CONSIDER_NULL: Evaluation will be conducted on fields, tables, or documents returned by mostQI that have scores lower than the specified configuration or have a null value. In this case, returns with null scores will be considered in the task generation process.
IGNORE_SCORE: Regardless of the score returned by mostQI, a task will be opened for evaluation of the field, table, or document.
Input validation:
When the webhook parameter is provided, an intermediate call will be triggered when the initial extraction process is completed. This additional call aims to transmit the partial status of the process, indicating which entities (fields, tables, cells, and documents) are pending human evaluation, identified by the 'TO_ANALYSIS' status, and which entities do not require human evaluation, identified by the 'MOSTQIIOCR' status.
Deprecated fields
Deprecated fields are names of discontinued fields in the mostQI field naming standard. Although these fields may still be present in the current version of the extraction result, they are no longer recommended for use.
Deprecated fields are not considered by mostValid for task generation and are not displayed in the analysis tasks.
For clients still using deprecated fields in their operations, we recommend replacing them with the corresponding updated field.
Check the updated listing of documents and their respective fields here.

Request

Header Params
Authorization
string 
required
Authorization token obtained from the user/authenticate method.
Example:
Bearer {{bearer_token}}
Body Params application/json
fileBase64
string <base64>
optional
Binary file to be processed, encoded as a text string according to the RFC3548 standard using base64 encoding.
Match pattern:
RFC3548
fileUrl
string 
optional
Public URL of the file to be processed.
filePassword
string <base64>
optional
Password encoded in a base64 string, as PDFs allow passwords to be binary data.
Match pattern:
RFC3548
returnImage
boolean 
optional
If true, returns the binary clipping of the typified images with the corrected perspective
Default:
false
returnedImageQuality
integer 
optional
Allows you to set the quality of the returned deskew image in the extraction path. The attribute is optional, and its default value (when not reporting) is 75.
>= 0<= 100
Default:
75
tags
string 
optional
Optional parameter that aids in document identification, reducing processing time and enhancing detection accuracy, acting as a filter. Values entered in the tag array must be strings following the Regex pattern. Refer to the list of read documents to view all available tags.
webhook
object 
optional
url
string 
optional
Endpoint to which mostValid will make a call, sending the document extracted data during its processing. Insert the URL that will receive the call from mostValid.
fallbackUrl
string 
optional
Parameter to specify an alternative URL in case there is a communication failure in the call to the URL specified in the webhook.url parameter.
authorization
object 
optional
operation
object 
optional
id
string 
optional
Unique identifier for the operation to be created. This ID must be provided by the customer (user), and has to be a GUID (Globally Unique Identifier).
maxRetries
integer 
optional
The maximum number of capture attempts that a user can send during the process. If the user cannot send a file that did not generate a task in the N attempts (all attempted captures returned scores below the minimum accepted by the established rules), a review task will be generated.
>= 2<= 10
timeoutSeconds
integer 
optional
Maximum time, in seconds, that the system will wait for a new input in the process. If no new capture attempt is sent within the indicated time, a task will be created.
>= 1<= 900
generationRules
array [object {10}] 
optional
List of rules for generating tasks to be considered during the document processing. Up to 5 rules are allowed.
tags
string 
optional
Regex that defines for which tags the filters will be applied. It is possible to specify tags for a particular document or to choose that all documents sent to mostValid must be evaluated. For the latter, use the tag ^(id=.+)$.
documentConfiguration
object 
optional
generalFieldConfiguration
object 
optional
generalTableConfiguration
object 
optional
specificFieldConfiguration
object 
optional
List of specific fields, their respective minimum scores, and scoreFlags to generate tasks.
specificTableConfiguration
object 
optional
List of specific tables, their respective minimum scores, and scoreFlags to generate tasks.
fieldsNameWhitelist
array[string]
optional
Establishes a whitelist of fields whose score rule configurations will be applied exclusively to the fields specified in it.
tablesNameWhitelist
array[string]
optional
Establishes a whitelist of tables whose score rule configurations will be applied exclusively to the fields specified in it.
fieldsNameBlacklist
array[string]
optional
Fields that will not be reviewed under any circumstances, regardless of the score (in the case of task generation).
tablesNameBlacklist
array[string]
optional
Tables that will not be reviewed under any circumstances, regardless of the score (in the case of task generation).
Example
{
  "webhook": {
    "url": "",
    "fallbackUrl": "",
    "authorization": {
      "headers": [
        {
          "name": "nomeCabecalho1",
          "value": "valorCabecalho1"
        },
        {
          "name": "nomeCabecalho2",
          "value": "valorCabecalho2"
        }
      ],
      "queryStrings": [
        {
          "name": "nomeQs1",
          "value": "valorQs1"
        },
        {
          "name": "nomeQs2",
          "value": "valorQs2"
        }
      ]
    }
  },
  "fileBase64": "",
  "fileUrl": "",
  "returnImage": false,
  "returnedImageQuality": ""
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mostvalid.com.br/process-image/content-extraction' \
--header 'Authorization: Bearer {{bearer_token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "webhook" : {
   "url" : "",
   "fallbackUrl" : "",
   "authorization": {
            "headers": [
                {
                    "name": "nomeCabecalho1",
                    "value": "valorCabecalho1"
                },
                {
                    "name": "nomeCabecalho2",
                    "value": "valorCabecalho2"
                }
            ],
               "queryStrings": [
                {
                    "name": "nomeQs1",
                    "value": "valorQs1"
                },
                {
                    "name": "nomeQs2",
                    "value": "valorQs2"
                }
            ]
      }
  },
    "fileBase64": "",
    "fileUrl": "",
    "returnImage": false,
    "returnedImageQuality":""
}'

Responses

🟢200200 Ok
application/json
Body
result
object 
required
List containing the result of the method (see the documentation for each one).
processId
string 
required
ID referring to the asynchronous extraction process started from this request. This ID is a reference, and will be sent in asynchronous requests that will be made by the mostValid to the endpoint specified in the webhook header.
operationId
string 
required
Unique operation identifier to be created and provided by the client, which must be a GUID - Globally Unique Identifier.
requestId
string 
required
Unique identifier of the request.
elapsedMilliseconds
integer 
required
Processing duration time in milliseconds.
status
object 
required
Object containing the response status code and message.
message
string  | null 
optional
Status return message. See possible values ​​in mostQI error messages.
code
string 
required
Internal status code. See possible values ​​in mostQI error messages.
errors
array [object {2}] 
optional
List of objects of type Error, format is variable.
Example
{
  "result": {
    "processId": "1ccbdf64-f13b-4bf2-0d33-eade1e85c598",
    "operationId": "8b024a8c-c7e8-4bb4-9fb6-08304d278388"
  },
  "requestId": "VOUj0Ay9DESqp2RowoaItt",
  "elapsedMilliseconds": 100,
  "status": {
    "message": "Ok",
    "code": "201",
    "errors": null
  }
}
🟠400R101 A specified parameter is wrong
🟠400R300 Client isn't registered yet or has a invalid token
🔴500E100 The request could not be processed
Modified at 2024-07-26 18:00:04
Previous
Authenticate (Get JWT)
Next
Process Status
Built with