Skip to main content
PUT
/
deliveries
/
{id}
Replace a delivery
curl --request PUT \
  --url https://api.cula.tech/tracking/v1/deliveries/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Cula-Org-Id: <cula-org-id>' \
  --data '
{
  "config_id": "<string>",
  "legs": [
    {
      "sender_site": {
        "id": "ste_01kqzcjrpyf27tge6smsbnhkh5"
      },
      "receiver_site": {
        "id": "ste_01kqzcjrpyf27tge6smsbnhkh5"
      },
      "data_points": [
        {
          "config_id": "dpc_01kqzcjrpyf27tgey9d27c4edu",
          "input_value": {
            "value": 47079.76,
            "unit": "lbs"
          }
        }
      ],
      "selected_emission_log_config_id": "<string>"
    }
  ],
  "payload": [
    {
      "data_points": [
        {
          "config_id": "dpc_01kqzcjrpyf27tgey9d27c4edu",
          "input_value": {
            "value": 47079.76,
            "unit": "lbs"
          }
        }
      ]
    }
  ],
  "external_id": "<string>",
  "display_key": "<string>",
  "occurred_at": "2023-11-07T05:31:56Z",
  "data_points": [],
  "file_ids": []
}
'
{
  "id": "dlv_01kqzcjrpxf27tge48sdha1emj",
  "config_id": "dlc_01kqzcjrpyf27tgegxm6bxfdhb",
  "config_version_id": "dcv_01kqzcjrpyf27tgej0x1ke3msk",
  "site": {
    "id": "<string>",
    "external_id": "<string>"
  },
  "legs": [
    {
      "id": "leg_01kqzcjrpyf27tge5gameqfe75",
      "sender_site": {
        "id": "<string>",
        "external_id": "<string>"
      },
      "receiver_site": {
        "id": "<string>",
        "external_id": "<string>"
      },
      "data_points": [
        {
          "config_id": "dpc_01kqzcjrpyf27tgey9d27c4edu",
          "config_version_id": "dpv_01kqzcjrpyf27tgeyv9d27c4edu",
          "name": "Weight net",
          "input_value": {
            "value": 47079.76,
            "unit": "lbs"
          },
          "result_value": {
            "value": 21353.12,
            "unit": "kg"
          }
        }
      ],
      "selected_emission_log_config_id": "<string>"
    }
  ],
  "payload": [
    {
      "id": "mct_01kqzcjrpyf27tgenyy2stmy5z",
      "data_points": [
        {
          "config_id": "dpc_01kqzcjrpyf27tgey9d27c4edu",
          "config_version_id": "dpv_01kqzcjrpyf27tgeyv9d27c4edu",
          "name": "Weight net",
          "input_value": {
            "value": 47079.76,
            "unit": "lbs"
          },
          "result_value": {
            "value": 21353.12,
            "unit": "kg"
          }
        }
      ],
      "contents": [
        {
          "material": {
            "id": "mat_01kqzcjrpyf27tge9dnvsqv8t2"
          },
          "weight_in_kg": 21353.12
        }
      ]
    }
  ],
  "data_points": [
    {
      "config_id": "dpc_01kqzcjrpyf27tgey9d27c4edu",
      "config_version_id": "dpv_01kqzcjrpyf27tgeyv9d27c4edu",
      "name": "Weight net",
      "input_value": {
        "value": 47079.76,
        "unit": "lbs"
      },
      "result_value": {
        "value": 21353.12,
        "unit": "kg"
      }
    }
  ],
  "file_ids": [],
  "created_at": "2026-05-06T19:34:00Z",
  "updated_at": "2026-05-06T19:34:00Z",
  "external_id": "GC-DEL-N001016013",
  "display_key": "GC-DEL-N001016013",
  "occurred_at": "2026-05-01T20:42:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.cula.tech/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

OAuth2 client credentials flow. Exchange your client_id and client_secret for a short-lived access token, then pass it as a Bearer token in the Authorization header.

Headers

Cula-Org-Id
string
required

Organisation ID that scopes this request. The authenticated consumer must be authorized for this organisation. Omitting this header returns 400; passing an unauthorised org returns 403.

Path Parameters

id
string
required

Cula-assigned resource ID in TypeID format (e.g. stp_01kqzcjrpxf27tge33jwvjhkff). Alternatively, pass your external ID prefixed with ext- (e.g. ext-MY-STEP-001). The ext- prefix is unambiguous because TypeIDs use _ separators and never start with ext-.

Body

application/json

Request body for creating a delivery. The referenced config_id determines the delivery direction and owning site. Use occurred_at for the real-world delivery timestamp.

Validation:

  • For configs with direction: incoming, the last leg's receiver_site must equal the config's site.
  • For configs with direction: outgoing, the first leg's sender_site must equal the config's site.
config_id
string
required

Root delivery config ID. The server resolves to the active config version. Discover available configs via the config list endpoint.

legs
object[]
required

Transport segments. At least one leg is required. Each leg defines a sender → receiver pair with optional leg-level data points and transport emission log config.

Minimum array length: 1
payload
object[]
required

Payload containers. At least one required. Each container carries its own data points (e.g. weight gross, weight net, moisture). The server computes material contents from the data point values.

Minimum array length: 1
external_id
string

Partner-assigned identifier. Must be unique within resource type and organisation. Used for idempotency and ext- lookups.

display_key
string

Human-readable display identifier.

occurred_at
string<date-time>

When the delivery occurred in the real world. ISO-8601 with explicit UTC offset required. Defaults to the server timestamp (created_at) if omitted.

data_points
object[]

Delivery-level data points (e.g. driver name, lot ID, scale ticket).

file_ids
string[]

Complete set of file IDs to attach to this delivery when creating it or replacing it with PUT.

Response

Delivery replaced.

A delivery as returned in responses. Read the referenced delivery config to determine whether it is incoming or outgoing. The config's owning site is exposed as site.

id
string
required

Cula-assigned TypeID.

Example:

"dlv_01kqzcjrpxf27tge48sdha1emj"

config_id
string
required

Root delivery config ID. Determines the delivery's direction.

Example:

"dlc_01kqzcjrpyf27tgegxm6bxfdhb"

config_version_id
string
required
read-only

Resolved config version used at creation time.

Example:

"dcv_01kqzcjrpyf27tgej0x1ke3msk"

site
object
required

The site this delivery is recorded against. Derived from the referenced delivery config. For incoming deliveries this equals the last leg's receiver_site; for outgoing deliveries it equals the first leg's sender_site.

legs
object[]
required

Transport segments with resolved sender/receiver sites and data points.

payload
object[]
required

Payload containers with resolved data points and computed material contents.

data_points
object[]
required

Delivery-level resolved data points.

file_ids
string[]
required

IDs of files linked to this delivery.

Example:
[]
created_at
string<date-time>
required
read-only

When the record was created in Cula. See occurred_at for the real-world delivery time.

Example:

"2026-05-06T19:34:00Z"

updated_at
string<date-time>
required
read-only
Example:

"2026-05-06T19:34:00Z"

external_id
string | null

Partner-assigned external identifier.

Example:

"GC-DEL-N001016013"

display_key
string | null

Human-readable display identifier.

Example:

"GC-DEL-N001016013"

occurred_at
string<date-time> | null

When the delivery occurred in the real world (sent for outgoing deliveries, received for incoming deliveries). Distinct from created_at, which is the time the record was registered with Cula. Stored and returned in UTC.

Example:

"2026-05-01T20:42:00Z"