Saltar para o conteúdo
CargoDuo logoCargoDuo
Preços
Entrar

Por enquanto, esta documentação está disponível só em inglês.

Create a project

Creates a project that opens in the app: a name, and optionally vehicles (saved vehicles by vehicle_id), items and groups in the /v1/pack shapes and the stored options.

POSThttps://runner.cargoduo.com/v1/projects

Pack it with POST /v1/projects/{id}/pack. Free: no credits are charged.

Autenticação

Chave de API Bearer com a permissãoresources:writeSaber mais

Parâmetros do corpo

application/json
NomeTipoObrigatórioDescrição
namestringobrigatório
string
Sim
≤ 255 chars
vehiclesProjectVehicle[]
ProjectVehicle[]
Não

Vehicle slots.

itemsItem[]
Item[]
Não

Cargo items (at most 500 definitions).

groupsGroup[]
Group[]
Não

Groups, with their loading order.

optionsProjectOptions
ProjectOptions
Não

The pack options a project stores.

Exemplo de pedido

curl -X POST "https://runner.cargoduo.com/v1/projects" \
  -H "Authorization: Bearer $CARGODUO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Order 1042",
    "vehicles": [
      {
        "vehicle_id": "standard-trailer-13-6m"
      }
    ],
    "items": [
      {
        "template_id": "tpl_42",
        "quantity": 18
      },
      {
        "template_id": "tpl_43",
        "quantity": 40
      }
    ]
  }'

Exemplo de resposta

201 · Project
{
  "id": "prj_3051",
  "object": "project",
  "name": "Order 1042",
  "status": "draft",
  "item_count": 58,
  "vehicle_count": 1,
  "app_url": "https://app.cargoduo.com/projects/3051",
  "created_by": {
    "id": "usr_7",
    "name": "Elif Kaya"
  },
  "updated_by": {
    "id": "usr_7",
    "name": "Elif Kaya"
  },
  "created_at": "2026-10-19T09:10:03Z",
  "updated_at": "2026-10-19T09:10:03Z",
  "options": {
    "packing_mode": "auto",
    "group_routing": "none",
    "allow_overweight": false
  },
  "vehicles": [
    {
      "id": "pv_5120",
      "vehicle_id": "standard-trailer-13-6m",
      "name": "Standard Trailer (13.6m)",
      "type": "trailer",
      "quantity": 1,
      "length": 1362,
      "width": 248,
      "height": 270,
      "max_weight": 24000
    }
  ],
  "items": [
    {
      "id": "item_88410",
      "label": "Euro pallet",
      "shape": "box",
      "length": 120,
      "width": 80,
      "height": 140,
      "weight": 450,
      "quantity": 18,
      "stackable": false,
      "rotation": "all",
      "color": "#3b82f6"
    },
    {
      "id": "item_88411",
      "label": "Carton A",
      "shape": "box",
      "length": 60,
      "width": 40,
      "height": 40,
      "weight": 12,
      "quantity": 40,
      "stackable": true,
      "rotation": "upright",
      "color": "#f59e0b"
    }
  ],
  "groups": [],
  "plan": null
}

Respostas

  • 201The new project.
    NomeTipoObrigatórioDescrição
    idstring
    string
    Não

    Project id (prj_…).

    objectstring
    string
    Não
    project
    namestring
    string
    Não
    statusstring
    string
    Não

    draft = never packed or inputs replaced; calculated = has a current plan; stale = a setting changed since the plan was made.

    draftcalculatedstaleerror
    item_countinteger
    integer
    Não

    Item units (sum of quantities).

    vehicle_countinteger
    integer
    Não

    Vehicles (sum of quantities).

    app_urlstring
    string
    Não

    Opens the project in the app's 3D editor.

    created_byUserRef | null
    UserRef | null
    Não

    The member who created it (for API calls: the member who created the key). null when unknown.

    updated_byUserRef | null
    UserRef | null
    Não

    The member who last changed it.

    created_atstring
    string
    Não

    RFC 3339.

    updated_atstring
    string
    Não

    RFC 3339.

    optionsProjectOptions
    ProjectOptions
    Não

    The pack options a project stores.

    vehiclesProjectVehicle[]
    ProjectVehicle[]
    Não
    itemsItem[]
    Item[]
    Não

    Cargo in the /v1/pack Item shape; ids are item_….

    groupsGroup[]
    Group[]
    Não
    planProjectPlan | null
    ProjectPlan | null
    Não

    The current plan; null when the project has none.

  • 400Bad requestinvalid_json
    • invalid_jsonThe body is not valid JSON or a field has the wrong type.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 401Unauthorizedunauthorizedkey_revokedkey_expired
    • unauthorizedMissing, malformed or unknown API key.
    • key_revokedThe key was revoked.
    • key_expiredThe key passed its expiry date.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 403Forbiddenplan_limit_reachedip_not_allowedsubscription_inactiveaccount_inactivescope_missing
    • plan_limit_reachedThe organization's plan allows no more projects or cargo items.
    • ip_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.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 413Payload too largepayload_too_large
    • payload_too_largeThe request body exceeds 10 MB.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 422Unprocessable entityvalidation_failed
    • validation_failedThe request is well-formed JSON but describes an invalid job. details[] lists every problem.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 429Too many requestsrate_limited
    • 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.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 500Internal server errorinternal_error
    • internal_errorSomething failed on our side.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro
  • 503Service unavailableapi_disabled
    • api_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
    NomeTipoObrigatórioDescrição
    errorErrorBodyobrigatório
    ErrorBody
    Sim
    Todos os códigos de erro