D
Druckling
Docs

Retrieve a template and its JSON Schema

GET
/templates/{slug}

Authorization

headerAuthorizationBearer <token>

Authorization: Bearer dr_live_… or dr_test_…

Path Parameters

slug*string

Response Body

OK

application/json
  1. response
id*string
object*unknown
slug*string
name*string
status*string
Value in"draft""published"
latest_version*number|null
required_fields*array<string>
language*string

Default language, used when a render names none.

languages*array<string>

Every language the template renders in (pass one as language), default first. From the latest published version, or the draft if never published.

updated_at*string
Formatdate-time
json_schema*
sample_data*
Example Request
curl -X GET 'https://druckling-nine.vercel.app/v1/templates/string'
Example Response200
{  "id": "string",  "object": "template",  "slug": "string",  "name": "string",  "status": "draft",  "latest_version": 0,  "required_fields": [    "string"  ],  "language": "string",  "languages": [    "string"  ],  "updated_at": "2019-08-24T14:15:22Z",  "json_schema": {    "property1": null,    "property2": null  },  "sample_data": {    "property1": null,    "property2": null  }}