Skip to main content
POST
/
logistics
/
routes
Create a route
curl --request POST \
  --url https://api.maalbar.dk/logistics/routes \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "fromTransportLocation": {
    "publicId": "trl_xxxxxxxxxxxx"
  },
  "toTransportLocation": {
    "publicId": "trl_xxxxxxxxxxxx"
  },
  "transportRouteLegs": [
    {
      "distance": 123,
      "emptyReturnFactor": 0,
      "isCargoLoadedOnPallets": true,
      "method": {
        "publicId": "trn_xxxxxxxxxxxx"
      },
      "order": 123,
      "note": "<string>"
    }
  ]
}
'
{
  "publicId": "trr_xxxxxxxxxxxx",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "fromTransportLocation": {
    "publicId": "trl_xxxxxxxxxxxx"
  },
  "toTransportLocation": {
    "publicId": "trl_xxxxxxxxxxxx"
  }
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
fromTransportLocation
object
required
toTransportLocation
object
required
transportRouteLegs
object[]
required

Response

Successful response

publicId
string
required
Required string length: 16
Example:

"trr_xxxxxxxxxxxx"

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
fromTransportLocation
object
required
toTransportLocation
object
required