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-10a11) via the API, please make a
GET request to https://api.diecuttemplates.com/dieline-templates/in/becf-10a11


Code Examples



curl -i -X GET \
https://api.diecuttemplates.com/dieline-templates/in/becf-10a11 \
  -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-10a11')

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-10a11",
  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;
}

Response

application/json
{
  "dieline_template": {
    "type": "dieline_template",
    "id": "becf-10a11",
    "group": {
      "type": "dieline_template_group",
      "id": "cartons_snap_lock_boxes",
      "name": "Snap Lock Boxes",
      "category": "Cartons"
    },
    "tags": [],
    "variables": [
      {
        "type": "dieline_template_variable",
        "name": "length",
        "description": "length",
        "data_type": "length",
        "required": true,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/QA4eD39wYn.svg"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "width",
        "description": "width",
        "data_type": "length",
        "required": true,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/9AKNMw8gyw.svg"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "height",
        "description": "height",
        "data_type": "length",
        "required": true,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/Nj437dQw4A.svg"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "direction",
        "description": "direction",
        "data_type": "boolean",
        "required": false,
        "default_value": {
          "value": false
        },
        "allowed_values": [
          true,
          false,
          0,
          1
        ],
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "cross",
        "description": "cross",
        "data_type": "boolean",
        "required": false,
        "default_value": {
          "value": false
        },
        "allowed_values": [
          true,
          false,
          0,
          1
        ],
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "window_length_top",
        "description": "window length top",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/xQyDZ7oGYD.svg"
        },
        "default_value": {
          "value": 2.4,
          "unit": "in"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "window_height",
        "description": "window height",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/R14J67oJ4Z.svg"
        },
        "default_value": {
          "value": 1.2,
          "unit": "in"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "window_length_bottom",
        "description": "window length bottom",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/9jYxGgLNKQ.svg"
        },
        "default_value": {
          "value": 1.6,
          "unit": "in"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "glue_flap",
        "description": "glue flap",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/AmyrnvEqy1.svg"
        },
        "default_value": {
          "value": 0.6,
          "unit": "in"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "internal_flap",
        "description": "internal flap",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/NJYkEeJxy7.svg"
        },
        "default_value": {
          "value": 0.6,
          "unit": "in"
        },
        "children": []
      },
      {
        "type": "dieline_template_variable",
        "name": "bottom_tuck_flap",
        "description": "bottom tuck flap",
        "data_type": "length",
        "required": false,
        "image": {
          "type": "svg",
          "url": "https://www.diecuttemplates.com/i2/lQ4g88Lyvn/2lY27G3l4P.svg"
        },
        "default_value": {
          "value": 0.6667,
          "unit": "in"
        },
        "children": []
      },
      {
        "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-10a11",
        "method": "GET"
      },
      {
        "rel": "web",
        "href": "https://www.diecuttemplates.com/dielines/51510/snap-lock-boxes-becf-10a11",
        "method": "GET"
      }
    ],
    "images": [
      {
        "type": "svg",
        "url": "https://d2atdwxjx7uc4i.cloudfront.net/d_svg_api/s_5151020251002-2-32x42r.svg"
      }
    ]
  }
} 


Read Dielines API documentation