Skip to main content
JSON files contain data structures specifying the number, types, and names of the documents, as well as the number and names of the pages for each document. To configure mobile upload for a specific user’s scenarios, use the JSON file in the mobile upload link. The md parameter can accept a JSON file in two formats: direct encoded link or encoded JSON. To use an encoded link:
  1. Generate a direct access link to the JSON file.
Note: The link should start with “http://” or “https://”.
  1. Encode the obtained link to URL-encoded format.
  2. Specify the encoded URL as the value for the md parameter in the mobile upload link.
To use an encoded JSON:
  1. Encode the JSON file to URL-encoded format.
  2. Specify the encoded JSON file as the value for the md parameter in the mobile upload link.

JSON structure

TransactionStructure defines a set of documents expected to be captured by the user during a mobile upload session for further processing in a transaction. The transaction will not start until all documents are captured.
PropertiesValueDescription
version2.4The current ABBYY Vantage version. Note: The value should correspond to the v parameter value in the mobile upload link.
elementsElementStructureThe structure of the collection of elements.
ElementStructure defines a collection of one or multiple sets of documents expected to be captured by the user for further processing in a transaction.
PropertiesValueDescription
typestandaloneDefines a collection with one set of documents.
typesingle_choiceDefines a collection with multiple sets of documents. Note: Requires at least two specified sets of documents.
nameThe name of the set of documents that will be displayed on the Capture Documents screen in the micro application. Note: Available only for the single_choice type.
documentDocumentStructureThe structure of one document in the set. Note: Available only for the standalone type.
documentsDocumentStructureThe structure of all documents in the set. Note: Available only for the single_choice type.
DocumentStructure defines a collection of the properties for each document in the set.
PropertiesValueDescription
typeidcardDefines capturing both sides (front and back) of an ID card.
typepassportDefines capturing the first page of a passport.
typedocumentDefines capturing any documents.
nameThe name of the document that will be displayed on the Capture Documents screen in the micro application.
count1,2,3...The required number of documents to be captured in one transaction. The default value is “1”. Note: The upload will not start until all documents are captured.
countanyThe number of documents to be captured in one transaction. Note: The upload will start with any number of captured documents.
galleryEnabledfalse/trueDefines whether uploading images of document pages from the device Gallery is allowed for this document.
pagesPagesStructureThe structure of the document pages.
PagesStructure defines a collection of properties for the document pages expected to be captured by the user.
PropertiesValueDescription
nameFront side/Back sideThe names of the pages of an ID card.
nameFirst page with photoThe name of the first page of a passport.
nameDocument page nameThe names of the pages of any document.
count1,2,3...The required number of pages to be captured for the document. The default value is “1”. The upload will not start until all pages of the document are captured. Note: The required value for the front and back side of an ID card is “1”.
countanyThe number of pages to be captured for any document. The upload will start with any number of captured pages. Note: The required value for the first page of a passport is “1”. The required value for other passport pages is “any”.

JSON sample

An example of JSON structure for capturing a specific amount of passport documents with a predefined number of pages:
{
  "version": "2.4",
  "elements": [
    {
      "type": "standalone",
      "document": {
        "type": "passport",
        "name": "Passport",
        "count": 1,
        "galleryEnabled": true,
        "pages": [
          {
            "name": "First page with photo",
            "count": 1
          },
          {
            "name": "Other pages",
            "count": "any"
          }
        ]
      }
    }
  ]
}
An example of JSON structure for capturing one of multiple predefined documents:
{
  "version": "2.4",
  "elements": [
    {
      "type": "single_choice",
      "name": "Document",
      "documents": [
        {
          "type": "idcard",
          "name": "ID Card",
          "count": 1,
          "galleryEnabled": true,
          "pages": [
            {
              "name": "Front side",
              "count": 1
            },
            {
              "name": "Back side",
              "count": 1
            }
          ]
        },
        {
          "type": "passport",
          "name": "Passport",
          "count": 1,
          "galleryEnabled": true,
          "pages": [
            {
              "name": "First page with photo",
              "count": 1
            },
            {
              "name": "Other pages",
              "count": "any"
            }
          ]
        }
      ]
    }
  ]
}
An example of JSON structure for capturing multiple documents with an optional ID card:
{
  "version": "2.4",
  "elements": [
    {
      "type": "standalone",
      "document": {
        "type": "document",
        "name": "Invoice",
        "count": 1,
        "galleryEnabled": true,
        "pages": [
          {
            "name": "Page",
            "count": "any"
          }
        ]
      }
    },
    {
      "type": "standalone",
      "document": {
        "type": "idcard",
        "name": "ID Card",
        "count": "any",
        "galleryEnabled": true,
        "pages": [
          {
            "name": "Front side",
            "count": 1
          },
          {
            "name": "Back side",
            "count": 1
          }
        ]
      }
    }
  ]
}