D
Druckling
Docs

Retrieve a document

GET
/documents/{id}

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer dr_live_… or dr_test_…

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
object*unknown
status*string
Value in"queued""rendering""rendered""failed""expired"
template*string
version*number|null
filename*string
format*string

xml for XRechnung and Peppol BIS e-invoices.

Value in"pdf""png""xml"
content_type*string

application/pdf, image/png or application/xml.

image*|

Set for png documents.

pages*|

Pages in the file (a PNG is one page; null for XML).

size_bytes*number|null
url*|

Signed download URL while the document is retained.

expires_at*|null
error*|null
einvoice*|

Set when the document is or carries an e-invoice (templates with e-invoicing on).

batch*|

Set for documents rendered as part of a batch.

language*|

Language the document was rendered in (one of the template's languages); null for documents rendered before templates had languages.

signature*|

Set when the PDF carries a digital signature (PAdES) applied by Druckling.

storage*|

Set when the document is also copied to your own S3-compatible bucket (request storage, or the template's bucket rule).

test_mode*boolean
created_at*string
Formatdate-time
Example Request
curl -X GET 'https://druckling-nine.vercel.app/v1/documents/string'
Example Response200
{  "id": "string",  "object": "document",  "status": "queued",  "template": "string",  "version": 0,  "filename": "string",  "format": "pdf",  "content_type": "string",  "image": {    "page": 0,    "scale": 0,    "width": 0,    "height": 0  },  "pages": 0,  "size_bytes": 0,  "url": "string",  "expires_at": "2019-08-24T14:15:22Z",  "error": {    "code": "string",    "message": "string",    "field": "string"  },  "einvoice": {    "format": "factur-x",    "syntax": "cii",    "profile": "string",    "customization_id": "string",    "attachment": "string"  },  "batch": {    "id": "string",    "index": 0  },  "language": "string",  "signature": {    "certificate": "string",    "certificate_name": "string",    "subject": "string",    "level": "B-B",    "signed_at": "2019-08-24T14:15:22Z",    "test_certificate": true  },  "storage": {    "bucket": "string",    "status": "pending",    "key": "string",    "error": "string",    "attempts": 0,    "delivered_at": "2019-08-24T14:15:22Z"  },  "test_mode": true,  "created_at": "2019-08-24T14:15:22Z"}