Check Processing Status and Get Document Information

Once the document is submitted, check its processing status by examining the document information. It is retrieved with a GET request containing the document URI. When the document is processed, retrieve its extractions and layout.

//document information can be retrieved by sending a GET request to the document URI. GET /documents/{id}
Request
Headers

Header

Value

Header

Value

Accept

application/vnd.gini.v1+json

//get document processing status curl -H 'Authorization: BEARER <token>' -X GET -H 'Accept: application/vnd.gini.v1+json' -i https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000
Response
Headers

Status Code

Description

Status Code

Description

200 (OK)

Operation is successful.

Header

Value

Header

Value

Content-Type

application/vnd.gini.v1+.json

Body (application/vnd.gini.v1+json)

Key

Child Key

Type

Description

Key

Child Key

Type

Description

id

 

string

Document unique identifier (such as UUID Version 1).

name

 

string

Document name (as stated in upload).

pageCount

 

number

Number of pages.

creationDate

 

number

Document creation unix timestamp (in milliseconds).

origin

 

string

Document source channel: UPLOAD (if uploaded via Gini Pay API) or UNKNOWN.

progress

 

string

Document processing status: PENDING, COMPLETED or ERROR.

sourceClassification

 

string

Classification of the source file: SCANNED, SANDWICH, NATIVE or TEXT.

 

pageNumber

number

Document page number.

 

images

object

Pre-rendered page image URIs.

_links

 

array

List of related resources, for example, found extractions or document layout.

 

extractions

string

Document extractions URI.

 

layout

string

Document layout URI.

 

processed

string

Processed document URI.

 

document

string

Document URI.

Errors

Status Code

Description

Status Code

Description

404 (Not Found)

Returned when no document can be found under specific URI.

//request response { "id": "626626a0-749f-11e2-bfd6-000000000000", "creationDate": 1360623867402, "name": "scanned.jpg", "progress": "COMPLETED", "origin": "UPLOAD", "sourceClassification": "SCANNED", "pageCount": 1, "_links": { "extractions": "https://pay-api.gini.net/documents/626626a0-749f-11e2-bfd6-000000000000/extractions", "layout": "https://pay-api.gini.net/documents/626626a0-749f-11e2-bfd6-000000000000/layout", "document": "https://pay-api.gini.net/documents/626626a0-749f-11e2-bfd6-000000000000", "processed": "https://pay-api.gini.net/documents/626626a0-749f-11e2-bfd6-000000000000/processed" } }

Â