Get a job result
The load plan of a succeeded job: every vehicle used, every placement, what did not fit and the PDF link.
Autenticação
Parâmetros de caminho
idstringobrigatórioJob id (job_…).
Exemplo de pedido
curl -X GET "https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result" \
-H "Authorization: Bearer $CARGODUO_API_KEY"const res = await fetch("https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.CARGODUO_API_KEY}`,
},
});
const data = await res.json();
console.log(res.status, data);import os
import requests
response = requests.get(
"https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result",
headers={"Authorization": f"Bearer {os.environ['CARGODUO_API_KEY']}"},
)
print(response.status_code, response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CARGODUO_API_KEY"))
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 {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result"))
.header("Authorization", "Bearer " + System.getenv("CARGODUO_API_KEY"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.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"));
var request = new HttpRequestMessage(HttpMethod.Get, "https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result");
var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");<?php
$ch = curl_init('https://runner.cargoduo.com/v1/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('CARGODUO_API_KEY'),
],
]);
$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/jobs/job_4bK9mT2xQe7LpW1zRc8VdN3f/result")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("CARGODUO_API_KEY")}"
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(request)
end
puts response.code, response.bodyExemplo de resposta
{
"job_id": "job_4bK9mT2xQe7LpW1zRc8VdN3f",
"vehicles": [
{
"index": 0,
"vehicle_id": "trailer",
"copy": 1,
"auto_added": false,
"name": "13.6 m trailer",
"type": "trailer",
"length": 1360,
"width": 245,
"height": 270,
"max_weight": 24000,
"items_placed": 58,
"total_weight": 8580,
"volume_utilization": 0.3116,
"weight_utilization": 0.3575,
"center_of_gravity": {
"x": 452.6,
"y": 68.4,
"z": 121.8
},
"axle_loads": [],
"placements": [
{
"item_id": "pallet-eu",
"instance": 1,
"label": "Euro pallet",
"x": 0,
"y": 0,
"z": 0,
"length": 80,
"width": 120,
"height": 140,
"rotated": true,
"orientation": "wlh",
"step": 1,
"weight": 450
},
{
"item_id": "pallet-eu",
"instance": 2,
"label": "Euro pallet",
"x": 0,
"y": 0,
"z": 120,
"length": 80,
"width": 120,
"height": 140,
"rotated": true,
"orientation": "wlh",
"step": 2,
"weight": 450
},
{
"item_id": "carton-a",
"instance": 1,
"label": "Carton A",
"x": 720,
"y": 0,
"z": 0,
"length": 60,
"width": 40,
"height": 40,
"rotated": false,
"orientation": "lwh",
"step": 19,
"weight": 12
}
]
}
],
"unplaced": [],
"warnings": [],
"pdf_url": "https://app.cargoduo.com/r/Xq7Lm2Vt9KbR4cN8wZp1Hs6Yd3Fg5Jk0Ta2Ue7Wn4Ci",
"expires_at": "2026-11-02T09:12:03Z"
}Abridged: 3 of the 58 placements are shown.
Respostas
200OKThe load plan.
NomeTipoObrigatórioDescriçãojob_idstringstringNãoThe job.
vehiclesResultVehicle[]ResultVehicle[]NãoLoaded vehicles in loading order (empty vehicles are left out).
indexintegerintegerNão0-based position in the plan.
vehicle_idstringstringNãoYour vehicle definition id (for a project job: the slot id, pv_…).
copyintegerintegerNão1-based copy number of that definition (quantity > 1, or added in auto mode).
auto_addedbooleanbooleanNãoAdded by
packing_modeautobeyond thequantityyou listed.namestringstringNãoVehicle name.
typestringstringNãoVehicle type.
lengthnumber · cmnumber · cmNãoCargo-space length.
widthnumber · cmnumber · cmNãoCargo-space width.
heightnumber · cmnumber · cmNãoCargo-space height.
max_weightnumber · kgnumber · kgNãoPayload limit.
items_placedintegerintegerNãoUnits in this vehicle.
total_weightnumber · kgnumber · kgNãoWeight in this vehicle.
volume_utilizationnumbernumberNãoUsed volume / cargo-space volume, 0–1.
weight_utilizationnumbernumberNãototal_weight / max_weight, 0–1 (may exceed 1 with allow_overweight).
center_of_gravityPointPointNãoCentre of gravity of the load (cm).
xnumber · cmnumber · cmNãoynumber · cmnumber · cmNãoznumber · cmnumber · cmNãoplacementsPlacement[]Placement[]NãoEvery unit in this vehicle.
item_idstringstringNãoYour item definition id (for a project job: the item id, item_…).
instanceintegerintegerNão1-based unit number within that item definition (unique across the whole plan).
labelstringstringNãoItem label.
xnumber · cmnumber · cmNãoMin-corner position along the length.
ynumber · cmnumber · cmNãoMin-corner height above the floor.
znumber · cmnumber · cmNãoMin-corner position across the width.
lengthnumber · cmnumber · cmNãoSize along x as placed.
widthnumber · cmnumber · cmNãoSize along z as placed.
heightnumber · cmnumber · cmNãoSize along y as placed.
rotatedbooleanbooleanNãoPlaced in a different orientation than defined.
orientationstringstringNãoWhich 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.stepintegerintegerNão1-based loading step within the vehicle (load in ascending order).
weightnumber · kgnumber · kgNãoUnit weight.
axle_loadsAcesso mediante pedidoAxleLoad[]AxleLoad[]NãoLoad per axle (vehicles with axle data only).
namestringstringNãoAxle 1,Axle 2… in the order ofaxle_positions.positionnumber · cmnumber · cmNãoAxle position from the front of the cargo area.
loadnumber · kgnumber · kgNãoCargo load on the axle.
maxnumber · kgnumber · kgNãoConfigured maximum (0 = none).
okbooleanbooleanNãoload≤max(alwaystruewithout a maximum).unplacedUnplacedItem[]UnplacedItem[]NãoUnits that could not be placed, with the reason.
item_idstringstringNãoYour item definition id.
instanceintegerintegerNão1-based unit number.
labelstringstringNãoItem label.
reasonstringstringNãoWhy it could not be placed.
warningsWarning[]Warning[]NãoRemarks about the plan.
codestringstringNãoMachine code.
messagestringstringNãoEnglish explanation.
pdf_urlstringstringNãoBrowser link that renders the plan as a PDF.
expires_atstringstringNãoWhen this result is deleted (RFC 3339).
401Unauthorized
unauthorizedkey_revokedkey_expiredunauthorizedMissing, malformed or unknown API key.key_revokedThe key was revoked.key_expiredThe key passed its expiry date.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish 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.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
404Not found
job_not_foundjob_not_foundNo job with this id in your organization.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
409Conflict
job_not_finishedjob_failedjob_canceledjob_not_finishedThe job is still queued or running.job_failedThe job failed; it has no result.job_canceledThe job was canceled; it has no result.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
410Gone
result_expiredresult_expiredThe result passed the retention window and was deleted.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
429Too many requests
rate_limitedrate_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.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
500Internal server error
internal_errorinternal_errorSomething failed on our side.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.
503Service unavailable
api_disabledapi_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
Todos os códigos de erroNomeTipoObrigatórioDescriçãoerrorErrorBodyobrigatórioErrorBodySimcodestringobrigatóriostringSimMachine code (snake_case). Branch on this, never on
message.messagestringobrigatóriostringSimEnglish explanation.
request_idstringobrigatóriostringSimSame as the X-Request-Id header. Quote it when contacting support.
detailsErrorDetail[]ErrorDetail[]NãoPer-field problems (
validation_failed).pathstringstringNãoJSON path of the offending field, e.g. items[3].length.
codestringstringNãorequired,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.messagestringstringNãoEnglish explanation.