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

{
  "id": "fZtwaV0eGOWf6UUC15yiZ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://dev1.frontu.com//client/api/v2/routehistories",
    "servers": [
      {
        "url": "https://dev1.frontu.com//client/api/v2/routehistories"
      }
    ],
    "name": "Create / Update RouteHistory",
    "description": "This endpoint allows to create or update route history 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": "guid",
              "kind": "optional",
              "type": "string",
              "description": "<p>Identifier from Frontu(used only on update)</p>"
            },
            {
              "name": "deleted",
              "kind": "optional",
              "type": "string",
              "description": "<p>Mark if entity is archived (1) or active (0)</p>"
            },
            {
              "name": "duration",
              "kind": "optional",
              "type": "string",
              "description": "In seconds"
            },
            {
              "name": "distance",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Distance in meters",
              "format": "int32"
            },
            {
              "name": "price",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "In cents",
              "format": "int32"
            },
            {
              "name": "priceWithVat",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "In cents",
              "format": "int32"
            },
            {
              "name": "vat",
              "kind": "optional",
              "type": "number",
              "description": "Decimal number"
            },
            {
              "name": "systemId",
              "kind": "optional",
              "type": "string",
              "description": "Identifier from external system"
            },
            {
              "name": "task",
              "kind": "optional",
              "type": "string",
              "description": "GUID or systemId of a task"
            },
            {
              "name": "user",
              "kind": "optional",
              "type": "string",
              "description": "GUID or systemId of a user"
            }
          ],
          "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": "LBv1Bfa61DuQC6SdWMJGV",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://dev1.frontu.com//client/api/v2/routehistories \\\n     --header 'accept: application/json'"
        },
        {
          "id": "1FxNu0WlCO55277hjT5ET",
          "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/routehistories\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "TM9k1jU_ReQ96186TQpRF",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://dev1.frontu.com//client/api/v2/routehistories\")\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": "pTnCIxL_62huC_KM0z7oV",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://dev1.frontu.com//client/api/v2/routehistories\"\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": "LBv1Bfa61DuQC6SdWMJGV"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n{}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}