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-03-30T03:10:49.4437796Z",
  "StopTime": "2024-03-30T04:10:49.4437796Z",
  "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": "d8847c26-6cdf-44f0-b02b-13a79cb7c50a"
    },
    {
      "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"
}