query · Module: Templates · Requires templates:read
Arguments
Returns
Document!
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 Document($id: ID!) {
document(id: $id) {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
}
{
"id": "obj_1a2B3c"
}
{
"data": {
"document": {
"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"
}
}
}
Retrieve a Document
query Document($id: ID!) {
document(id: $id) {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
}
{
"id": "obj_1a2B3c"
}
{
"data": {
"document": {
"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"
}
}
}
query · Module: Templates · Requires templates:read
| Argument | Type | Description |
|---|---|---|
id | ID! | The object’s ID. |
Document!
| Field | Type |
|---|---|
id | String! |
object | DocumentObject! |
type | DocumentType! |
format | DocumentFormat! |
size | String |
url | String |
url_expires_at | Int |
data | String |
handling_unit | String |
bundle | [String!] |
template | String |
template_version | Int |
related | DocumentRelated |
file | String |
sha256 | String |
errors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query Document($id: ID!) {
document(id: $id) {
id
object
type
format
size
url
url_expires_at
data
handling_unit
bundle
template
template_version
related {
type
id
}
file
sha256
}
}
{
"id": "obj_1a2B3c"
}
{
"data": {
"document": {
"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"
}
}
}