query · Module: Templates · Requires templates:read
Arguments
Returns
DocumentList!
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
query Documents($limit: Int) {
documents(limit: $limit) {
data {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"documents": {
"data": [
{
"id": "obj_1a2B3c",
"object": "document",
"type": "label",
"format": "pdf",
"size": "4x6",
"url": "https://example.com/resource",
"url_expires_at": 1791302400,
"data": "example",
"handling_unit": "example",
"bundle": [
"example"
],
"template": "dtpl_packslip_v2",
"template_version": 2,
"related": {
"type": "example",
"id": "obj_1a2B3c"
},
"file": "file_6Yu8",
"sha256": "example"
}
],
"has_more": true
}
}
}
List documents
query Documents($limit: Int) {
documents(limit: $limit) {
data {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"documents": {
"data": [
{
"id": "obj_1a2B3c",
"object": "document",
"type": "label",
"format": "pdf",
"size": "4x6",
"url": "https://example.com/resource",
"url_expires_at": 1791302400,
"data": "example",
"handling_unit": "example",
"bundle": [
"example"
],
"template": "dtpl_packslip_v2",
"template_version": 2,
"related": {
"type": "example",
"id": "obj_1a2B3c"
},
"file": "file_6Yu8",
"sha256": "example"
}
],
"has_more": true
}
}
}
query · Module: Templates · Requires templates:read
| Argument | Type | Description |
|---|---|---|
relatedId | String | Filter by related.id. |
type | String | Filter by type. |
template | String | Filter by template. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
DocumentList!
| Field | Type |
|---|---|
data | [Document!]! |
has_more | Boolean |
errors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Documents($limit: Int) {
documents(limit: $limit) {
data {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"documents": {
"data": [
{
"id": "obj_1a2B3c",
"object": "document",
"type": "label",
"format": "pdf",
"size": "4x6",
"url": "https://example.com/resource",
"url_expires_at": 1791302400,
"data": "example",
"handling_unit": "example",
"bundle": [
"example"
],
"template": "dtpl_packslip_v2",
"template_version": 2,
"related": {
"type": "example",
"id": "obj_1a2B3c"
},
"file": "file_6Yu8",
"sha256": "example"
}
],
"has_more": true
}
}
}