Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Page Properties
hiddentrue

Status

Status
colourPurpleYellow
titlestarted
Status
colourBlue
titletext approvedfor review

Approver

Pavel Shkadzko

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.

Code Block
languagejson
//document information can be retrieved by sending a GET request to the document URI.

    GET /documents/{id}
Request
Headers

Header

Value

Accept

application/vnd.gini.v1+json

Code Block
languagejson
//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

200 (OK)

Operation is successful.

Header

Value

Content-Type

application/vnd.gini.v1+.json

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

Key

Child Key

Type

Description

id

string

Document

qnique

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,

e.g.

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

404 (Not Found)

Returned when no document can be found under specific URI.

Code Block
languagejson
//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"
  }
}