Skip to main content
POST
/
v1
/
transport
/
lane
Create a transport lane
curl --request POST \
  --url https://app.variable.global/api/v1/transport/lane \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Name",
  "created": "2021-01-01T00:00:00.000Z",
  "updated": "2021-01-31T23:59:59.000Z",
  "syncId": "sync123",
  "taxonomy": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Material",
    "path": "material"
  },
  "legs": [
    {
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "order": 1,
      "mode": "truck",
      "origin": {
        "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
        "name": "Newark, NJ, USA",
        "countryCode": "US",
        "latitude": 40.7357,
        "longitude": -74.1724
      },
      "destination": {
        "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
        "name": "Newark, NJ, USA",
        "countryCode": "US",
        "latitude": 40.7357,
        "longitude": -74.1724
      },
      "distance": {
        "quantity": 18.4,
        "unit": "kg"
      }
    }
  ]
}
'
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "Name",
  "created": "2021-01-01T00:00:00.000Z",
  "updated": "2021-01-31T23:59:59.000Z",
  "syncId": "sync123",
  "totalKm": 6042.3,
  "taxonomy": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Material",
    "path": "material"
  },
  "CO2ePerTkm": "0.0412",
  "legs": [
    {
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "order": 1,
      "mode": "truck",
      "origin": {
        "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
        "name": "Newark, NJ, USA",
        "countryCode": "US",
        "latitude": 40.7357,
        "longitude": -74.1724
      },
      "destination": {
        "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
        "name": "Newark, NJ, USA",
        "countryCode": "US",
        "latitude": 40.7357,
        "longitude": -74.1724
      },
      "distance": {
        "quantity": 18.4,
        "unit": "kg"
      },
      "CO2ePerTkm": "0.1083"
    }
  ]
}
Requires permission:

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

A freight route of one or more ordered legs, sent inline (there is no standalone leg endpoint). name is synthesized from the first leg's origin and the last leg's destination when not set.

uuid
string<uuid>
name
string
Example:

"Name"

created
string

ISO 8601 date

Example:

"2021-01-01T00:00:00.000Z"

updated
string

ISO 8601 date

Example:

"2021-01-31T23:59:59.000Z"

syncId
string

An identifier to use when syncing data with other systems. Read more

Example:

"sync123"

taxonomy
object

A reference to a taxonomy category, including its machine-readable path.

legs
object[]

Response

The created transport lane

A freight route of one or more ordered legs, sent inline (there is no standalone leg endpoint). name is synthesized from the first leg's origin and the last leg's destination when not set.

uuid
string<uuid>
name
string
Example:

"Name"

created
string

ISO 8601 date

Example:

"2021-01-01T00:00:00.000Z"

updated
string

ISO 8601 date

Example:

"2021-01-31T23:59:59.000Z"

syncId
string

An identifier to use when syncing data with other systems. Read more

Example:

"sync123"

totalKm
number
read-only
Example:

6042.3

taxonomy
object

A reference to a taxonomy category, including its machine-readable path.

CO2ePerTkm
string
read-only

Carbon intensity in kg CO2e per tonne-kilometre, not an absolute total — the total only materialises once cargo weight is applied via a transport instance on an activity or input. "0" when genuinely zero, absent when unknown.

Example:

"0.0412"

legs
object[]