Skip to content

Listing Documents

List documents belonging to your job.

The list documents endpoint allows you to retrieve a paginated list of documents in your job.

Endpoint

MethodUrl
GET/v1.0/jobs/{job_id}/documents

Request Parameters

page_size
number

The page size for search result pagination. If not provided, the service will default to 50 items.

page_token
string

The page to fetch. If any, this would be the next_page_token value returned from the previous request.

Sample Request

Copied
1curl -X GET 'https://api.worklayer.com/v1.0/jobs/a9749189-c82b-488b-a448-8f74c3d254e0/documents' \
2-H 'Authorization: Bearer {token}'

Response

data
list

The documents belonging to that job. See the document reference page.

next_page_token
string

The pagination token to retrieve the next page of results. If the value is "", it means no further results for the request.

Sample Response

Copied
1{
2 "data": [
3 {
4 "id": "e00c724c-86b1-4431-b906-3ca7158bfe66",
5 "title": "first.jpg",
6 "description": "",
7 "create_time": "2022-10-11T17:26:14.639Z",
8 "update_time": "2022-10-11T17:26:14.665Z"
9 },
10 {
11 "id": "f0601d84-b930-4d54-8221-9ba291d7c3b4",
12 "title": "second.jpg",
13 "description": "",
14 "create_time": "2022-10-07T17:19:57.447Z",
15 "update_time": "2022-10-07T17:21:06.105Z"
16 }
17 ],
18 "next_page_token": "ZGF0ZS9kYXRlX2NyZWF0ZWQvZGVzYy8xNjY1MTYzMTk3NDQ3"
19}

Errors

  1. Forbidden: API Client cannot list documents.
  2. Unauthorized: API Client does not have valid credentials.
  3. BadRequest: There was a malformed request.

Last updated on October 18, 2022