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-30207) via the API, please make a
GET request to
https://api.diecuttemplates.com/dieline-templates/in/becf-30207
curl -i -X GET \
https://api.diecuttemplates.com/dieline-templates/in/becf-30207 \
-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-30207')
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-30207",
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-30207",
"group": {
"type": "dieline_template_group",
"id": "hard_cardboards_boxes_with_hinged_lid",
"name": "Boxes With Hinged Lid",
"category": "Hard Cardboards"
},
"style": "alternative_1",
"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_67683_a20250213-2-947t1l.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_67683_b20250213-2-p8ixwc.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_67683_c20250213-2-soj0q4.svg"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "cover_height",
"description": "cover height",
"data_type": "length",
"required": true,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_d20250213-2-ogfoz8.svg"
},
"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": "magnet_diameter",
"description": "magnet diameter",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_d120250213-2-zsbqby.svg"
},
"default_value": {
"value": 0.395,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "cover_side_flap_1",
"description": "cover side flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_y120250213-2-5vxgpl.svg"
},
"default_value": {
"value": 0.788,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "cover_side_flap_2",
"description": "cover side flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_x120250213-2-lset3w.svg"
},
"default_value": {
"value": 0.788,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "cover_corner_angle",
"description": "cover corner angle",
"data_type": "angle",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_e20250213-2-pwx2b7.svg"
},
"default_value": {
"value": 20
},
"allowed_values": [
20.0,
25.0,
30.0,
35.0,
40.0,
45.0
],
"childen": []
},
{
"type": "dieline_template_variable",
"name": "side_flap_1",
"description": "side flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_y220250213-2-sb1k0g.svg"
},
"default_value": {
"value": 0.63,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "side_flap_2",
"description": "side flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_x220250213-2-u7uuht.svg"
},
"default_value": {
"value": 0.63,
"unit": "in"
},
"childen": []
},
{
"type": "dieline_template_variable",
"name": "side_flap_3",
"description": "side flap",
"data_type": "length",
"required": false,
"image": {
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_67683_x320250213-2-hm9uuk.svg"
},
"default_value": {
"value": 0.788,
"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_67683_f20250213-2-d74i2q.svg"
},
"default_value": {
"value": 0.788,
"unit": "in"
},
"childen": []
}
],
"links": [
{
"rel": "self",
"href": "/dieline_templates/in/becf-30207",
"method": "GET"
},
{
"rel": "web",
"href": "https://www.diecuttemplates.com/dielines/67683/boxes-with-hinged-lid-becf-30207",
"method": "GET"
},
{
"rel": "change_style",
"name": "alternative_3",
"href": "/dieline_templates/in/becf-30209",
"method": "GET"
},
{
"rel": "change_style",
"name": "alternative_2",
"href": "/dieline_templates/in/becf-30208",
"method": "GET"
}
],
"images": [
{
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_6768320250213-2-w5yzri.svg"
}
]
}
}