Using DocDigitizer PowerCapture API

Using DocDigitizer PowerCapture API

DocDigitizer PowerCapture API - Main Services

32583258

* Authentication
Purpose: authenticate the client, If success, you will receive 2 tokens: accessToken & refreshToken
You'll need to authenticate only once for as long as your token hasn't expired.
You must use the accessTokenagainst the rest of the endpoints.
Once it expires, you can either authenticate again or use the refreshToken to issue a new pair of tokens.
Method: POST
Header Parameters:

  • Authorization : pass your API Key

* Submit and annotate the given file
Purpose: submit a file to be processed indicating the class of the document. In the response there is the value of document_id that identify the file submit
Method: POST
Header Parameters:

  • Authorization : accessToken
    Path Parameters:
  • document_class : optional parameter (indicated the type of document being submitted
    possible values: “financial-document”, "invoice", "pay-slip", "bank-statement", "citizen-id-card", ...
    Body Parameters:
  • documentClass : indicated the type of document being submitted
    possible values: "invoice", "atm_receipt", "bank_statement", "payslips", "citizen_card_id_front,citizen_card_id_back", "citizen_card_id_front", "citizen_card_id_back", ...
  • useHumanRevision : indicate if you want to use human revision (data validation/curator process)
    possible values (Boolean). true | false
  • isSync : indicate that you want to wait for the response 8activy wait). Pass true only if "useHumanRevision" is false.
    possible values (Boolean). true | false
  • files : file to submit to extract data

* Get details of the document
Purpose: Get data extract from given document
Method: GET
Header Parameters:

  • Authorization : accessToken
    Path params:
  • docid : document id (receive in the Header response of "Submit and annotate the given file")
    Call this service when receiving “Notification” with status=reviewed (passing the corresponding document_id)

If you don’t have callback define, to check if the process of corresponding docid is finished, check the field statusText.
The statusText can have several values but the ones to check on the client side are:

  • ANNOTATED : process finished. Data extracted is available
  • REJECTED : process finished & document rejected (e.g. illegible data, invalid document, ...)
  • ERROR : process finished in error. Reasons can be several but normally because the document type is invalid or cannot be read.