Page Properties | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
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.
Code Block | ||
---|---|---|
| ||
//retrieving document pages
GET /documents/{id}/pages |
Request
Path
...
parameters
Name | Value |
---|---|
| Document ID |
Headers
Header | Value |
---|---|
|
|
Code Block | ||
---|---|---|
| ||
//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 |
---|---|
200 (OK) | The request was successful. |
404 (Not Found) | The requested document does not exist. |
Body
Name | Type | Description |
---|---|---|
|
| All pages in the current result page. |
A page is an entity with the following fields:
Key | Child key | Type | Description |
---|---|---|---|
|
| UUID of the document which the page belongs to. | |
|
| Page number. | |
|
| Links to related resources. | |
|
| Link to the document to which the page belongs. | |
|
| Link to the pages of the document. | |
|
| Links to pre-rendered page images in different resolutions. | |
image resolution in pixels |
| Link to a pre-rendered image of the page. |
Info |
---|
Image downloads require a corresponding `Accept` header such as `image/jpeg` or `image/*`. |
Code Block | ||
---|---|---|
| ||
//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" } } ] |