Retrieve Document Pages

The Gini Accounting API renders preview images of the document pages. In order to retrieve a list of pages for a document, issue a GET request to the pages sub-resource of the document.

//retrieving document pages GET /documents/{id}/pages
Request
Path parameters

Name

Value

Name

Value

id

Document ID

Headers

Header

Value

Header

Value

Accept

application/vnd.gini.v1+json

//retrieve document pages 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/pages
Response
Headers

Status Code

Description

Status Code

Description

200 (OK)

The request was successful.

404 (Not Found)

The requested document does not exist.

Body

Name

Type

Description

Name

Type

Description

pages

array

All pages in the current result page.

A page is an entity with the following fields:

Key

Child key

Type

Description

Key

Child key

Type

Description

documentId

string

UUID of the document which the page belongs to.

 

pagenum

number

Page number.

 

_links

object

Links to related resources.

 

 

document

string

Link to the document to which the page belongs.

 

pages

string

Link to the pages of the document.

_images

object

Links to pre-rendered page images in different resolutions.

 

 

image resolution in pixels

string

Link to a pre-rendered image of the page.

Image downloads require a corresponding `Accept` header such as `image/jpeg` or `image/*`.

//the response will be a list of pages. [ { "images" : { "large" : "https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000/pages/1/large", "medium" : "https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000/pages/1/medium" }, "pageNumber" : 1 }, { "pageNumber" : 2, "images" : { "large" : "https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000/pages/2/large", "medium" : "https://pay-api.gini.net/documents/c292af40-d06a-11e2-9a2f-000000000000/pages/2/medium" } } ]