POST api/Route/Add

Add a route with stops to your Team Road Warrior account

Request Information

URI Parameters

None.

Body Parameters

AddRouteModel
NameDescriptionTypeAdditional information
Name

Display name of route

string

Required

String length: inclusive between 1 and 100

StartTime

Specifies the start time for the route

date

None.

StopTime

Specifies the stop time for the route

date

None.

HardStart

Specifies if the route has a specific start time

boolean

Required

HardStop

Specifies if the route has a specific end time

boolean

Required

Stops

List of stops on the route

Collection of AddStopModel

Required

OptType

Set what optimization mode to use for the route (default = fastest)

OptTypeEnum

None.

Note

Note to be displayed for the route

string

None.

TravelMode

Set what transportation mode to use for the route (default = driving)

TravelModeEnum

None.

Driver

Specifies which (if any) driver is assigned to the route

string

None.

IsRoundTrip

Specifies if the route is round trip

boolean

None.

StartLocation

Specifies the start location for the route

LatLng

None.

Request Formats

application/json, text/json
Sample:
{
  "Name": "A New Route",
  "StartTime": "2024-10-29T02:22:53.3236841Z",
  "StopTime": "2024-10-29T03:22:53.3236841Z",
  "HardStart": true,
  "HardStop": false,
  "Stops": [
    {
      "Name": "My new location",
      "Address": "123 Main Street, New York",
      "Lat": 33.274,
      "Lng": 33.927,
      "ServiceTime": 5,
      "Note": "A note goes here",
      "Email": "me@email.com",
      "Phone": "555-555-5555",
      "ScheduleId": "a88afef2-d402-4fc5-9388-ae1f228a1f25"
    },
    {
      "Name": "Another new location",
      "Address": "1025 31st Street, New York",
      "Lat": 33.323,
      "Lng": 33.672,
      "ServiceTime": 5,
      "Note": "A note goes here",
      "Email": "someone@email.com",
      "Phone": "555-555-4444",
      "ScheduleId": null
    }
  ],
  "OptType": 2,
  "Note": "Test Note",
  "TravelMode": 0,
  "Driver": "driver@domain",
  "IsRoundTrip": false,
  "StartLocation": null
}

Response Information

Resource Description

AddRouteResponseModel
NameDescriptionTypeAdditional information
StopsAdded

Number of favorites successfully added

integer

None.

IsSuccess

Did the operation succeed or not

boolean

None.

ErrorMessage

If there was an error, contains description of the error

string

None.

Response Formats

application/json, text/json
Sample:
{
  "StopsAdded": 1,
  "IsSuccess": true,
  "ErrorMessage": "sample string 3"
}