Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

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"
  }
}