Makes sense.
You will have to help me with this one since I am not familiar with what this API does, and the data that it can be sent is pretty complex.
Take a look at this: https://flightmapapi.docs.apiary.io/#reference/0/route-optimization-v2/request
If you click on the box that says request, it should show you a request on the right. Change the programming language dropdown to say RAW (preferable) or cURL (also works).
That will show you something like this sample payload:
{
"trip_duration_limit": 60,
"maxVisits": 2,
"speed": 60,
"detour": "1",
"visits": [
{
"id": "39037",
"customer_id": "Abc",
"load": 2,
"date": "2019-02-05",
"pickup": {
"duration": 5,
"start_time": 800,
"end_time": 1000,
"location": {
"lat": 30.718739,
"lng": 76.810573,
"address": "Sindhi's, Sector 28, Chandigarh, India"
}
},
"dropoff": {
"duration": 10,
"start_time": 900,
"end_time": 1100,
"location": {
"lat": 30.752535,
"lng": 76.8101038,
"address": "H. no 101, Sector 10, chandigarh, near post office"
}
},
"phone": "9955668855"
},
{
"id": "39038",
"customer_id": "Xzy",
"load": 1,
"date": "2019-02-05",
"pickup": {
"duration": 5,
"start_time": 900,
"end_time": 1100,
"location": {
"lat": 30.7466677,
"lng": 76.7942403,
"address": "Raunak, Sector 20, Panchkula, India"
}
},
"dropoff": {
"duration": 10,
"start_time": 1100,
"end_time": 1200,
"location": {
"lat": 30.7547789,
"lng": 76.7873895,
"address": "Flat 36, Sector 12, Chandigarh, near hospital"
}
},
"phone": "7856985685"
}
],
"fleets": [
{
"id": "78277",
"capacity": 10,
"start_location": {
"lat": 30.7188978,
"lng": 76.8102981,
"name": "CDCL, Madhya Marg, 28B, Sector 28B, Chandigarh, India"
},
"return_to_Start": false,
"end_location": {
"lat": 30.70549299999999,
"lng": 76.8012561,
"name": "Elante Mall, Purv Marg, Industrial Area Phase I, Chandigarh, India"
},
"shiftEnd": 2345
},
{
"id": "78278",
"capacity": 10,
"start_location": {
"lat": 30.7188978,
"lng": 76.8102981,
"name": "CDCL, Madhya Marg, 28B, Sector 28B, Chandigarh, India"
},
"return_to_Start": false,
"end_location": {
"lat": 30.70549299999999,
"lng": 76.8012561,
"name": "Elante Mall, Purv Marg, Industrial Area Phase I, Chandigarh, India"
},
"shiftEnd": 2345
}
]
}
That is showing what you could sent them.
Now if you look at the middle panel of the docs, you will see that each field has a description. The only field not marked optional is the Fleets array, so we have to build that our for sure. But do you know which of those fields is also required for your use case?