Skip to content
Developer docsAPI referenceTemplates

Update a template

Changes a template.

PATCHhttps://runner.cargoduo.com/v1/templates/{id}

Items already in projects keep their own copy. Free: no credits are charged.

Authentication

Bearer API key with scoperesources:writeLearn more

Path parameters

NameTypeRequiredDescription
idstringrequired
string
Yes

Template id (tpl_…).

Body parameters

application/json
NameTypeRequiredDescription
labelstring
string
No

Display label.

≤ 255 chars
shapestring
string
No

Item shape. cylinder and drum use radius + height instead of length + width; pallet and drum always stay upright.

boxcylinderpalletbagdrumDefault "box"
lengthnumber · cm
number · cm
No

Length. Required unless shape is cylinder or drum.

widthnumber · cm
number · cm
No

Width. Required unless shape is cylinder or drum.

heightnumber · cm
number · cm
No

Height (the vertical side when the item stands as defined).

radiusnumber · cm
number · cm
No

Radius. Required when shape is cylinder or drum.

weightnumber · kg
number · kg
No

Weight of ONE unit.

stackableboolean
boolean
No

Other items may be placed on top of this one.

Default true
max_stack_weightnumber · kg
number · kg
No

Maximum weight that may rest on one unit. 0 = unlimited.

Default 0
rotationstring
string
No

all = any of the six orientations; upright = may only turn around the vertical axis (this side up); fixed = never rotated.

alluprightfixedDefault "all"
hazardousboolean
boolean
No

Dangerous goods: kept low and separated from other hazardous items.

Default false
priorityinteger
integer
No

Load priority. Higher = loaded first and kept when space runs out. 0 = none.

Default 0
colorstring
string
No

Display colour as #rrggbb (viewer and PDF only).

nesting_heightnumber · cm
number · cm
No

Telescoping overlap when identical units stack (nested crates, buckets).

Default 0

Example request

curl -X PATCH "https://runner.cargoduo.com/v1/templates/tpl_42" \
  -H "Authorization: Bearer $CARGODUO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "weight": 480
  }'

Example response

200 OK · Template
{
  "id": "tpl_42",
  "object": "template",
  "label": "Euro pallet",
  "shape": "box",
  "length": 120,
  "width": 80,
  "height": 140,
  "radius": 0,
  "weight": 480,
  "stackable": false,
  "max_stack_weight": 0,
  "rotation": "all",
  "hazardous": false,
  "priority": 0,
  "color": "#3b82f6",
  "nesting_height": 0,
  "created_by": {
    "id": "usr_7",
    "name": "Elif Kaya"
  },
  "updated_by": {
    "id": "usr_7",
    "name": "Elif Kaya"
  },
  "created_at": "2026-09-28T14:05:52Z",
  "updated_at": "2026-10-19T09:12:03Z"
}

Responses

  • 200OKThe template after the change.
    NameTypeRequiredDescription
    idstring
    string
    No

    Template id (tpl_…).

    objectstring
    string
    No
    template
    labelstring
    string
    No

    Display label.

    shapestring
    string
    No

    Item shape. cylinder and drum use radius + height instead of length + width; pallet and drum always stay upright.

    boxcylinderpalletbagdrum
    lengthnumber · cm
    number · cm
    No

    Length. Required unless shape is cylinder or drum.

    widthnumber · cm
    number · cm
    No

    Width. Required unless shape is cylinder or drum.

    heightnumber · cm
    number · cm
    No

    Height (the vertical side when the item stands as defined).

    radiusnumber · cm
    number · cm
    No

    Radius. Required when shape is cylinder or drum.

    weightnumber · kg
    number · kg
    No

    Weight of ONE unit.

    stackableboolean
    boolean
    No

    Other items may be placed on top of this one.

    max_stack_weightnumber · kg
    number · kg
    No

    Maximum weight that may rest on one unit. 0 = unlimited.

    rotationstring
    string
    No

    all = any of the six orientations; upright = may only turn around the vertical axis (this side up); fixed = never rotated.

    alluprightfixed
    hazardousboolean
    boolean
    No

    Dangerous goods: kept low and separated from other hazardous items.

    priorityinteger
    integer
    No

    Load priority. Higher = loaded first and kept when space runs out. 0 = none.

    colorstring
    string
    No

    Display colour as #rrggbb (viewer and PDF only).

    nesting_heightnumber · cm
    number · cm
    No

    Telescoping overlap when identical units stack (nested crates, buckets).

    created_byUserRef | null
    UserRef | null
    No

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

    updated_byUserRef | null
    UserRef | null
    No

    The member who last changed it.

    created_atstring
    string
    No

    RFC 3339.

    updated_atstring
    string
    No

    RFC 3339.

  • 400Bad requestinvalid_json
    • invalid_jsonThe body is not valid JSON or a field has the wrong type.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 401Unauthorizedunauthorizedkey_revokedkey_expired
    • unauthorizedMissing, malformed or unknown API key.
    • key_revokedThe key was revoked.
    • key_expiredThe key passed its expiry date.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 403Forbiddenip_not_allowedsubscription_inactiveaccount_inactivescope_missing
    • 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.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 404Not foundtemplate_not_found
    • template_not_foundNo template with this id in your organization.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 422Unprocessable entityvalidation_failed
    • validation_failedThe request is well-formed JSON but describes an invalid job. details[] lists every problem.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 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.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 500Internal server errorinternal_error
    • internal_errorSomething failed on our side.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes
  • 503Service unavailableapi_disabled
    • api_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
    NameTypeRequiredDescription
    errorErrorBodyrequired
    ErrorBody
    Yes
    All error codes