documents
Query
The documents query returns a list of documents that your organisation has access to
Signature
Section titled “Signature”query { documents( organisationId: UUID! filter: DocumentsFilterInput start: Int = 0 count: Int = 100 ordering: DocumentOrdering = "Id" ascending: Boolean = false ): DocumentQuery!}Arguments
Section titled “Arguments”| Argument | Type | Default | Description |
|---|---|---|---|
organisationId* | UUID! | — | The ID of the organisation making the query |
filter | DocumentsFilterInput | — | The filters to apply to the search |
start | Int | 0 | The index of the first booking in the list to be returned |
count | Int | 100 | The number of bookings to be returned. Max 1000 |
ordering | DocumentOrdering | "Id" | The ordering method of the documents being returned. |
ascending | Boolean | false | A flag indicating whether the documents are in ascending order by the ordering method. True indicates ascending order. False indicates descending order. |
Return type
Section titled “Return type”DocumentQuery (DocumentQuery!)
Example
Section titled “Example”query Documents($organisationId: UUID!, $filter: DocumentsFilterInput, $start: Int, $count: Int, $ordering: DocumentOrdering, $ascending: Boolean) { documents(organisationId: $organisationId, filter: $filter, start: $start, count: $count, ordering: $ordering, ascending: $ascending) { start pageSize totalPages totalRecords data { id description updateDate } }}curl -X POST https://my.mobiledock.com/api/v1/graphql \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "query": "query Documents($organisationId: UUID!, $filter: DocumentsFilterInput, $start: Int, $count: Int, $ordering: DocumentOrdering, $ascending: Boolean) { documents(organisationId: $organisationId, filter: $filter, start: $start, count: $count, ordering: $ordering, ascending: $ascending) { id } }", "variables": { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" } }'const response = await fetch('https://my.mobiledock.com/api/v1/graphql', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ query: ` query Documents($organisationId: UUID!, $filter: DocumentsFilterInput, $start: Int, $count: Int, $ordering: DocumentOrdering, $ascending: Boolean) { documents(organisationId: $organisationId, filter: $filter, start: $start, count: $count, ordering: $ordering, ascending: $ascending) { start pageSize totalPages totalRecords data { id description updateDate } } } `, variables: { "organisationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }, }),});
const data = await response.json();Example response
Section titled “Example response”{ "data": { "documents": { "start": 0, "pageSize": 100, "totalPages": 5, "totalRecords": 0, "data": [ { "id": "example", "description": "", "updateDate": "2026-03-28T19:00:00Z" } ] } }}