{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "https://github.com/route4me/json-schemas/blob/master/RouteParameters.dtd",
    "title": "Route Parameters",
    "type": "object",
    "properties": {
        "is_upload": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Is Upload",
            "description": "Let the R4M api know if this sdk request is coming from a file upload within your environment (for analytics)"
        },
        "rt": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Round Trip",
            "description": "The tour type of this route. rt is short for round trip, the optimization engine changes its behavior for round trip routes"
        },
        "disable_optimization": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Disable Optimization",
            "description": "By disabling optimization, the route optimization engine will not resequence the stops in your"
        },
        "route_name": {
            "type": [
                "string",
                "null"
            ],
            "title": "Route Name",
            "description": "The name of this route. this route name will be accessible in the search API, and also will be displayed on the mobile device of a user"
        },
        "route_date": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Route Date",
            "description": "The route start date in UTC, unix timestamp seconds. Used to show users when the route will begin, also used for reporting and analytics"
        },
        "route_time": {
            "type": "integer",
            "default": 0,
            "title": "Route Time",
            "description": "Time when the route starts (relative to route_date)\u00a0(Seconds). UTC timezone as well"
        },
        "shared_publicly": {
            "type": [
                "string",
                "null"
            ],
            "title": "Shared Publicly",
            "description": "Deprecated. Specify if the route can be viewed by unauthenticated users"
        },
        "optimize": {
            "type": [
                "string",
                "null"
            ],
            "enum": [
                "Distance",
                "Time",
                "timeWithTraffic"
            ],
            "title": "Optimize",
            "description": "The driving directions will be generated biased for this selection. This has no impact on route sequencing"
        },
        "lock_last": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Lock Last",
            "description": "A flag to indicate if the last stop in the route should be fixed"
        },
        "vehicle_capacity": {
            "type": [
                "string",
                "null"
            ],
            "title": "Vehicle Capacity",
            "description": "How much cargo can the vehicle carry\u00a0(units, e.g. cubic meters)"
        },
        "vehicle_max_cargo_weight": {
            "type": [
                "number",
                "null"
            ],
            "title": "Vehicle Maximum Cargo Weight",
            "description": "Max cargo weight a vehicle can cary"
        },
        "vehicle_max_cargo_volume": {
            "type": [
                "number",
                "null"
            ],
            "title": "Vehicle Maximum Cargo Volume",
            "description": "Max cargo volum a vehicle can cary"
        },
        "vehicle_max_distance_mi": {
            "type": [
                "string",
                "null"
            ],
            "title": "Vehicle Maximum Distance (mi)",
            "description": "Max distance for a single vehicle in this route\u00a0(always in miles)"
        },
        "subtour_max_revenue": {
            "type": [
                "string",
                "null"
            ],
            "title": "Subtour Max Revenue",
            "description": "Max allowed revenue from a subtour"
        },
        "distance_unit": {
            "type": [
                "string",
                "null"
            ],
            "title": "Distance Unit",
            "description": "The distance measurement unit for the route"
        },
        "travel_mode": {
            "type": [
                "string",
                "null"
            ],
            "enum": [
                "Driving",
                "Walking",
                "Trucking",
                "Cycling",
                "Transit"
            ],
            "title": "Travel Mode",
            "description": "The mode of travel that the directions should be optimized for"
        },
        "avoid": {
            "type": [
                "string",
                "null"
            ],
            "enum": [
                "Highways",
                "Tolls",
                "minimizeHighways",
                "minimizeTolls",
                ""
            ],
            "title": "Avoid",
            "description": "Options which let the user choose which road obstacles to avoid. This has no impact on route sequencing"
        },
        "avoidance_zones": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "title": "Avoidance Zones",
            "description": "Array of the Avoidance zones IDs"
        },
        "vehicle_id": {
            "type": [
                "string",
                "null"
            ],
            "title": "Vehicle ID",
            "description": "The unique internal id of a vehicle"
        },
        "driver_id": {
            "type": [
                "string",
                "null"
            ],
            "title": "Driver ID",
            "description": "The unique internal id of a driver"
        },
        "dev_lat": {
            "type": [
                "number",
                "null"
            ],
            "title": "Device Latitude",
            "description": "The latitude location of where a mobile device was located when it made a request to create the route."
        },
        "dev_lng": {
            "type": [
                "number",
                "null"
            ],
            "title": "Device Longitude",
            "description": "The longitude location of where a mobile device was located when it made a request to create the route"
        },
        "route_max_duration": {
            "type": "integer",
            "default": 86400,
            "title": "Route Maximum Duration",
            "description": "How many seconds a route can last at most. Default is 24 hours = 86400 seconds"
        },
        "route_email": {
            "type": [
                "string",
                "null"
            ],
            "title": "Route Email",
            "format": "email",
            "description": "Addresses where this route was shared after completion"
        },
        "route_type": {
            "type": [
                "string",
                "null"
            ],
            "title": "Route Type",
            "description": "Type of route being created: ENUM(api,null)"
        },
        "store_route": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Store Route",
            "description": "Always true"
        },
        "metric": {
            "type": "integer",
            "enum": [
                1,
                2,
                3,
                4,
                5
            ],
            "title": "Metric",
            "description": "1 = ROUTE4ME_METRIC_EUCLIDEAN, 2 = ROUTE4ME_METRIC_MANHATTAN, 3 = ROUTE4ME_METRIC_GEODESIC, 4 = ROUTE4ME_METRIC_MATRIX, 5 = ROUTE4ME_METRIC_EXACT_2D"
        },
        "algorithm_type": {
            "type": "integer",
            "enum": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                100,
                101
            ],
            "title": "Algorithm Type",
            "description": "The algorithm to be used: 1 = TSP, 2 = VRP, 3 = CVRP_TW_SD, 4 = CVRP_TW_MD, 5 = TSP_TW, 6 = TSP_TW_CR, 7 = BBCVRP, 100 = ALG_NONE, 101 = ALG_LEGACY_DISTRIBUTED"
        },
        "member_id": {
            "type": [
                "string",
                "null"
            ],
            "title": "Member ID",
            "description": "User ID who is assigned to the route"
        },
        "ip": {
            "type": [
                "string",
                "null"
            ],
            "title": "IP",
            "description": "IP Address in decimal form of user who created the route"
        },
        "dm": {
            "type": [
                "integer",
                "null"
            ],
            "title": "DM",
            "description": "Undocumented/not publicly shown"
        },
        "dirm": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Directions Method",
            "description": "Undocumented/not publicly shown"
        },
        "parts": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Parts",
            "description": "Legacy feature which permits a user to request an example number of optimized routes"
        },
        "device_id": {
            "type": [
                "string",
                "null"
            ],
            "title": "Device ID",
            "description": "32 Character MD5 String ID of the device that was used to plan this route"
        },
        "device_type": {
            "type": [
                "string",
                "null"
            ],
            "enum": [
                "web",
                "iphone",
                "ipad",
                "android_phone",
                "android_tablet"
            ],
            "title": "Device Type",
            "description": "The type of the device that is creating this route"
        },
        "first_drive_then_wait_between_stops": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "First Drive Then Wait Between Stops",
            "description": "First drive then wait between stops"
        },
        "has_trailer": {
            "type": [
                "boolean",
                "null"
            ],
            "title": "Has Trailer",
            "description": "if True vehicle has trailer"
        },
        "trailer_weight_t": {
            "type": [
                "number",
                "null"
            ],
            "title": "Trailer Weight (t)",
            "description": "If has_trailer = true, specifies the weight of the trailer\u00a0(required)"
        },
        "limited_weight_t": {
            "type": [
                "number",
                "null"
            ],
            "title": "Limited Weight (t)",
            "description": "If travel_mode = 'Trucking', specifies the truck weight\u00a0(required)"
        },
        "weight_per_axle_t": {
            "type": [
                "number",
                "null"
            ],
            "title": "Weight per Axle (t)",
            "description": "If travel_mode = 'Trucking', specifies the weight per axle\u00a0(required)"
        },
        "truck_height": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Truck Height",
            "description": "If travel_mode = 'Trucking', specifies the truck height\u00a0(required)"
        },
        "truck_width": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Truck Width",
            "description": "If travel_mode = 'Trucking', specifies the truck width\u00a0(required)"
        },
        "truck_length": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Truck Length",
            "description": "If travel_mode = 'Trucking', specifies the truck length\u00a0(required)"
        },
        "truck_hazardous_goods": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "title": "Truck Hazardous Goods",
            "description": "Array of the truck hazardous goods"
        },
        "min_tour_size": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Minimum Tour Size",
            "description": "Must be > 0; the minimum number of stops allowed in a subtour.\u00a0null\u00a0means there is no minimum"
        },
        "max_tour_size": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Maximum Tour Size",
            "description": "Must be > 0; the maximum number of stops allowed in a subtour.\u00a0null\u00a0means there is no maximum"
        },
        "optimization_quality": {
            "type": [
                "integer",
                "null"
            ],
            "title": "Optimization Quality",
            "description": "there are 3 types of optimization qualities that are optimizations goals (1 - Generate Optimized Routes As Quickly as Possible, 2 - Generate Routes That Look Better On A Map, 3 - Generate The Shortest And Quickest Possible Routes)"
        },
        "uturn": {
            "type": [
                "integer",
                "null"
            ],
            "title": "uturn",
            "description": "Available with:1 = UTURN_DEPART_SHORTEST (Allows U-turns), 2 = UTURN_DEPART_TO_RIGHT (Forbids U-turns), 3 = UTURN_DEPART_TO_LEFT (Deprecated)"
        },
        "leftturn": {
            "type": [
                "integer",
                "null"
            ],
            "title": "leftturn",
            "description": "Available with: 1 = LEFTTURN_ALLOW, 2 = LEFTTURN_FORBID, 3 = LEFTTURN_MULTIAPPROACH (assumes points are intersections and visits them from all sides. Ignores uturn and leftturn constraints.)"
        },
        "rightturn": {
            "type": [
                "integer",
                "null"
            ],
            "title": "rightturn",
            "description": "Available with: 1 = RIGHTTURN_ALLOW, 2 = RIGHTTURN_FORBID, 3 = RIGHTTURN_MULTIAPPROACH (assumes points are intersections and visits them from all sides. Ignores uturn and leftturn constraints.)"
        }
    }
}