Creates a new traject for the currently logged in user. Only a dispatcher can call this method.

Request Information

Parameters

NameDescriptionAdditional information
model A model that describes the traject (see examples below)

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "Name": "Brugge - Oostende",
  "StartDate": "2025-12-06T20:06:53.3434629+01:00",
  "Description": "Traject van brugge naar Oostende",
  "CustomFields": null
}

application/xml, text/xml

Sample:
<TrajectRest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>Brugge - Oostende</Name>
  <StartDate>2025-12-06T20:06:53.3434629+01:00</StartDate>
  <Description>Traject van brugge naar Oostende</Description>
</TrajectRest>

Response Information

Returns: The new traject with it's id and REST URI

Response body formats

application/json, text/json

Sample:
{
  "Uri": "/trajects/1",
  "Id": 1,
  "DispatcherId": 5,
  "TransporterId": 3,
  "State": 1,
  "Name": "Brugge - Oostende",
  "StartDate": "2025-12-06T20:06:53.3434629+01:00",
  "Description": "Traject van brugge naar Oostende",
  "CustomFields": null
}

application/xml, text/xml

Sample:
<TrajectRestGet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Name>Brugge - Oostende</Name>
  <StartDate>2025-12-06T20:06:53.3434629+01:00</StartDate>
  <Description>Traject van brugge naar Oostende</Description>
  <Uri>/trajects/1</Uri>
  <Id>1</Id>
  <DispatcherId>5</DispatcherId>
  <TransporterId>3</TransporterId>
  <State>EditMode</State>
</TrajectRestGet>