This documentation page is intended for developers looking to integrate the Dielines API into their systems. If you have any questions, please get in touch.
Die Cut Templates provides a hosted API available via HTTPS.
Dielines API allows for generating custom dielines in PDF, DXF, and SVG formats, along with 3D mockups.
To fetch the dieline template (becf-12e01) via the API, please make a
GET request to
https://api.diecuttemplates.com/dieline-templates/in/becf-12e01
curl -i -X GET \
https://api.diecuttemplates.com/dieline-templates/in/becf-12e01 \
-H 'Authorization: Bearer <YOUR_DIELINES_API_KEY_HERE>' \
-H 'Dielines-Api-Version: 1.0'
require 'uri'
require 'net/http'
require 'openssl'
url = URI('https://api.diecuttemplates.com/dieline-templates/in/becf-12e01')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request['Dielines-Api-Version'] = '1.0'
request['Authorization'] = 'Bearer <YOUR_DIELINES_API_KEY_HERE>'
response = http.request(request)
puts response.read_body
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <YOUR_DIELINES_API_KEY_HERE>",
"Dielines-Api-Version: 1.0"
],
CURLOPT_URL => "https://api.diecuttemplates.com/dieline-templates/in/becf-12e01",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$error = curl_error($curl);
curl_close($curl);
if ($error) {
echo "cURL Error #:" . $error;
} else {
echo $response;
}
application/json
{
"dieline_template": {
"type": "dieline_template",
"id": "becf-12e01",
"group": {
"type": "dieline_template_group",
"id": "cartons_snap_lock_boxes",
"name": "Snap Lock Boxes",
"category": "Cartons"
},
"flap": {
"type": "flap",
"id": "uni_tuck_flap",
"image": "https://d2atdwxjx7uc4i.cloudfront.net/images/tags/flap_4.png"
},
"tuck": {
"type": "tuck",
"id": "sit_lock_tuck",
"image": "https://d2atdwxjx7uc4i.cloudfront.net/images/tags/tuck_4.png"
},
"dust_flap": {
"type": "dust_flap",
"id": "slit_lock_dust_flap",
"image": "https://d2atdwxjx7uc4i.cloudfront.net/images/tags/dust_flap_4.png"
},
"style": "style_c",
"tags": [],
"variables": [
{
"type": "dieline_template_variable",
"name": "length",
"description": "length",
"data_type": "length",
"required": true,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_a20250314-2-gm6ukf.svg"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "width",
"description": "width",
"data_type": "length",
"required": true,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_b20250314-2-bwz5hl.svg"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "height",
"description": "height",
"data_type": "length",
"required": true,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_c20250314-2-38z2e4.svg"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "overflow",
"description": "overflow",
"data_type": "boolean",
"required": false,
"default_value": {
"value": false
},
"allowed_values": [
true,
false,
0,
1
],
"childen": []
},
{
"type": "dieline_template_variable",
"name": "overflow_margin",
"description": "overflow margin",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_p20250314-2-iide5g.svg"
},
"default_value": {
"value": 0.0,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "glue_margin",
"description": "glue margin",
"data_type": "boolean",
"required": false,
"default_value": {
"value": false
},
"allowed_values": [
true,
false,
0,
1
],
"childen": []
},
{
"type": "dieline_template_variable",
"name": "direction",
"description": "direction",
"data_type": "boolean",
"required": false,
"default_value": {
"value": false
},
"allowed_values": [
true,
false,
0,
1
],
"childen": []
},
{
"type": "dieline_template_variable",
"name": "cross",
"description": "cross",
"data_type": "boolean",
"required": false,
"default_value": {
"value": false
},
"allowed_values": [
true,
false,
0,
1
],
"childen": []
},
{
"type": "dieline_template_variable",
"name": "window_height",
"description": "window height",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_f20250314-2-q3gkyt.svg"
},
"default_value": {
"value": 2.0,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "window_length",
"description": "window length",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_g20250314-2-89avvj.svg"
},
"default_value": {
"value": 2.6667,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "display_length",
"description": "display length",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_j20250314-2-v3ojk9.svg"
},
"default_value": {
"value": 2.8,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "display_height",
"description": "display height",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529_k20250314-2-3x4mu9.svg"
},
"default_value": {
"value": 2.6025,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "glue_flap",
"description": "glue flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529__kulak20250314-2-6vfxgg.svg"
},
"default_value": {
"value": 0.6,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "top_tuck_flap",
"description": "top tuck flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529__dil20250314-2-gzz2m7.svg"
},
"default_value": {
"value": 0.6,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "dust_flap",
"description": "dust flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529__flap20250314-2-lnr2kq.svg"
},
"default_value": {
"value": 1.0,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "bottom_tuck_flap",
"description": "bottom tuck flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_50529__dip20250314-2-wd3xjs.svg"
},
"default_value": {
"value": 0.6667,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "dimension_texts",
"description": "",
"data_type": "boolean",
"required": false,
"allowed_values": [
true,
false
],
"default_value": {
"value": true
}
}
],
"links": [
{
"rel": "self",
"href": "/dieline_templates/in/becf-12e01",
"method": "GET"
},
{
"rel": "web",
"href": "https://www.diecuttemplates.com/dielines/50529/snap-lock-boxes-becf-12e01",
"method": "GET"
},
{
"rel": "add_postal_lock",
"href": "/dieline_templates/in/becf-12e03",
"method": "GET"
},
{
"rel": "add_thumb_cut",
"href": "/dieline_templates/in/becf-12e02",
"method": "GET"
},
{
"rel": "change_flap",
"name": "friction_fit_tuck_in_flap",
"href": "/dieline_templates/in/becf-12e07",
"method": "GET"
},
{
"rel": "change_dust_flap",
"name": "full_angled_dust_flap",
"href": "/dieline_templates/in/becf-12e04",
"method": "GET"
},
{
"rel": "change_style",
"name": "style_b",
"href": "/dieline_templates/in/becf-12e0d",
"method": "GET"
},
{
"rel": "change_style",
"name": "style_a",
"href": "/dieline_templates/in/becf-12e19",
"method": "GET"
}
],
"images": [
{
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_5052920250314-2-ysqq62.svg"
}
]
}
}