curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Small Mailer Box",
"type": "box",
"inner_length_in": 8,
"inner_width_in": 6,
"inner_height_in": 4,
"tare_weight_oz": 3.5,
"max_weight_oz": 160,
"cost": 0.85,
"fill_limit_pct": 90,
"allowed_packing_classes": [
"standard"
],
"priority": 10,
"is_active": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates"
payload = {
"name": "Small Mailer Box",
"type": "box",
"inner_length_in": 8,
"inner_width_in": 6,
"inner_height_in": 4,
"tare_weight_oz": 3.5,
"max_weight_oz": 160,
"cost": 0.85,
"fill_limit_pct": 90,
"allowed_packing_classes": ["standard"],
"priority": 10,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Small Mailer Box',
type: 'box',
inner_length_in: 8,
inner_width_in: 6,
inner_height_in: 4,
tare_weight_oz: 3.5,
max_weight_oz: 160,
cost: 0.85,
fill_limit_pct: 90,
allowed_packing_classes: ['standard'],
priority: 10,
is_active: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Small Mailer Box',
'type' => 'box',
'inner_length_in' => 8,
'inner_width_in' => 6,
'inner_height_in' => 4,
'tare_weight_oz' => 3.5,
'max_weight_oz' => 160,
'cost' => 0.85,
'fill_limit_pct' => 90,
'allowed_packing_classes' => [
'standard'
],
'priority' => 10,
'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"
payload := strings.NewReader("{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\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>",
"errors": {}
}Create a carton template
Add a carton to the catalog. Only name is required; every other field falls back to its
default (type = box, fill_limit_pct = 100, priority = 0, is_active = true,
requires_dry_ice = false). name must be unique among non-deleted cartons.
curl --request POST \
--url https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Small Mailer Box",
"type": "box",
"inner_length_in": 8,
"inner_width_in": 6,
"inner_height_in": 4,
"tare_weight_oz": 3.5,
"max_weight_oz": 160,
"cost": 0.85,
"fill_limit_pct": 90,
"allowed_packing_classes": [
"standard"
],
"priority": 10,
"is_active": true
}
'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates"
payload = {
"name": "Small Mailer Box",
"type": "box",
"inner_length_in": 8,
"inner_width_in": 6,
"inner_height_in": 4,
"tare_weight_oz": 3.5,
"max_weight_oz": 160,
"cost": 0.85,
"fill_limit_pct": 90,
"allowed_packing_classes": ["standard"],
"priority": 10,
"is_active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Small Mailer Box',
type: 'box',
inner_length_in: 8,
inner_width_in: 6,
inner_height_in: 4,
tare_weight_oz: 3.5,
max_weight_oz: 160,
cost: 0.85,
fill_limit_pct: 90,
allowed_packing_classes: ['standard'],
priority: 10,
is_active: true
})
};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Small Mailer Box',
'type' => 'box',
'inner_length_in' => 8,
'inner_width_in' => 6,
'inner_height_in' => 4,
'tare_weight_oz' => 3.5,
'max_weight_oz' => 160,
'cost' => 0.85,
'fill_limit_pct' => 90,
'allowed_packing_classes' => [
'standard'
],
'priority' => 10,
'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"
payload := strings.NewReader("{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\n \"is_active\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\n \"is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/carton-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Small Mailer Box\",\n \"type\": \"box\",\n \"inner_length_in\": 8,\n \"inner_width_in\": 6,\n \"inner_height_in\": 4,\n \"tare_weight_oz\": 3.5,\n \"max_weight_oz\": 160,\n \"cost\": 0.85,\n \"fill_limit_pct\": 90,\n \"allowed_packing_classes\": [\n \"standard\"\n ],\n \"priority\": 10,\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>",
"errors": {}
}Authorizations
Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.
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 created.
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