I. Introduction

The akaBot Vision API allows you to programmatically access and manage your organization's data and account information.

In this document, you will find an introduction to the API usage from a developer perspective, and a reference to all the API objects and methods.

II.API details

1. Import Document

  • Purposes: Documents can be imported into akaBot Vision using the REST API. Supported file formats are PDF, PNG, JPEG.
  • URL: {serverEndpoint}/api/uploadFile/{pipelineId}
  • Content-Type: multipart/form-data
  • Method: POST
  • Request header: Authorization: Bearer {apiKey}
  • Input body:
AttributeTypeDescriptionRequired
pipelineIdstringPipeline’s idYes
filesForm-dataList documents that want to be uploadedYes
  • Response:

If success, will return code 200 and response is Document model array

If fail, will return error code and message code as below

Responses codeDescription
200OK
201Created
401Unauthorized
403Forbidden
404Not found

Example request: 

image-20221128175926-1.png

Example Response:

image-20221201133805-1.png

2. Export Document

  • Purposes: Documents after being confirmed can be exported to csv,json,xlxs,xml file via API export document
  • URL: {serverEndpoint}/api/export-documents/{id}?exportType={exportType}
  • Content-Type: application/json
  • Method: GET
  • Request header: Authorization: Bearer {apiKey}
  • Input parameters:
AttributeTypeDescriptionRequired
idstringDocument id want export dataYes
exportTypestring

File format that user wanted to export

  • csv
  • xlxs
  • xml
  • json
Yes
  • Output
    • If success, will return code 200 and file with input type
    • If fail, will return error code and message code as below
Responses codeDescription
200OK
401Unauthorized
403Forbidden
404Not found

Example request:

image-20221201133833-2.png

Example Response:

image-20221201133842-3.png

3. Get Documents

  • Purposes: Can get list documents of specific pipeline with specific status.
  • URL: {serverEndpoint}/api/documents?page={page}&size={size}&status={status}&pipelineId={pipelineId}&documentName={documentName}&dateFrom={dateFrom}&dateTo={dateTo}&sort=createdDate,desc
  • Content-Type: application/json
  • Method: GET
  • Request header: Authorization: Bearer {apiKey}
  • Input parameters:
AttributeTypeDescriptionRequired
pageintegerPage number of the requested pageNo
sizeintegerSize of a pageNo
sortstringSorting criteria in the format: property(,asc|desc). Default sort order is ascending.No
statusstringDocuments’ statusNo
pipelineIdstringPipeline’s IdYes
documentNamestringSearch for document names containing input valuesNo
dateFromintegerSort document from dateNo
dateTointegerSort document to dateNo
  • Output

If success, will return code 200 and response is Document model array

If fail, will return error code and message code as below

Responses codeDescription
200OK
401Unauthorized
403Forbidden
404Not found

Example request:

image-20221201133854-4.png

Example Response:

image-20221201133903-5.png

4. Update Document Status

  • Purposes: User can change document status via API update document status
  • URL: {serverEndpoint}/api/change-docs-status
  • Content-Type: application/json
  • Method: POST
  • Request header: Authorization: Bearer {apiKey}
  • Input body:
AttributeTypeDescriptionRequired
docIdsString arrayList document’s Id need to be updated statusYes
statusChangestringThe status that documents will change toYes
  • Output
    • If success, will return code 200
    • If fail, will return error code and message code as below
Responses codeDescription
200OK
401Unauthorized
403Forbidden
404Not found

Example request:

image-20221201133917-6.png

Example Response:

image-20221201133924-7.png

5. Get Document Status

  • Purposes: Get document status
  • URL: {serverEndpoint}/api/documents/{id}    
  • Content-Type: application/json
  • Method: GET
  • Request header: Authorization: Bearer {apiKey}
  • Input parameters:
AttributeTypeDescriptionRequired
idstringDocument Id want to get infoYes
  • Output:

If success, will return code 200 and response is a Document model

If fail, will return error code and message code as below

Responses codeDescription
200OK
401Unauthorized
403Forbidden
404Not found

Example request:

image-20221201133936-8.png

Example Response:

image-20221201133946-9.png

III. Appendix

  1. Server endpoint: https://idp.akabot.com/ or http://idp.akabot.io
  2. Get API Key:
    Step 1: Go to {serverEndpoint} /account/api-keys
    Step 2: Copy key image-20221201134003-10.png
  3. Status is support: akaBot Docs
  4. Document model type:
AttributeTypeDescription
aiResponsestringResult get from AI
checkSumstringList documents that want to be uploaded
contentTypestringUploaded document’s format
createBystringPerson who upload documents
createDatestringDate upload document
dataMappingsarray 
dataMergestringMapping results between field to capture and AI’s results
documentKeystringDocument’s id
duplicateDocsarray

List documents are duplicated to recently uploaded documents

Id: Duplicate document’s id

Name: Duplicate document’s name

Status: Duplicate document’s status

 

id Document’s id
lastModifiedBystringPerson who last modified the document
lastModifiedDateDatetimeDate when document was last modified
namestringDocument’s name
pathUrlstringDocument’s URL
pipelineIdstringPipeline’s id
reasonstringReason for rejecting documents
reviewerEmailstringEmail who review documents
splittedDocsarrayList documents after being splitted
splitedPagesnumberNumber of document’s pages after being splitted
statusstringDocument’s status
tenantIdstringTenant’s Id
totalPagesstringTotal pages of documents
Tags:
 
Navigation