Api.createDocument

createDocument(containerId, initialDocumentData, mrz, rfid)

Creates a new document in an existing document container.

This method executes asynchronously and returns a promise.

Arguments
  • containerId (guid()) – Unique identifier of the document container.

  • initialDocumentData (object()) – Optional: Set of document properties which are initially set when creating a new document. Usually most properties are inferred from a Machine-Readable Zone (MRZ) or the image provided; however, some information might be set via initial document such as additional feedback information from the operator who scanned it. An example would be whether the operator checked that the person who presented the document matches the photo of the document holder.

  • mrz (string()) –

    Optional: Usually the MRZ is inferred from scanned image data automatically. However, there are cases where you might want to provide the MRZ manually. It must be provided as a string where multiple lines are separated by a newline character; for example:

    'P<UTOBANDERAS<<LILIAN<<<<<<<<<<<<<<<<<<<<<<<\n' +
    '0123456784UTO8001014F2501017<<<<<<<<<<<<<<06\n'
    

  • rfid (string()) – Optional: Some scanner hardware might provide the content of the MRZ that is provided via the RFID chip on the identity document. In this case, you may provide the MRZ from the RFID chip via this argument. The MRZ must be encoded in the same format as the mrz argument.

Returns

For error responses, see Error Responses.

If successful, creates a new document in the document container