I don't know what you're doing differently. When I pass in the following, it works correctly for me (the 2 orders get added to the route):
orders:
{
"displayFieldName": "POIs",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 3857,
"latestWkid": 3857
},
"features":[
{
"attributes":{
"Name":"POI1", "TimeWindowStart1": 1368784800000,
"TimeWindowEnd1": 1368828000000,
"ServiceTime":10
},
"geometry":{"x":738459,"y":6403815}
},
{
"attributes":{
"Name":"POI2",
"TimeWindowStart1": 1368784800000,
"TimeWindowEnd1": 1368828000000,
"ServiceTime":10
},
"geometry":{"x":738747,"y":6403143}
}
]
}
depots:
{
"displayFieldName": "Start- and Endpoint",
"geometryType": "esriGeometryPoint",
"spatialReference": {
"wkid": 3857,
"latestWkid": 3857
},
"features": [
{
"attributes":{
"Name":"myStartPoint"
},
"geometry":{"x":739213,"y":6403433}
},
{
"attributes":{
"Name":"myEndPoint"
},
"geometry":{"x":739213,"y":6403433}
}
]
}
routes:
{
"displayFieldName": "Route",
"features": [
{
"attributes":{
"Name":"myRoute", "StartDepotName":"myStartPoint", "EndDepotName":"myEndPoint",
"EarliestStartTime": 1368784800000,
"LatestStartTime": 1368784800000,
"MaxOrderCount": 30
}
}
],
"exceededTransferLimit": false
}
default date: 1368784800000
-----
output:
info from routes:
"features": [{
"attributes": {
"ObjectID": 1,
"Name": "myRoute",
"ViolatedConstraints": null,
"OrderCount": 2,
"TotalCost": 28.204576460644603,
"RegularTimeCost": 28.204576460644603,
"OvertimeCost": 0,
"DistanceCost": 0,
"TotalTime": 28.204576460644603,
"TotalOrderServiceTime": 20,
"TotalBreakServiceTime": 0,
"TotalTravelTime": 8.204576460644603,
"TotalDistance": 2.1846002201207435,
"StartTime": 1368784800000,
"EndTime": 1368786492275,
"TotalWaitTime": 0,
"TotalViolationTime": 0,
"RenewalCount": 0,
"TotalRenewalServiceTime": 0,
"Shape_Length": 0.03965315719801789
},
from out_stops:
"features": [
{"attributes": {
"ObjectID": 1,
"Name": "POI1",
"PickupQuantities": "",
"DeliveryQuantities": "",
"StopType": 0,
"RouteName": "myRoute",
"Sequence": 3,
"FromPrevTravelTime": 1.9393302872776985,
"FromPrevDistance": 0.4956385305662407,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1368785587343,
"DepartTime": 1368786187343,
"WaitTime": 0,
"ViolationTime": 0,
"ArriveTimeUTC": 1368778387343,
"DepartTimeUTC": 1368778987343
}},
{"attributes": {
"ObjectID": 2,
"Name": "POI2",
"PickupQuantities": "",
"DeliveryQuantities": "",
"StopType": 0,
"RouteName": "myRoute",
"Sequence": 2,
"FromPrevTravelTime": 1.1830458752810955,
"FromPrevDistance": 0.35046338018190065,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1368784870983,
"DepartTime": 1368785470983,
"WaitTime": 0,
"ViolationTime": 0,
"ArriveTimeUTC": 1368777670983,
"DepartTimeUTC": 1368778270983
}},
{"attributes": {
"ObjectID": 3,
"Name": "myStartPoint",
"PickupQuantities": "0.000000",
"DeliveryQuantities": "0.000000",
"StopType": 1,
"RouteName": "myRoute",
"Sequence": 1,
"FromPrevTravelTime": 0,
"FromPrevDistance": 0,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1368784800000,
"DepartTime": 1368784800000,
"WaitTime": 0,
"ViolationTime": 0,
"ArriveTimeUTC": 1368777600000,
"DepartTimeUTC": 1368777600000
}},
{"attributes": {
"ObjectID": 4,
"Name": "myEndPoint",
"PickupQuantities": "0.000000",
"DeliveryQuantities": "0.000000",
"StopType": 1,
"RouteName": "myRoute",
"Sequence": 4,
"FromPrevTravelTime": 5.082200298085809,
"FromPrevDistance": 1.338498309372602,
"ArriveCurbApproach": 0,
"DepartCurbApproach": 0,
"ArriveTime": 1368786492275,
"DepartTime": 1368786492275,
"WaitTime": 0,
"ViolationTime": 0,
"ArriveTimeUTC": 1368779292275,
"DepartTimeUTC": 1368779292275
}}
],
"exceededTransferLimit": false
}
}