curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"inner_length_in": 1,
"inner_width_in": 1,
"inner_height_in": 1,
"tare_weight_oz": 1,
"max_weight_oz": 1,
"cost": 1,
"fill_limit_pct": 50,
"allowed_packing_classes": [
"<string>"
],
"requires_dry_ice": true,
"dry_ice_weight_oz": 1,
"default_package_code": "<string>",
"priority": 123,
"is_active": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}"
payload = {
"name": "<string>",
"inner_length_in": 1,
"inner_width_in": 1,
"inner_height_in": 1,
"tare_weight_oz": 1,
"max_weight_oz": 1,
"cost": 1,
"fill_limit_pct": 50,
"allowed_packing_classes": ["<string>"],
"requires_dry_ice": True,
"dry_ice_weight_oz": 1,
"default_package_code": "<string>",
"priority": 123,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
inner_length_in: 1,
inner_width_in: 1,
inner_height_in: 1,
tare_weight_oz: 1,
max_weight_oz: 1,
cost: 1,
fill_limit_pct: 50,
allowed_packing_classes: ['<string>'],
requires_dry_ice: true,
dry_ice_weight_oz: 1,
default_package_code: '<string>',
priority: 123,
is_active: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'inner_length_in' => 1,
'inner_width_in' => 1,
'inner_height_in' => 1,
'tare_weight_oz' => 1,
'max_weight_oz' => 1,
'cost' => 1,
'fill_limit_pct' => 50,
'allowed_packing_classes' => [
'<string>'
],
'requires_dry_ice' => true,
'dry_ice_weight_oz' => 1,
'default_package_code' => '<string>',
'priority' => 123,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"type": "box",
"inner_length_in": 123,
"inner_width_in": 123,
"inner_height_in": 123,
"tare_weight_oz": 123,
"max_weight_oz": 123,
"cost": 123,
"fill_limit_pct": 123,
"allowed_packing_classes": [
"<string>"
],
"requires_dry_ice": true,
"dry_ice_weight_oz": 123,
"default_package_code": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Update a carton template (PATCH)
Alias for PUT /carton-templates/{cartonTemplateId} — a partial update. Send only the
fields you intend to change.
curl --request PATCH \
--url https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"inner_length_in": 1,
"inner_width_in": 1,
"inner_height_in": 1,
"tare_weight_oz": 1,
"max_weight_oz": 1,
"cost": 1,
"fill_limit_pct": 50,
"allowed_packing_classes": [
"<string>"
],
"requires_dry_ice": true,
"dry_ice_weight_oz": 1,
"default_package_code": "<string>",
"priority": 123,
"is_active": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}"
payload = {
"name": "<string>",
"inner_length_in": 1,
"inner_width_in": 1,
"inner_height_in": 1,
"tare_weight_oz": 1,
"max_weight_oz": 1,
"cost": 1,
"fill_limit_pct": 50,
"allowed_packing_classes": ["<string>"],
"requires_dry_ice": True,
"dry_ice_weight_oz": 1,
"default_package_code": "<string>",
"priority": 123,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
inner_length_in: 1,
inner_width_in: 1,
inner_height_in: 1,
tare_weight_oz: 1,
max_weight_oz: 1,
cost: 1,
fill_limit_pct: 50,
allowed_packing_classes: ['<string>'],
requires_dry_ice: true,
dry_ice_weight_oz: 1,
default_package_code: '<string>',
priority: 123,
is_active: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'inner_length_in' => 1,
'inner_width_in' => 1,
'inner_height_in' => 1,
'tare_weight_oz' => 1,
'max_weight_oz' => 1,
'cost' => 1,
'fill_limit_pct' => 50,
'allowed_packing_classes' => [
'<string>'
],
'requires_dry_ice' => true,
'dry_ice_weight_oz' => 1,
'default_package_code' => '<string>',
'priority' => 123,
'is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates/{cartonTemplateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"inner_length_in\": 1,\n \"inner_width_in\": 1,\n \"inner_height_in\": 1,\n \"tare_weight_oz\": 1,\n \"max_weight_oz\": 1,\n \"cost\": 1,\n \"fill_limit_pct\": 50,\n \"allowed_packing_classes\": [\n \"<string>\"\n ],\n \"requires_dry_ice\": true,\n \"dry_ice_weight_oz\": 1,\n \"default_package_code\": \"<string>\",\n \"priority\": 123,\n \"is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"type": "box",
"inner_length_in": 123,
"inner_width_in": 123,
"inner_height_in": 123,
"tare_weight_oz": 123,
"max_weight_oz": 123,
"cost": 123,
"fill_limit_pct": 123,
"allowed_packing_classes": [
"<string>"
],
"requires_dry_ice": true,
"dry_ice_weight_oz": 123,
"default_package_code": "<string>",
"priority": 123,
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
Path Parameters
Carton template ID.
Body
Create/update payload for a carton template. On create, only name is required; all other
fields fall back to their column defaults. On update every field is optional — send only the
fields you intend to change.
Carton name (unique among non-deleted templates). Required on create.
255Container type. Defaults to box.
box, envelope, custom Usable interior length, in inches.
x >= 0Usable interior width, in inches.
x >= 0Usable interior height, in inches.
x >= 0The empty carton's own weight, in ounces.
x >= 0Maximum content weight the carton can hold, in ounces.
x >= 0Cost of the carton itself.
x >= 0Maximum fill (1–100) of the carton's volume the engine will pack. Defaults to 100.
1 <= x <= 100List of packing-class values this carton accepts. null (or omitted) means any class.
Whether shipments packed in this carton require dry ice. Defaults to false.
Weight of dry ice to add, in ounces.
x >= 0Carrier package-type code used when buying a label for this carton.
255Selection priority. Higher-priority cartons are preferred by the engine. Defaults to 0.
Whether the carton is active and available for cartonization. Defaults to true.
Response
Carton template updated.
A carton template — a shipping box, envelope, or packer-custom container in the carton catalog that the cartonization engine can choose from when packing a shipment. Dimensions are stored in inches and weights in ounces.
Show child attributes
Show child attributes