Retrieve a nesting template list for a specific dieline. Returns nesting templates filtered based on the dieline's formula options (dimensions, material, etc.), ensuring only applicable templates are returned for that specific dieline configuration.
| dieline_id string |
Unique identifier for the "dieline" object required Example: "di_fwe4iu3vngty" |
Represents a list of nesting (also known as imposition or layout) templates available for a specific dieline. The list is filtered based on the dieline's variables (dimensions, material, etc.) to show only applicable templates.
curl -i -X GET \
https://api.diecuttemplates.com/dielines/di_fwe4iu3vngty/nesting-templates \
-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/dielines/di_fwe4iu3vngty/nesting-templates')
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
$url = 'https://api.diecuttemplates.com/dielines/di_fwe4iu3vngty/nesting-templates';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Dielines-Api-Version: 1.0',
'Authorization: Bearer <YOUR_DIELINES_API_KEY_HERE>'
]);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error: ' . curl_error($ch);
} else {
echo 'Response: ' . $response;
}
curl_close($ch);
application/json {
"nesting_template_list": {
"type": "nesting_template_list",
"id": "ntl_kw4Z80qKP6",
"dieline_id": "di_aretrmecuekx",
"dieline_template_id": "becf-30203",
"total": 2,
"nesting_template_components": [],
"nesting_templates": [
{
"type": "nesting_template",
"id": "lt_NJYkRajK70",
"nesting_template_components": [
{
"type": "nesting_template_component",
"id": "hard-cardboard-of-the-box",
"name": "Hard cardboard of the box",
"category": "hard_cardboard"
}
],
"variables": [
{
"type": "dieline_template_variable",
"name": "sheet_dimensions",
"description": "Sheet dimensions including sheet_width, sheet_height, margin_top, margin_bottom and margin_side",
"data_type": "sheet_dimensions",
"required": true,
"children": []
},
{
"type": "dieline_template_variable",
"name": "num_x",
"description": "Number of dielines on the x axis.",
"data_type": "integer",
"required": false,
"children": []
},
{
"type": "dieline_template_variable",
"name": "num_y",
"description": "Number of dielines on the y axis",
"data_type": "integer",
"required": false,
"children": []
},
{
"type": "dieline_template_variable",
"name": "margin_x",
"description": "Horizontal spacing ",
"data_type": "length",
"required": false,
"default_value": {
"value": "0.0",
"unit": "mm"
},
"children": []
},
{
"type": "dieline_template_variable",
"name": "margin_y",
"description": "Vertical spacing",
"data_type": "length",
"required": false,
"default_value": {
"value": "0.0",
"unit": "mm"
},
"children": []
}
],
"images": [
{
"type": "svg",
"url": null
}
],
"links": [
{
"rel": "create_nesting",
"href": "/dielines/di_aretrmecuekx/nestings/lt_NJYkRajK70",
"method": "POST"
}
]
},
{
"type": "nesting_template",
"id": "lt_2lY22jOYP6",
"nesting_template_components": [
{
"type": "nesting_template_component",
"id": "hard-cardboard-of-the-box",
"name": "Hard cardboard of the box",
"category": "hard_cardboard"
}
],
"variables": [
{
"type": "dieline_template_variable",
"name": "sheet_dimensions",
"description": "Sheet dimensions including sheet_width, sheet_height, margin_top, margin_bottom and margin_side",
"data_type": "sheet_dimensions",
"required": true,
"children": []
},
{
"type": "dieline_template_variable",
"name": "num_x",
"description": "Number of dielines on the x axis.",
"data_type": "integer",
"required": false,
"children": []
},
{
"type": "dieline_template_variable",
"name": "num_y",
"description": "Number of dielines on the y axis",
"data_type": "integer",
"required": false,
"children": []
},
{
"type": "dieline_template_variable",
"name": "margin_x",
"description": "Horizontal spacing ",
"data_type": "length",
"required": false,
"default_value": {
"value": "0.0",
"unit": "mm"
},
"children": []
},
{
"type": "dieline_template_variable",
"name": "margin_y",
"description": "Vertical spacing",
"data_type": "length",
"required": false,
"default_value": {
"value": "0.0",
"unit": "mm"
},
"children": []
}
],
"images": [
{
"type": "svg",
"url": null
}
],
"links": [
{
"rel": "create_nesting",
"href": "/dielines/di_aretrmecuekx/nestings/lt_2lY22jOYP6",
"method": "POST"
}
]
}
]
}
}