Create a packing job
Validates the request, reserves the worst-case price from your credits and queues a job.
Answers 202 with the job; poll GET /v1/jobs/{id}, or pass ?wait= to hold the response until it ends. Validation failures (422) are free and create no job.
المصادقة
معاملات الاستعلام
waitintegerSeconds to hold the response for the job to finish. Finished in time: 200 with the result inlined. Otherwise: 202.
00–60معاملات الترويسة
Idempotency-KeystringAny unique string, such as a UUID or your order id. The same key within 24 h returns the original job instead of creating and charging a new one.
معاملات المحتوى
application/jsonreferencestringYour own reference (order number, shipment id…). Echoed back on the job.
vehiclesVehicle[]مطلوبVehicle definitions. Each one may have quantity > 1. At least one.
idstringYour identifier, unique within the request. Results refer to it as vehicle_id. Defaults to vehicle_id.
vehicle_idstringA vehicle id from GET /v1/vehicles: a preset or one of your organization's vehicles (veh_…). Supplies type, name, dimensions, payload and every other saved value.
typestringVehicle type. Required unless vehicle_id is given. Only the types listed in GET /v1/limits (allowed_vehicle_types) are accepted.
trucktrailerflatbedcontainerpalletaircraftshipnamestringDisplay name (defaults to the saved vehicle's name or the id).
lengthnumber · cmInternal cargo-space length, along x (from the front wall toward the door). Required unless vehicle_id is given.
widthnumber · cmInternal cargo-space width, along z. Required unless vehicle_id is given.
heightnumber · cmInternal cargo-space height, along y. Required unless vehicle_id is given.
max_weightnumber · kgMaximum payload. Required unless vehicle_id is given.
quantityintegerHow many identical vehicles of this definition are available.
11–100floor_load_capacitynumber · kg/m²Floor load capacity: 0 or more (0 = no limit).
aux_deckbooleanThe vehicle has a second deck (double-decker).
falseaux_deck_heightnumber · cmSecond deck height above the floor. Required when aux_deck is true.
aux_deck_max_weightnumber · kgLoad limit of the second deck. Required when aux_deck is true.
blocked_areasRect[]Floor zones nothing may stand on (wheel arches, damage, reserved space). Each must lie on the vehicle floor.
xnumber · cmمطلوبDistance from the front wall to the rectangle's near edge.
znumber · cmمطلوبDistance from the right wall (z = 0; right as seen from the door looking in) to the rectangle's near edge.
lengthnumber · cmمطلوبExtent along x.
widthnumber · cmمطلوبExtent along z.
axle_positionsيتطلب صلاحية وصولnumber[] · cmAxle (support point) positions measured from the front of the cargo area; negative = in front of it. Same length as axle_max_loads. Each between −300 (an axle ahead of the cargo area, e.g. a rigid truck's front axle under the cab) and the vehicle length.
axle_max_loadsيتطلب صلاحية وصولnumber[] · kgMaximum cargo load per axle, in the order of axle_positions. Each greater than 0 and at most 100000.
cog_range_xيتطلب صلاحية وصولnumber · cmAllowed centre-of-gravity deviation from the middle of the length: 0 to length / 2.
cog_range_yيتطلب صلاحية وصولnumber · cmAllowed centre-of-gravity deviation from the middle of the width: 0 to width / 2.
tractor_weightيتطلب صلاحية وصولnumber · kgSemi-trailer axle model: tractor unit mass.
empty_trailer_weightيتطلب صلاحية وصولnumber · kgSemi-trailer axle model: unladen trailer mass.
front_axle_to_middle_axleيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: tractor front axle to drive (middle) axle.
front_axle_to_tractor_cogيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: front axle to tractor centre of gravity.
front_axle_to_kingpinيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: front axle to kingpin (fifth wheel).
kingpin_to_rear_axleيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: kingpin to trailer rear axle group.
trailer_cog_to_rear_axleيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: trailer centre of gravity to rear axle group.
trailer_start_to_kingpinيتطلب صلاحية وصولnumber · cmSemi-trailer axle model: trailer front to kingpin.
max_middle_axle_weightيتطلب صلاحية وصولnumber · kgSemi-trailer axle model: legal drive (middle) axle limit.
max_rear_axle_weightيتطلب صلاحية وصولnumber · kgSemi-trailer axle model: legal rear axle group limit.
itemsItem[]مطلوبItem definitions. Each one may have quantity > 1. At least one.
idstringYour identifier, unique within the request. Results refer to it as item_id. Defaults to template_id.
template_idstringA template id (tpl_…) from GET /v1/templates. Supplies every item field; fields sent next to it override them.
labelstringDisplay label (defaults to the id).
shapestringItem shape. cylinder and drum use radius + height instead of length + width; pallet and drum always stay upright.
boxcylinderpalletbagdrumالافتراضي "box"lengthnumber · cmLength. Required unless shape is cylinder or drum.
widthnumber · cmWidth. Required unless shape is cylinder or drum.
heightnumber · cmمطلوبHeight (the vertical side when the item stands as defined).
radiusnumber · cmRadius. Required when shape is cylinder or drum.
weightnumber · kgمطلوبWeight of ONE unit.
quantityintegerNumber of identical units.
11–10000stackablebooleanOther items may be placed on top of this one.
truemax_stack_weightnumber · kgMaximum weight that may rest on one unit. 0 = unlimited.
0rotationstringall = any of the six orientations; upright = may only turn around the vertical axis (this side up); fixed = never rotated.
alluprightfixedالافتراضي "all"hazardousbooleanDangerous goods: kept low and separated from other hazardous items.
falsepriorityintegerLoad priority. Higher = loaded first and kept when space runs out. 0 = none.
0groupstringName of the group this item belongs to (see groups and options.group_routing).
colorstringDisplay colour as #rrggbb (viewer and PDF only).
nesting_heightnumber · cmTelescoping overlap when identical units stack (nested crates, buckets).
0groupsGroup[]Optional groups (customers, stops, orders). Required for every group an item names when options.group_routing is not "none"; otherwise groups are created from the item group names in order of appearance.
namestringمطلوبGroup name, referenced by Item.group.
orderintegerLoading order (lower = loaded first). Defaults to the position in the list.
colorstringDisplay colour as #rrggbb.
optionsOptionsPacking options. Every field is optional.
packing_modestringauto = when the listed vehicles are full, more copies of the most suitable vehicle are added (up to the job's vehicle limit); fleet_only = only the listed vehicles are used, anything that does not fit is reported as unplaced.
autofleet_onlyالافتراضي "auto"group_routingstringnone = groups are informational; wall = each group gets its own section of the vehicle; routing = groups load in order and a later group may sit on or beside an earlier one but never below it (multi-stop delivery); no_stack = groups load in order side by side, never on top of each other.
nonewallroutingno_stackالافتراضي "none"allow_overweightbooleanIgnore vehicle payload limits.
falsemax_stack_itemsintegerMaximum items in one stack. 0 = unlimited.
0max_stack_density_kg_m2number · kg/m²Maximum stack weight per floor area. 0 = unlimited.
0lock_rotationsbooleanKeep the first orientation that fits the vehicle height.
falsegroup_identical_binsbooleanTreat identical vehicles as one pool.
falsetime_limitnumber · sUpper bound on compute time for the whole job. 0 = automatic (capped at max_time_limit_seconds from GET /v1/limits). When the limit is reached the best plan found so far is returned. You pay only for the compute time actually used.
0enforce_axleيتطلب صلاحية وصولbooleanReject placements that overload an axle group, on vehicles that carry all ten axle-model fields.
falseمثال على الطلب
curl -X POST "https://runner.cargoduo.com/v1/pack" \
-H "Authorization: Bearer $CARGODUO_API_KEY" \
-H "Idempotency-Key: order-1042-v1" \
-H "Content-Type: application/json" \
-d '{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}'const res = await fetch("https://runner.cargoduo.com/v1/pack", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CARGODUO_API_KEY}`,
"Idempotency-Key": "order-1042-v1",
"Content-Type": "application/json",
},
body: JSON.stringify({
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}),
});
const data = await res.json();
console.log(res.status, data);import os
import requests
response = requests.post(
"https://runner.cargoduo.com/v1/pack",
headers={"Authorization": f"Bearer {os.environ['CARGODUO_API_KEY']}", "Idempotency-Key": "order-1042-v1"},
json={
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000,
},
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": False,
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright",
},
],
"options": {
"packing_mode": "auto",
},
},
)
print(response.status_code, response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}`)
req, err := http.NewRequest("POST", "https://runner.cargoduo.com/v1/pack", body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CARGODUO_API_KEY"))
req.Header.Set("Idempotency-Key", "order-1042-v1")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String body = """
{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://runner.cargoduo.com/v1/pack"))
.header("Authorization", "Bearer " + System.getenv("CARGODUO_API_KEY"))
.header("Idempotency-Key", "order-1042-v1")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode() + " " + response.body());
}
}using System.Net.Http.Headers;
using System.Text;
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("CARGODUO_API_KEY"));
client.DefaultRequestHeaders.Add("Idempotency-Key", "order-1042-v1");
var json = """
{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}
""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://runner.cargoduo.com/v1/pack")
{
Content = new StringContent(json, Encoding.UTF8, "application/json"),
};
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");<?php
$payload = <<<'JSON'
{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}
JSON;
$ch = curl_init('https://runner.cargoduo.com/v1/pack');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CARGODUO_API_KEY'),
'Idempotency-Key: order-1042-v1',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_HTTP_CODE), ' ', $response, PHP_EOL;require "net/http"
require "uri"
uri = URI("https://runner.cargoduo.com/v1/pack")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("CARGODUO_API_KEY")}"
request["Idempotency-Key"] = "order-1042-v1"
request["Content-Type"] = "application/json"
request.body = <<~'JSON'
{
"reference": "order-1042",
"vehicles": [
{
"id": "trailer",
"type": "trailer",
"name": "13.6 m trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000
}
],
"items": [
{
"id": "pallet-eu",
"label": "Euro pallet",
"length": 120,
"width": 80,
"height": 140,
"weight": 450,
"quantity": 18,
"stackable": false
},
{
"id": "carton-a",
"label": "Carton A",
"length": 60,
"width": 40,
"height": 40,
"weight": 12,
"quantity": 40,
"rotation": "upright"
}
],
"options": {
"packing_mode": "auto"
}
}
JSON
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts response.code, response.bodyمثال على الاستجابة
{
"id": "job_4bK9mT2xQe7LpW1zRc8VdN3f",
"object": "job",
"status": "queued",
"reference": "order-1042",
"source": "api",
"created_at": "2026-10-19T09:12:03Z",
"started_at": null,
"finished_at": null,
"progress": {
"stage": "queued",
"vehicles_done": 0,
"placed_items": 0
},
"summary": {
"items_requested": 58,
"items_placed": 0,
"items_unplaced": 0,
"vehicles_used": 0,
"total_weight": 0,
"volume_utilization": 0,
"queue_ms": 0,
"compute_ms": 0
},
"cost": {
"credits": 0,
"reserved_credits": 1.11,
"rate_card_version": 1,
"breakdown": {
"base": 0,
"vehicles": 0,
"compute": 0,
"large_load": 0
}
},
"error": null,
"warnings": [],
"result_url": "https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result",
"pdf_url": "",
"expires_at": "2026-11-02T09:12:03Z"
}الاستجابات
200OKJob finished within ?wait, result inlined. Also an idempotent replay of a finished job.
الاسمالنوعمطلوبالوصفidstringمطلوبstringنعمJob id (job_…).
objectstringمطلوبstringنعمAlways
job.jobstatusstringمطلوبstringنعمqueued→running→succeeded|failed|canceled.queuedrunningsucceededfailedcanceledreferencestringstringلاYour reference from the request.
sourcestringstringلاWhere the job was created.
apiplaygroundproject_idstringstringلاThe project (prj_…) a POST /v1/projects/{id}/pack job saves its plan into. Absent on other jobs.
created_atstringمطلوبstringنعمRFC 3339 timestamp.
started_atstring | nullstring | nullلاWhen computing started (RFC 3339) or
null.finished_atstring | nullstring | nullلاWhen the job ended (RFC 3339) or
null.progressJobProgressJobProgressلاLive progress while queued/running.
stagestringstringلاCurrent stage, such as
queued,running,finalizingordone. Informational: branch onJob.status.vehicles_doneintegerintegerلاVehicles packed so far.
placed_itemsintegerintegerلاItem units placed so far.
summaryJobSummaryJobSummaryلاCounts and timings.
items_requestedintegerintegerلاTotal item units (sum of quantities).
items_placedintegerintegerلاUnits placed.
items_unplacedintegerintegerلاUnits that could not be placed.
vehicles_usedintegerintegerلاVehicles that carry at least one item.
total_weightnumber · kgnumber · kgلاWeight loaded.
volume_utilizationnumbernumberلاAverage volume utilization of the used vehicles, 0–1.
queue_msintegerintegerلاTime spent waiting for a compute slot (not billed).
compute_msintegerintegerلاCompute time (billed).
costJobCostJobCostلاCredits charged (final once the job ended) and the reservation held while it ran.
creditsnumber · creditsnumber · creditsلاCredits charged (0 until the job ends). Failed jobs are not charged, except time_limit_exceeded, which is charged like a canceled job.
reserved_creditsnumber · creditsnumber · creditsلاCredits held while the job was queued/running (the worst-case price). Released when it ends.
rate_card_versionintegerintegerلاRate card the job is priced with.
breakdownCostBreakdownCostBreakdownلاItemized price.
basenumber · creditsnumber · creditsلاPer-job fee.
vehiclesnumber · creditsnumber · creditsلاPer loaded vehicle (not charged for canceled or time_limit_exceeded jobs).
computenumber · creditsnumber · creditsلاPer compute-second, pro-rated per millisecond.
large_loadnumber · creditsnumber · creditsلاSurcharge per started 100 items above the large-load threshold.
errorJobError | nullJobError | nullلاWhy the job failed or was canceled;
nullotherwise.codestringstringلاMachine code (see Errors).
messagestringstringلاEnglish explanation.
warningsWarning[]Warning[]لاNon-blocking remarks about the request (also repeated in the result).
codestringstringلاMachine code.
messagestringstringلاEnglish explanation.
result_urlstringstringلاGET this URL for the full result once
statusissucceeded.pdf_urlstringstringلاA browser link that renders the load plan as a PDF (3D views + loading steps). Valid until expires_at. Empty after expiry.
expires_atstringstringلاWhen the request/result bodies and the PDF link are deleted (RFC 3339). Job metadata and charges are kept.
resultResultResultلاThe full result, inlined only when requested (?include=result) or when POST /v1/pack?wait= finished in time.
job_idstringstringلاThe job.
vehiclesResultVehicle[]ResultVehicle[]لاLoaded vehicles in loading order (empty vehicles are left out).
indexintegerintegerلا0-based position in the plan.
vehicle_idstringstringلاYour vehicle definition id (for a project job: the slot id, pv_…).
copyintegerintegerلا1-based copy number of that definition (quantity > 1, or added in auto mode).
auto_addedbooleanbooleanلاAdded by
packing_modeautobeyond thequantityyou listed.namestringstringلاVehicle name.
typestringstringلاVehicle type.
lengthnumber · cmnumber · cmلاCargo-space length.
widthnumber · cmnumber · cmلاCargo-space width.
heightnumber · cmnumber · cmلاCargo-space height.
max_weightnumber · kgnumber · kgلاPayload limit.
items_placedintegerintegerلاUnits in this vehicle.
total_weightnumber · kgnumber · kgلاWeight in this vehicle.
volume_utilizationnumbernumberلاUsed volume / cargo-space volume, 0–1.
weight_utilizationnumbernumberلاtotal_weight / max_weight, 0–1 (may exceed 1 with allow_overweight).
center_of_gravityPointPointلاCentre of gravity of the load (cm).
xnumber · cmnumber · cmلاynumber · cmnumber · cmلاznumber · cmnumber · cmلاplacementsPlacement[]Placement[]لاEvery unit in this vehicle.
item_idstringstringلاYour item definition id (for a project job: the item id, item_…).
instanceintegerintegerلا1-based unit number within that item definition (unique across the whole plan).
labelstringstringلاItem label.
xnumber · cmnumber · cmلاMin-corner position along the length.
ynumber · cmnumber · cmلاMin-corner height above the floor.
znumber · cmnumber · cmلاMin-corner position across the width.
lengthnumber · cmnumber · cmلاSize along x as placed.
widthnumber · cmnumber · cmلاSize along z as placed.
heightnumber · cmnumber · cmلاSize along y as placed.
rotatedbooleanbooleanلاPlaced in a different orientation than defined.
orientationstringstringلاWhich defined side lies along x, z and y:
lwh= as defined,wlh= turned 90° around the vertical axis,lhw,hwl,whl,hlw= tipped onto a side.stepintegerintegerلا1-based loading step within the vehicle (load in ascending order).
weightnumber · kgnumber · kgلاUnit weight.
axle_loadsيتطلب صلاحية وصولAxleLoad[]AxleLoad[]لاLoad per axle (vehicles with axle data only).
namestringstringلاAxle 1,Axle 2… in the order ofaxle_positions.positionnumber · cmnumber · cmلاAxle position from the front of the cargo area.
loadnumber · kgnumber · kgلاCargo load on the axle.
maxnumber · kgnumber · kgلاConfigured maximum (0 = none).
okbooleanbooleanلاload≤max(alwaystruewithout a maximum).unplacedUnplacedItem[]UnplacedItem[]لاUnits that could not be placed, with the reason.
item_idstringstringلاYour item definition id.
instanceintegerintegerلا1-based unit number.
labelstringstringلاItem label.
reasonstringstringلاWhy it could not be placed.
warningsWarning[]Warning[]لاRemarks about the plan.
codestringstringلاMachine code.
messagestringstringلاEnglish explanation.
pdf_urlstringstringلاBrowser link that renders the plan as a PDF.
expires_atstringstringلاWhen this result is deleted (RFC 3339).
202AcceptedJob accepted (queued or running).
الاسمالنوعمطلوبالوصفidstringمطلوبstringنعمJob id (job_…).
objectstringمطلوبstringنعمAlways
job.jobstatusstringمطلوبstringنعمqueued→running→succeeded|failed|canceled.queuedrunningsucceededfailedcanceledreferencestringstringلاYour reference from the request.
sourcestringstringلاWhere the job was created.
apiplaygroundproject_idstringstringلاThe project (prj_…) a POST /v1/projects/{id}/pack job saves its plan into. Absent on other jobs.
created_atstringمطلوبstringنعمRFC 3339 timestamp.
started_atstring | nullstring | nullلاWhen computing started (RFC 3339) or
null.finished_atstring | nullstring | nullلاWhen the job ended (RFC 3339) or
null.progressJobProgressJobProgressلاLive progress while queued/running.
stagestringstringلاCurrent stage, such as
queued,running,finalizingordone. Informational: branch onJob.status.vehicles_doneintegerintegerلاVehicles packed so far.
placed_itemsintegerintegerلاItem units placed so far.
summaryJobSummaryJobSummaryلاCounts and timings.
items_requestedintegerintegerلاTotal item units (sum of quantities).
items_placedintegerintegerلاUnits placed.
items_unplacedintegerintegerلاUnits that could not be placed.
vehicles_usedintegerintegerلاVehicles that carry at least one item.
total_weightnumber · kgnumber · kgلاWeight loaded.
volume_utilizationnumbernumberلاAverage volume utilization of the used vehicles, 0–1.
queue_msintegerintegerلاTime spent waiting for a compute slot (not billed).
compute_msintegerintegerلاCompute time (billed).
costJobCostJobCostلاCredits charged (final once the job ended) and the reservation held while it ran.
creditsnumber · creditsnumber · creditsلاCredits charged (0 until the job ends). Failed jobs are not charged, except time_limit_exceeded, which is charged like a canceled job.
reserved_creditsnumber · creditsnumber · creditsلاCredits held while the job was queued/running (the worst-case price). Released when it ends.
rate_card_versionintegerintegerلاRate card the job is priced with.
breakdownCostBreakdownCostBreakdownلاItemized price.
basenumber · creditsnumber · creditsلاPer-job fee.
vehiclesnumber · creditsnumber · creditsلاPer loaded vehicle (not charged for canceled or time_limit_exceeded jobs).
computenumber · creditsnumber · creditsلاPer compute-second, pro-rated per millisecond.
large_loadnumber · creditsnumber · creditsلاSurcharge per started 100 items above the large-load threshold.
errorJobError | nullJobError | nullلاWhy the job failed or was canceled;
nullotherwise.codestringstringلاMachine code (see Errors).
messagestringstringلاEnglish explanation.
warningsWarning[]Warning[]لاNon-blocking remarks about the request (also repeated in the result).
codestringstringلاMachine code.
messagestringstringلاEnglish explanation.
result_urlstringstringلاGET this URL for the full result once
statusissucceeded.pdf_urlstringstringلاA browser link that renders the load plan as a PDF (3D views + loading steps). Valid until expires_at. Empty after expiry.
expires_atstringstringلاWhen the request/result bodies and the PDF link are deleted (RFC 3339). Job metadata and charges are kept.
resultResultResultلاThe full result, inlined only when requested (?include=result) or when POST /v1/pack?wait= finished in time.
job_idstringstringلاThe job.
vehiclesResultVehicle[]ResultVehicle[]لاLoaded vehicles in loading order (empty vehicles are left out).
indexintegerintegerلا0-based position in the plan.
vehicle_idstringstringلاYour vehicle definition id (for a project job: the slot id, pv_…).
copyintegerintegerلا1-based copy number of that definition (quantity > 1, or added in auto mode).
auto_addedbooleanbooleanلاAdded by
packing_modeautobeyond thequantityyou listed.namestringstringلاVehicle name.
typestringstringلاVehicle type.
lengthnumber · cmnumber · cmلاCargo-space length.
widthnumber · cmnumber · cmلاCargo-space width.
heightnumber · cmnumber · cmلاCargo-space height.
max_weightnumber · kgnumber · kgلاPayload limit.
items_placedintegerintegerلاUnits in this vehicle.
total_weightnumber · kgnumber · kgلاWeight in this vehicle.
volume_utilizationnumbernumberلاUsed volume / cargo-space volume, 0–1.
weight_utilizationnumbernumberلاtotal_weight / max_weight, 0–1 (may exceed 1 with allow_overweight).
center_of_gravityPointPointلاCentre of gravity of the load (cm).
xnumber · cmnumber · cmلاynumber · cmnumber · cmلاznumber · cmnumber · cmلاplacementsPlacement[]Placement[]لاEvery unit in this vehicle.
item_idstringstringلاYour item definition id (for a project job: the item id, item_…).
instanceintegerintegerلا1-based unit number within that item definition (unique across the whole plan).
labelstringstringلاItem label.
xnumber · cmnumber · cmلاMin-corner position along the length.
ynumber · cmnumber · cmلاMin-corner height above the floor.
znumber · cmnumber · cmلاMin-corner position across the width.
lengthnumber · cmnumber · cmلاSize along x as placed.
widthnumber · cmnumber · cmلاSize along z as placed.
heightnumber · cmnumber · cmلاSize along y as placed.
rotatedbooleanbooleanلاPlaced in a different orientation than defined.
orientationstringstringلاWhich defined side lies along x, z and y:
lwh= as defined,wlh= turned 90° around the vertical axis,lhw,hwl,whl,hlw= tipped onto a side.stepintegerintegerلا1-based loading step within the vehicle (load in ascending order).
weightnumber · kgnumber · kgلاUnit weight.
axle_loadsيتطلب صلاحية وصولAxleLoad[]AxleLoad[]لاLoad per axle (vehicles with axle data only).
namestringstringلاAxle 1,Axle 2… in the order ofaxle_positions.positionnumber · cmnumber · cmلاAxle position from the front of the cargo area.
loadnumber · kgnumber · kgلاCargo load on the axle.
maxnumber · kgnumber · kgلاConfigured maximum (0 = none).
okbooleanbooleanلاload≤max(alwaystruewithout a maximum).unplacedUnplacedItem[]UnplacedItem[]لاUnits that could not be placed, with the reason.
item_idstringstringلاYour item definition id.
instanceintegerintegerلا1-based unit number.
labelstringstringلاItem label.
reasonstringstringلاWhy it could not be placed.
warningsWarning[]Warning[]لاRemarks about the plan.
codestringstringلاMachine code.
messagestringstringلاEnglish explanation.
pdf_urlstringstringلاBrowser link that renders the plan as a PDF.
expires_atstringstringلاWhen this result is deleted (RFC 3339).
400Bad request
invalid_jsonidempotency_key_invalidinvalid_jsonThe body is not valid JSON or a field has the wrong type.idempotency_key_invalidThe Idempotency-Key header is longer than 128 characters.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
401Unauthorized
unauthorizedkey_revokedkey_expiredunauthorizedMissing, malformed or unknown API key.key_revokedThe key was revoked.key_expiredThe key passed its expiry date.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
402Payment required
insufficient_creditsinsufficient_creditsAvailable credits do not cover the smallest possible run of this job.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
403Forbidden
ip_not_allowedsubscription_inactiveaccount_inactivescope_missingip_not_allowedThe calling IP is not on the key's allowlist.subscription_inactiveThe organization has no active subscription that includes the API.account_inactiveThe organization is suspended, or has no owner whose account is active.scope_missingThe key lacks a scope this endpoint needs.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
413Payload too large
payload_too_largepayload_too_largeThe request body exceeds 10 MB.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
422Unprocessable entity
validation_failedvalidation_failedThe request is well-formed JSON but describes an invalid job. details[] lists every problem.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
429Too many requests
too_many_jobsrate_limitedtoo_many_jobsThe organization already has the maximum number of queued + running jobs.rate_limitedToo many requests in the current minute, hour or day (per key or per organization), or more than 60 failed authentications per minute from your IP address.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
500Internal server error
internal_errorinternal_errorSomething failed on our side.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.
503Service unavailable
api_disabledapi_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
كل رموز الأخطاءالاسمالنوعمطلوبالوصفerrorErrorBodyمطلوبErrorBodyنعمcodestringمطلوبstringنعمMachine code (snake_case). Branch on this, never on
message.messagestringمطلوبstringنعمEnglish explanation.
request_idstringمطلوبstringنعمSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]لاPer-field problems (
validation_failed).pathstringstringلاJSON path of the offending field, e.g. items[3].length.
codestringstringلاrequired,invalid_value,out_of_range,duplicate_id,unknown_vehicle,unknown_template,type_not_allowed,unknown_group,does_not_fit,too_many_items,too_many_vehicles,unknown_field,invalid_json.messagestringstringلاEnglish explanation.