Retrieve dieline template information by unit and ID.
Available dieline templates are listed on https://www.diecuttemplates.com/dielines
unit enum |
Unit required Possible values are: "mm" "in" |
id string |
Unique identifier for the template. required For example: "becf-10319" Dieline template ids start with "becf". Available dieline templates are listed on https://www.diecuttemplates.com/dielines |
curl -i -X GET \
https://api.diecuttemplates.com/dieline-templates/mm/becf-10301 \
-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/mm/becf-10301')
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/mm/becf-10301",
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-10301",
"group": {
"type": "dieline_template_group",
"id": "cartons_tuck_end_boxes",
"name": "Tuck End 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"
},
"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_37101_a20241118-2-uac8z6.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_37101_b20241118-2-6t2xod.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_37101_c20241118-2-z9i8xc.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": []
}
],
"links": [
{
"rel": "self",
"href": "/dieline_templates/in/becf-10301",
"method": "GET"
},
{
"rel": "web",
"href": "https://www.diecuttemplates.com/dielines/37101/tuck-end-boxes-becf-10301",
"method": "GET"
},
{
"rel": "add_top_postal_lock",
"href": "/dieline_templates/in/becf-1031b",
"method": "GET"
},
{
"rel": "add_top_thumb_cut",
"href": "/dieline_templates/in/becf-10319",
"method": "GET"
},
{
"rel": "add_hanger_tab",
"href": "/dieline_templates/in/becf-1030d",
"method": "GET"
},
{
"rel": "add_bottom_postal_lock",
"href": "/dieline_templates/in/becf-1031c",
"method": "GET"
},
{
"rel": "add_bottom_thumb_cut",
"href": "/dieline_templates/in/becf-1031a",
"method": "GET"
},
{
"rel": "change_flap",
"name": "friction_fit_tuck_in_flap",
"href": "/dieline_templates/in/becf-10307",
"method": "GET"
},
{
"rel": "change_dust_flap",
"name": "full_angled_dust_flap",
"href": "/dieline_templates/in/becf-10304",
"method": "GET"
}
],
"images": [
{
"type": "svg",
"url": "https://d2atdwxjx7uc4i.cloudfront.net/svg_api/s_3710120241118-2-tssl69.svg"
}
]
}
}
application/json
{
"message" => "Unauthorized"
}
application/json
{
"message" => "Resource cannot be found"
}
application/json
{
"message" => "Invalid 'unit'. Valid 'unit' values are 'mm' and 'in'."
}
application/json
{
"message" => "Forbidden"
}