---
title: Create / Update Travel
slug: create-update-travel
docTags: 
createdAt: 2026-10-08T08:29:29.588Z
---

{
  "id": "a9DE-u1_9S0zgGNCdYGQb",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://dev1.frontu.com//client/api/v2/travels",
    "servers": [
      {
        "url": "https://dev1.frontu.com//client/api/v2/travels"
      }
    ],
    "name": "Create / Update Travel",
    "description": "This endpoint allows to create or update travel information.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "task",
              "kind": "optional",
              "type": "string",
              "description": "GUID or systemId of Task"
            },
            {
              "name": "user",
              "kind": "optional",
              "type": "string",
              "description": "GUID or systemId of User"
            },
            {
              "name": "guid",
              "kind": "optional",
              "type": "string",
              "description": "Identifier from Frontu"
            },
            {
              "name": "deleted",
              "kind": "optional",
              "type": "string",
              "description": "<p>Mark if entity is archived (1) or active (0)</p>"
            },
            {
              "name": "started",
              "kind": "optional",
              "type": "string",
              "description": "Time when the travel started"
            },
            {
              "name": "ended",
              "kind": "optional",
              "type": "string",
              "description": "Time when the travel ended"
            },
            {
              "name": "startLongitude",
              "kind": "optional",
              "type": "string",
              "description": "Travel start longitude"
            },
            {
              "name": "startLatitude",
              "kind": "optional",
              "type": "string",
              "description": "Travel start latitude"
            },
            {
              "name": "endLongitude",
              "kind": "optional",
              "type": "string",
              "description": "Travel end longitude"
            },
            {
              "name": "endLatitude",
              "kind": "optional",
              "type": "string",
              "description": "Travel end latitude"
            },
            {
              "name": "vehicle",
              "kind": "optional",
              "type": "string",
              "description": "Vehicle guid"
            },
            {
              "name": "systemId",
              "kind": "optional",
              "type": "string",
              "description": "Identifier from external system"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Value: Bearer {access_token}</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "RrXIZRMXVDvyyeywqcYx5",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://dev1.frontu.com//client/api/v2/travels \\\n     --header 'accept: application/json'"
        },
        {
          "id": "KJK2AzrPK5ZtRDdgR381q",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://dev1.frontu.com//client/api/v2/travels\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "IBBXrhVXqb6-k2wh6BQfr",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://dev1.frontu.com//client/api/v2/travels\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "RdeVmJIgW1Lp9Iox8Wkai",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://dev1.frontu.com//client/api/v2/travels\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "RrXIZRMXVDvyyeywqcYx5"
    },
    "results": {
      "languages": [
        {
          "id": "5DHOw7XRe-RQzzUqrSQ8X",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "0k_P0jalfre9rgcKKZFUs",
          "language": "400",
          "code": "// Bad Request\n{}"
        }
      ],
      "selectedLanguageId": "5DHOw7XRe-RQzzUqrSQ8X"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}