Skip to main content

Route

info

This API provide feature to manage the route

All APIs endpoints

[POST] /route

[PUT] /route/:id

[DELETE] /route/:id

[GET] /route/:id

[GET] /routes

[POST] /routes/assign/:id

[POST] /routes/unassign/:id

[PUT] /routes/start/:id

[PUT] /routes/end/:id

Create a route

Create new route

Parameters

name: required

  • Type: string
  • Description: name of route

scheduled_date: required

  • Type: string
  • Description: schedule route

origin: required

  • Type: object
  • Description: address the beginning of the route

destination: required

  • Type: object
  • Description: address end of the route

color: required

  • Type: string
  • Description: hex color

agent_id: required

  • Type: string
  • Description: agent identify

routes: required

  • Type: string[]
  • Description: route poline

ticket_ids: optional

  • Type: string[]
  • Description: list ticket identify

label_ids: optional

  • Type: string[]
  • Description: list ticket identify

Request

curl --location --request DELETE 'https://api-v1-stg.lumyri.com/routes' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}' \
--data-raw `{
"name": "Route for test",
"scheduled_date": "2023-03-01",
"origin": {
"geo": [
46.76318210483648,
-71.28298290491814
],
"name": "Route de l'Église, Saint-Louis-de-France, Saint-Louis, Sainte-Foy–Sillery–Cap-Rouge, Quebec, Québec (Agglomération), Capitale-Nationale, G1W 3P3, Canada"
},
"destination": {
"geo": [
46.8087024,
-71.2857737
],
"name": "Rue Pépin, Domaine-Saint-Charles, Duberger–Les Saules, Les Rivières, Quebec, Québec (Agglomération), Capitale-Nationale, G1M 1P2, Canada"
},
"color": "#D35CC0",
"agent_id": "AGENT_IDENTIFY",
"ticket_ids": [],
"label_ids": [
"d8aba21a-8558-4606-815a-337cb8dd23b0"
],
"routes": "{\"distance\":7571.4,\"duration\":604.8,\"legs\":[{\"steps\":[{\"intersections\":[{\"out\":0,\"entry\":[true],\"bearings\":[318],\"location\":[-71.282983,46.763182]},{\"out\":2,\"location\":[-71.283559,46.763637],\"bearings\":[135,240,315],\"entry\":[false,true,true],\"in\":0},{\"out\":3,\"location\":[-71.286424,46.765514],\"bearings\":[45,120,240,300],\"entry\":[true,false,true,true],\"in\":1},{\"out\":2,\"location\":[-71.287508,46.76615],\"bearings\":[135,210,315],\"entry\":[false,true,true],\"in\":0},{\"out\":3,\"location\":[-71.287687,46.76628],\"bearings\":[45,135,225,315],\"entry\":[true,false,true,true],\"in\":1}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.282983,46.763182],[-71.283132,46.763295],[-71.283559,46.763637],[-71.284979,46.764875],[-71.285209,46.76503],[-71.285483,46.76518],[-71.286424,46.765514],[-71.286803,46.765669],[-71.287083,46.765846],[-71.287346,46.766027],[-71.287508,46.76615],[-71.287687,46.76628],[-71.287985,46.766493],[-71.288093,46.766574],[-71.288198,46.766649],[-71.28834,46.766747],[-71.288476,46.766835],[-71.288531,46.766871],[-71.288696,46.766971]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":60.6,\"maneuver\":{\"bearing_after\":318,\"location\":[-71.282983,46.763182],\"bearing_before\":0,\"type\":\"depart\"},\"weight\":115.5,\"distance\":612.3,\"name\":\"Route de l'Église\"},{\"intersections\":[{\"out\":0,\"location\":[-71.288696,46.766971],\"bearings\":[60,135,240,315],\"entry\":[true,false,false,true],\"in\":1},{\"lanes\":[{\"valid\":false,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"right\"]}],\"out\":0,\"location\":[-71.286165,46.768272],\"bearings\":[60,120,240,315],\"entry\":[true,true,false,true],\"in\":2},{\"lanes\":[{\"valid\":false,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"right\"]}],\"out\":0,\"location\":[-71.2818,46.770515],\"bearings\":[60,135,240,330],\"entry\":[true,true,false,true],\"in\":2},{\"lanes\":[{\"valid\":false,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":true,\"indications\":[\"straight\"]}],\"out\":0,\"location\":[-71.280273,46.771298],\"bearings\":[60,240,315],\"entry\":[true,false,true],\"in\":1},{\"lanes\":[{\"valid\":false,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":true,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"right\"]}],\"out\":0,\"location\":[-71.278604,46.772145],\"bearings\":[60,135,240,330],\"entry\":[true,true,false,true],\"in\":2}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.288696,46.766971],[-71.28832,46.767165],[-71.288209,46.76722],[-71.28802,46.767317],[-71.287843,46.767407],[-71.287633,46.767515],[-71.287298,46.767688],[-71.286752,46.76797],[-71.286594,46.768052],[-71.286165,46.768272],[-71.284726,46.769007],[-71.283692,46.76954],[-71.283632,46.769571],[-71.283146,46.769822],[-71.28258,46.770113],[-71.282385,46.770214],[-71.281838,46.770496],[-71.2818,46.770515],[-71.281146,46.770851],[-71.280273,46.771298],[-71.279998,46.771438],[-71.279535,46.771673],[-71.278604,46.772145],[-71.278339,46.772281],[-71.277997,46.772457],[-71.277742,46.772588],[-71.27754,46.772693],[-71.277438,46.772745],[-71.277095,46.772922],[-71.276987,46.772977],[-71.276601,46.773176],[-71.275515,46.773735],[-71.275393,46.773798]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":125.9,\"maneuver\":{\"bearing_after\":52,\"type\":\"turn\",\"modifier\":\"right\",\"bearing_before\":310,\"location\":[-71.288696,46.766971]},\"ref\":\"175\",\"weight\":125.9,\"distance\":1266.4,\"name\":\"Boulevard Laurier\"},{\"intersections\":[{\"lanes\":[{\"valid\":true,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"left\"]},{\"valid\":false,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"right\"]}],\"out\":0,\"location\":[-71.275393,46.773798],\"bearings\":[60,150,240,330],\"entry\":[true,true,false,false],\"in\":2},{\"lanes\":[{\"valid\":true,\"indications\":[\"left\"]},{\"valid\":true,\"indications\":[\"left\"]},{\"valid\":false,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"straight\"]},{\"valid\":false,\"indications\":[\"right\"]}],\"out\":3,\"location\":[-71.275233,46.773874],\"bearings\":[60,150,240,330],\"entry\":[true,false,false,true],\"in\":2},{\"out\":3,\"location\":[-71.275379,46.774005],\"bearings\":[60,150,240,315],\"entry\":[false,false,true,true],\"in\":1},{\"out\":2,\"location\":[-71.277852,46.776192],\"bearings\":[135,225,315],\"entry\":[false,false,true],\"in\":0},{\"out\":2,\"location\":[-71.277943,46.776269],\"bearings\":[135,240,330],\"entry\":[false,true,true],\"in\":0},{\"out\":2,\"location\":[-71.279654,46.777885],\"bearings\":[135,150,315],\"entry\":[false,false,true],\"in\":1},{\"classes\":[\"motorway\"],\"out\":3,\"location\":[-71.280872,46.778921],\"bearings\":[45,135,270,315],\"entry\":[true,false,false,true],\"in\":1},{\"classes\":[\"motorway\"],\"out\":1,\"location\":[-71.280966,46.778998],\"bearings\":[135,315,330],\"entry\":[false,true,true],\"in\":0},{\"classes\":[\"motorway\"],\"out\":2,\"location\":[-71.282628,46.780353],\"bearings\":[136,140,319],\"entry\":[false,false,true],\"in\":1},{\"classes\":[\"motorway\"],\"out\":1,\"location\":[-71.283389,46.780956],\"bearings\":[135,315,330],\"entry\":[false,true,true],\"in\":0},{\"classes\":[\"tunnel\",\"motorway\"],\"out\":1,\"location\":[-71.285629,46.782778],\"bearings\":[135,315],\"entry\":[false,true],\"in\":0},{\"classes\":[\"motorway\"],\"out\":1,\"location\":[-71.287437,46.784555],\"bearings\":[150,330],\"entry\":[false,true],\"in\":0},{\"classes\":[\"motorway\"],\"out\":2,\"location\":[-71.289959,46.786893],\"bearings\":[133,138,321],\"entry\":[false,false,true],\"in\":1},{\"classes\":[\"motorway\"],\"out\":0,\"location\":[-71.289095,46.791477],\"bearings\":[25,30,210],\"entry\":[true,true,false],\"in\":2},{\"classes\":[\"motorway\"],\"out\":0,\"location\":[-71.288091,46.794647],\"bearings\":[15,180,195],\"entry\":[true,false,false],\"in\":1},{\"classes\":[\"motorway\"],\"lanes\":[{\"valid\":true,\"indications\":[\"none\"]},{\"valid\":true,\"indications\":[\"none\"]},{\"valid\":true,\"indications\":[\"none\"]},{\"valid\":false,\"indications\":[\"slight right\"]}],\"out\":0,\"location\":[-71.287442,46.796587],\"bearings\":[15,30,210],\"entry\":[true,true,false],\"in\":2},{\"classes\":[\"motorway\"],\"out\":2,\"location\":[-71.285916,46.800541],\"bearings\":[150,180,345],\"entry\":[false,false,true],\"in\":1},{\"classes\":[\"motorway\"],\"out\":0,\"location\":[-71.289887,46.80681],\"bearings\":[0,15,180],\"entry\":[true,true,false],\"in\":2},{\"classes\":[\"motorway\"],\"out\":0,\"location\":[-71.289307,46.809696],\"bearings\":[0,165,195],\"entry\":[true,false,false],\"in\":2}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.275393,46.773798],[-71.275233,46.773874],[-71.275305,46.773939],[-71.275379,46.774005],[-71.275483,46.774098],[-71.276876,46.775329],[-71.276967,46.775409],[-71.277023,46.775459],[-71.27732,46.775721],[-71.277852,46.776192],[-71.277943,46.776269],[-71.279654,46.777885],[-71.279979,46.778161],[-71.280872,46.778921],[-71.280966,46.778998],[-71.282628,46.780353],[-71.283389,46.780956],[-71.285629,46.782778],[-71.28637,46.783373],[-71.286619,46.783593],[-71.286825,46.783797],[-71.286949,46.783942],[-71.287437,46.784555],[-71.287836,46.785046],[-71.288364,46.785664],[-71.288693,46.785946],[-71.289959,46.786893],[-71.290098,46.787012],[-71.290301,46.787166],[-71.290459,46.787327],[-71.2906,46.787486],[-71.290742,46.787673],[-71.290841,46.787829],[-71.29092,46.787982],[-71.29104,46.78832],[-71.291069,46.788533],[-71.291093,46.788715],[-71.291089,46.789013],[-71.291013,46.789345],[-71.290919,46.789567],[-71.290805,46.789771],[-71.290518,46.790126],[-71.290345,46.790302],[-71.290175,46.790448],[-71.2901,46.790523],[-71.289499,46.791056],[-71.289355,46.791202],[-71.28916,46.791401],[-71.289095,46.791477],[-71.288841,46.791842],[-71.288656,46.792203],[-71.288596,46.792355],[-71.288522,46.79257],[-71.288379,46.793312],[-71.288091,46.794647],[-71.287956,46.795292],[-71.287895,46.795526],[-71.28782,46.795798],[-71.287702,46.796118],[-71.287596,46.796365],[-71.287442,46.796587],[-71.287316,46.79681],[-71.287184,46.797009],[-71.286985,46.797262],[-71.286784,46.797504],[-71.286439,46.797947],[-71.286268,46.79818],[-71.286119,46.798422],[-71.28599,46.798717],[-71.285912,46.798973],[-71.285838,46.79927],[-71.2858,46.799513],[-71.285802,46.799757],[-71.285805,46.799942],[-71.285861,46.800319],[-71.285894,46.800457],[-71.285916,46.800541],[-71.285933,46.800604],[-71.28596,46.800694],[-71.286053,46.800912],[-71.286118,46.801057],[-71.286209,46.801199],[-71.286282,46.801317],[-71.286351,46.801408],[-71.286512,46.801585],[-71.286817,46.80193],[-71.287054,46.802136],[-71.287392,46.8024],[-71.287828,46.802687],[-71.28835,46.803085],[-71.288734,46.803376],[-71.289004,46.803616],[-71.289201,46.803814],[-71.289341,46.80398],[-71.289506,46.804207],[-71.289637,46.804441],[-71.289741,46.804649],[-71.28985,46.8049],[-71.289919,46.805095],[-71.289958,46.805226],[-71.28999,46.805401],[-71.290005,46.805599],[-71.290007,46.80585],[-71.28998,46.806164],[-71.289887,46.80681],[-71.28979,46.807399],[-71.289729,46.807747],[-71.289528,46.808702],[-71.289307,46.809696],[-71.289215,46.810239],[-71.288963,46.811553]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":306.5,\"maneuver\":{\"bearing_after\":54,\"type\":\"turn\",\"modifier\":\"left\",\"bearing_before\":52,\"location\":[-71.275393,46.773798]},\"weight\":306.5,\"distance\":4804.3,\"name\":\"Autoroute Robert-Bourassa\"},{\"intersections\":[{\"classes\":[\"motorway\"],\"lanes\":[{\"valid\":false,\"indications\":[\"none\"]},{\"valid\":false,\"indications\":[\"none\"]},{\"valid\":false,\"indications\":[\"none\"]},{\"valid\":true,\"indications\":[\"slight right\"]}],\"out\":1,\"location\":[-71.288963,46.811553],\"bearings\":[8,17,187],\"entry\":[true,true,false],\"in\":2}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.288963,46.811553],[-71.288596,46.812358],[-71.288473,46.81257],[-71.288358,46.812713],[-71.288237,46.812838],[-71.288072,46.812968],[-71.287893,46.81306],[-71.287741,46.813112],[-71.28754,46.813132],[-71.287388,46.813127],[-71.287259,46.813097],[-71.286436,46.812797],[-71.286228,46.812756]],\"type\":\"LineString\"},\"mode\":\"driving\",\"destinations\":\"Boulevard Père-Lelièvre\",\"duration\":29.2,\"maneuver\":{\"bearing_after\":16,\"type\":\"off ramp\",\"modifier\":\"slight right\",\"bearing_before\":7,\"location\":[-71.288963,46.811553]},\"weight\":29.2,\"distance\":328,\"name\":\"\"},{\"intersections\":[{\"out\":1,\"location\":[-71.286228,46.812756],\"bearings\":[30,210,285,315],\"entry\":[true,true,false,true],\"in\":2},{\"out\":2,\"location\":[-71.286696,46.812061],\"bearings\":[30,120,210],\"entry\":[false,true,true],\"in\":0}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.286228,46.812756],[-71.286696,46.812061],[-71.287332,46.811118],[-71.287457,46.810983]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":34.8,\"maneuver\":{\"bearing_after\":203,\"type\":\"turn\",\"modifier\":\"right\",\"bearing_before\":105,\"location\":[-71.286228,46.812756]},\"weight\":34.8,\"distance\":218.4,\"name\":\"Rue De Brugnon\"},{\"intersections\":[{\"out\":2,\"location\":[-71.287457,46.810983],\"bearings\":[30,135,225,300],\"entry\":[false,false,true,true],\"in\":0},{\"out\":1,\"location\":[-71.28756,46.810894],\"bearings\":[45,135,300],\"entry\":[false,true,false],\"in\":0}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.287457,46.810983],[-71.28756,46.810894],[-71.287375,46.810795],[-71.287252,46.81072],[-71.287107,46.810628],[-71.28693,46.8105],[-71.286667,46.810274],[-71.286259,46.809938],[-71.286071,46.809789],[-71.285919,46.809672],[-71.285699,46.809523],[-71.285548,46.80944],[-71.285347,46.809396]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":34.9,\"maneuver\":{\"bearing_after\":217,\"type\":\"end of road\",\"modifier\":\"left\",\"bearing_before\":212,\"location\":[-71.287457,46.810983]},\"weight\":34.9,\"distance\":252.1,\"name\":\"Boulevard Père-Lelièvre\"},{\"intersections\":[{\"out\":1,\"location\":[-71.285347,46.809396],\"bearings\":[120,210,315],\"entry\":[true,true,true],\"in\":2}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.285347,46.809396],[-71.285535,46.809226],[-71.285776,46.808959],[-71.285822,46.808891],[-71.285846,46.808835],[-71.285846,46.808802],[-71.28583,46.80875],[-71.285774,46.808702]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":12.9,\"maneuver\":{\"bearing_after\":216,\"type\":\"turn\",\"modifier\":\"right\",\"bearing_before\":127,\"location\":[-71.285347,46.809396]},\"weight\":12.9,\"distance\":89.9,\"name\":\"Rue Pépin\"},{\"intersections\":[{\"in\":0,\"entry\":[true],\"bearings\":[321],\"location\":[-71.285774,46.808702]}],\"driving_side\":\"right\",\"geometry\":{\"coordinates\":[[-71.285774,46.808702],[-71.285774,46.808702]],\"type\":\"LineString\"},\"mode\":\"driving\",\"duration\":0,\"maneuver\":{\"bearing_after\":0,\"location\":[-71.285774,46.808702],\"bearing_before\":141,\"type\":\"arrive\"},\"weight\":0,\"distance\":0,\"name\":\"Rue Pépin\"}],\"distance\":7571.4,\"duration\":604.8,\"summary\":\"Boulevard Laurier, Autoroute Robert-Bourassa\",\"weight\":659.7}]}"
}`

Response

{
"error": null,
"data": {
"message": "OK"
}
}

Update route

Update route by id

Parameters

name: required

  • Type: string
  • Description: name of route

scheduled_date: required

  • Type: string
  • Description: schedule route

origin: required

  • Type: object
  • Description: address the beginning of the route

destination: required

  • Type: object
  • Description: address end of the route

color: required

  • Type: string
  • Description: hex color

agent_id: required

  • Type: string
  • Description: agent identify

routes: required

  • Type: string[]
  • Description: route poline

ticket_ids: optional

  • Type: string[]
  • Description: list ticket identify

label_ids: optional

  • Type: string[]
  • Description: list ticket identify

Request

curl --location --request DELETE 'https://api-v1-stg.lumyri.com/routes' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}'\
--data-raw `{
"name": "Route test updated",
"scheduled_date": "2023-03-01",
"origin": {
"geo": [
46.76318210483648,
-71.28298290491814
],
"name": "Route de l'Église, Saint-Louis-de-France, Saint-Louis, Sainte-Foy–Sillery–Cap-Rouge, Quebec, Québec (Agglomération), Capitale-Nationale, G1W 3P3, Canada"
},
"destination": {
"geo": [
46.8087024,
-71.2857737
],
"name": "Rue Pépin, Domaine-Saint-Charles, Duberger–Les Saules, Les Rivières, Quebec, Québec (Agglomération), Capitale-Nationale, G1M 1P2, Canada"
},
"color": "#D35CC0",
"agent_id": "AGENT_IDENTIFY",
"ticket_ids": [
"87b107d0-8004-494d-9a10-3748f8606c2f"
],
"label_ids": [
"d8aba21a-8558-4606-815a-337cb8dd23b0"
],
"routes": "{"distance":8580,"duration":767.9,"legs":[{"steps":[{"intersections":[{"out":0,"entry":[true],"bearings":[318],"location":[-71.282983,46.763182]},{"out":2,"location":[-71.283559,46.763637],"bearings":[135,240,315],"entry":[false,true,true],"in":0},{"out":3,"location":[-71.286424,46.765514],"bearings":[45,120,240,300],"entry":[true,false,true,true],"in":1},{"out":2,"location":[-71.287508,46.76615],"bearings":[135,210,315],"entry":[false,true,true],"in":0},{"out":3,"location":[-71.287687,46.76628],"bearings":[45,135,225,315],"entry":[true,false,true,true],"in":1}],"driving_side":"right","geometry":{"coordinates":[[-71.282983,46.763182],[-71.283132,46.763295],[-71.283559,46.763637],[-71.284979,46.764875],[-71.285209,46.76503],[-71.285483,46.76518],[-71.286424,46.765514],[-71.286803,46.765669],[-71.287083,46.765846],[-71.287346,46.766027],[-71.287508,46.76615],[-71.287687,46.76628],[-71.287985,46.766493],[-71.288093,46.766574],[-71.288198,46.766649],[-71.28834,46.766747],[-71.288476,46.766835],[-71.288531,46.766871],[-71.288696,46.766971]],"type":"LineString"},"mode":"driving","duration":60.6,"maneuver":{"bearing_after":318,"location":[-71.282983,46.763182],"bearing_before":0,"type":"depart"},"weight":115.5,"distance":612.3,"name":"Route de l'Église"},{"intersections":[{"out":0,"location":[-71.288696,46.766971],"bearings":[60,135,240,315],"entry":[true,false,false,true],"in":1},{"lanes":[{"valid":false,"indications":["left"]},{"valid":true,"indications":["straight"]},{"valid":true,"indications":["straight"]},{"valid":false,"indications":["right"]}],"out":0,"location":[-71.286165,46.768272],"bearings":[60,120,240,315],"entry":[true,true,false,true],"in":2},{"lanes":[{"valid":false,"indications":["left"]},{"valid":true,"indications":["straight"]},{"valid":true,"indications":["straight"]},{"valid":false,"indications":["right"]}],"out":0,"location":[-71.2818,46.770515],"bearings":[60,135,240,330],"entry":[true,true,false,true],"in":2},{"lanes":[{"valid":false,"indications":["left"]},{"valid":true,"indications":["straight"]},{"valid":true,"indications":["straight"]},{"valid":true,"indications":["straight"]}],"out":0,"location":[-71.280273,46.771298],"bearings":[60,240,315],"entry":[true,false,true],"in":1},{"lanes":[{"valid":false,"indications":["left"]},{"valid":true,"indications":["straight"]},{"valid":true,"indications":["straight"]},{"valid":false,"indications":["right"]}],"out":0,"location":[-71.278604,46.772145],"bearings":[60,135,240,330],"entry":[true,true,false,true],"in":2}],"driving_side":"right","geometry":{"coordinates":[[-71.288696,46.766971],[-71.28832,46.767165],[-71.288209,46.76722],[-71.28802,46.767317],[-71.287843,46.767407],[-71.287633,46.767515],[-71.287298,46.767688],[-71.286752,46.76797],[-71.286594,46.768052],[-71.286165,46.768272],[-71.284726,46.769007],[-71.283692,46.76954],[-71.283632,46.769571],[-71.283146,46.769822],[-71.28258,46.770113],[-71.282385,46.770214],[-71.281838,46.770496],[-71.2818,46.770515],[-71.281146,46.770851],[-71.280273,46.771298],[-71.279998,46.771438],[-71.279535,46.771673],[-71.278604,46.772145],[-71.278339,46.772281],[-71.277997,46.772457],[-71.277742,46.772588],[-71.27754,46.772693],[-71.277438,46.772745],[-71.277095,46.772922],[-71.276987,46.772977],[-71.276601,46.773176],[-71.275515,46.773735],[-71.275393,46.773798]],"type":"LineString"},"mode":"driving","duration":125.9,"maneuver":{"bearing_after":52,"type":"turn","modifier":"right","bearing_before":310,"location":[-71.288696,46.766971]},"ref":"175","weight":125.9,"distance":1266.4,"name":"Boulevard Laurier"},{"intersections":[{"lanes":[{"valid":true,"indications":["left"]},{"valid":true,"indications":["left"]},{"valid":false,"indications":["straight"]},{"valid":false,"indications":["straight"]},{"valid":false,"indications":["right"]}],"out":0,"location":[-71.275393,46.773798],"bearings":[60,150,240,330],"entry":[true,true,false,false],"in":2},{"lanes":[{"valid":true,"indications":["left"]},{"valid":true,"indications":["left"]},{"valid":false,"indications":["straight"]},{"valid":false,"indications":["straight"]},{"valid":false,"indications":["right"]}],"out":3,"location":[-71.275233,46.773874],"bearings":[60,150,240,330],"entry":[true,false,false,true],"in":2},{"out":3,"location":[-71.275379,46.774005],"bearings":[60,150,240,315],"entry":[false,false,true,true],"in":1},{"out":2,"location":[-71.277852,46.776192],"bearings":[135,225,315],"entry":[false,false,true],"in":0},{"out":2,"location":[-71.277943,46.776269],"bearings":[135,240,330],"entry":[false,true,true],"in":0},{"out":2,"location":[-71.279654,46.777885],"bearings":[135,150,315],"entry":[false,false,true],"in":1},{"classes":["motorway"],"out":3,"location":[-71.280872,46.778921],"bearings":[45,135,270,315],"entry":[true,false,false,true],"in":1},{"classes":["motorway"],"out":1,"location":[-71.280966,46.778998],"bearings":[135,315,330],"entry":[false,true,true],"in":0},{"classes":["motorway"],"out":2,"location":[-71.282628,46.780353],"bearings":[136,140,319],"entry":[false,false,true],"in":1}],"driving_side":"right","geometry":{"coordinates":[[-71.275393,46.773798],[-71.275233,46.773874],[-71.275305,46.773939],[-71.275379,46.774005],[-71.275483,46.774098],[-71.276876,46.775329],[-71.276967,46.775409],[-71.277023,46.775459],[-71.27732,46.775721],[-71.277852,46.776192],[-71.277943,46.776269],[-71.279654,46.777885],[-71.279979,46.778161],[-71.280872,46.778921],[-71.280966,46.778998],[-71.282628,46.780353],[-71.283389,46.780956]],"type":"LineString"},"mode":"driving","duration":99.6,"maneuver":{"bearing_after":54,"type":"turn","modifier":"left","bearing_before":52,"location":[-71.275393,46.773798]},"weight":99.6,"distance":1018.4,"name":"Autoroute Robert-Bourassa"},{"intersections":[{"classes":["motorway"],"out":2,"location":[-71.283389,46.780956],"bearings":[135,315,330],"entry":[false,true,true],"in":0},{"out":3,"location":[-71.285775,46.782998],"bearings":[45,135,225,315],"entry":[true,false,false,true],"in":1},{"out":3,"location":[-71.285908,46.783088],"bearings":[45,135,225,315],"entry":[false,false,true,true],"in":1}],"driving_side":"right","geometry":{"coordinates":[[-71.283389,46.780956],[-71.284447,46.781955],[-71.285291,46.782653],[-71.285711,46.782945],[-71.285725,46.782955],[-71.285775,46.782998],[-71.285908,46.783088],[-71.285949,46.783123],[-71.286442,46.783542]],"type":"LineString"},"mode":"driving","duration":27.8,"maneuver":{"bearing_after":323,"type":"off ramp","modifier":"slight right","bearing_before":317,"location":[-71.283389,46.780956]},"weight":27.8,"distance":370.4,"name":""},{"intersections":[{"out":2,"location":[-71.286442,46.783542],"bearings":[135,315,330],"entry":[false,true,true],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.286442,46.783542],[-71.286634,46.783738],[-71.286785,46.783892],[-71.286885,46.784001],[-71.286983,46.784113],[-71.28703,46.784183],[-71.287091,46.784276]],"type":"LineString"},"mode":"driving","duration":13.9,"maneuver":{"bearing_after":324,"type":"continue","modifier":"straight","bearing_before":320,"location":[-71.286442,46.783542]},"weight":13.9,"distance":95.6,"name":"Route du Vallon"},{"intersections":[{"out":2,"location":[-71.287091,46.784276],"bearings":[60,150,240,330],"entry":[true,false,true,true],"in":1},{"out":2,"location":[-71.287408,46.78417],"bearings":[60,150,240,330],"entry":[false,true,true,false],"in":0},{"out":2,"location":[-71.290215,46.783622],"bearings":[75,135,255],"entry":[false,true,true],"in":0},{"out":1,"location":[-71.290593,46.783564],"bearings":[75,255,330],"entry":[false,true,true],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.287091,46.784276],[-71.287408,46.78417],[-71.287559,46.784124],[-71.288102,46.783959],[-71.288205,46.783933],[-71.288503,46.783885],[-71.288968,46.78381],[-71.289144,46.783784],[-71.290215,46.783622],[-71.290593,46.783564],[-71.291572,46.783409],[-71.292618,46.78317]],"type":"LineString"},"mode":"driving","duration":47.6,"maneuver":{"bearing_after":243,"type":"turn","modifier":"left","bearing_before":336,"location":[-71.287091,46.784276]},"weight":3322.4,"distance":440,"name":"Chemin Sainte-Foy"},{"intersections":[{"classes":["restricted"],"out":2,"location":[-71.292618,46.78317],"bearings":[75,240,345],"entry":[false,true,true],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.292618,46.78317],[-71.292724,46.783371],[-71.293045,46.783649]],"type":"LineString"},"mode":"driving","duration":36.5,"maneuver":{"bearing_after":338,"type":"turn","modifier":"right","bearing_before":250,"location":[-71.292618,46.78317]},"weight":36.5,"distance":63.2,"name":"Allée de la Villa-Saint-Jean"},{"intersections":[{"classes":["restricted"],"out":0,"location":[-71.293045,46.783649],"bearings":[135],"entry":[true],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.293045,46.783649],[-71.292724,46.783371],[-71.292711,46.783347]],"type":"LineString"},"mode":"driving","duration":6.2,"maneuver":{"bearing_after":140,"type":"continue","modifier":"uturn","bearing_before":320,"location":[-71.293045,46.783649]},"weight":6.2,"distance":42.3,"name":"Allée de la Villa-Saint-Jean"},{"intersections":[{"in":0,"entry":[true],"bearings":[340],"location":[-71.292711,46.783347]}],"driving_side":"right","geometry":{"coordinates":[[-71.292711,46.783347],[-71.292711,46.783347]],"type":"LineString"},"mode":"driving","duration":0,"maneuver":{"bearing_after":0,"location":[-71.292711,46.783347],"bearing_before":160,"type":"arrive"},"weight":0,"distance":0,"name":"Allée de la Villa-Saint-Jean"}],"distance":3908.6,"duration":418.1,"summary":"Route de l'Église, Boulevard Laurier","weight":3747.8},{"steps":[{"intersections":[{"classes":["restricted"],"location":[-71.292711,46.783347],"bearings":[160],"entry":[true],"out":0}],"driving_side":"right","geometry":{"coordinates":[[-71.292711,46.783347],[-71.292618,46.78317]],"type":"LineString"},"mode":"driving","duration":8.1,"maneuver":{"bearing_after":160,"location":[-71.292711,46.783347],"bearing_before":0,"type":"depart"},"weight":8.1,"distance":20.9,"name":"Allée de la Villa-Saint-Jean"},{"intersections":[{"out":0,"location":[-71.292618,46.78317],"bearings":[75,240,345],"entry":[true,true,false],"in":2},{"out":0,"location":[-71.290593,46.783564],"bearings":[75,255,330],"entry":[true,false,true],"in":1},{"out":0,"location":[-71.290215,46.783622],"bearings":[75,135,255],"entry":[true,true,false],"in":2},{"out":0,"location":[-71.287408,46.78417],"bearings":[60,150,240,330],"entry":[true,true,false,false],"in":2}],"driving_side":"right","geometry":{"coordinates":[[-71.292618,46.78317],[-71.291572,46.783409],[-71.290593,46.783564],[-71.290215,46.783622],[-71.289144,46.783784],[-71.288968,46.78381],[-71.288503,46.783885],[-71.288205,46.783933],[-71.288102,46.783959],[-71.287559,46.784124],[-71.287408,46.78417],[-71.287091,46.784276]],"type":"LineString"},"mode":"driving","duration":52.8,"maneuver":{"bearing_after":70,"type":"turn","modifier":"left","bearing_before":158,"location":[-71.292618,46.78317]},"weight":52.8,"distance":440,"name":"Chemin Sainte-Foy"},{"intersections":[{"classes":["motorway"],"out":3,"location":[-71.287091,46.784276],"bearings":[60,150,240,330],"entry":[true,false,false,true],"in":2},{"classes":["motorway"],"out":2,"location":[-71.287348,46.784669],"bearings":[135,150,330],"entry":[false,false,true],"in":1},{"classes":["motorway"],"out":1,"location":[-71.288338,46.785793],"bearings":[150,315,330],"entry":[false,true,true],"in":0},{"classes":["motorway"],"out":2,"location":[-71.288893,46.786216],"bearings":[120,135,315],"entry":[false,false,true],"in":1}],"driving_side":"right","geometry":{"coordinates":[[-71.287091,46.784276],[-71.287149,46.784366],[-71.287348,46.784669],[-71.287461,46.784818],[-71.28759,46.784974],[-71.288067,46.785527],[-71.288191,46.785656],[-71.288338,46.785793],[-71.288456,46.785887],[-71.28868,46.786055],[-71.288893,46.786216],[-71.289471,46.786599],[-71.289717,46.786753],[-71.289959,46.786893]],"type":"LineString"},"mode":"driving","duration":23.7,"maneuver":{"bearing_after":334,"type":"on ramp","modifier":"left","bearing_before":63,"location":[-71.287091,46.784276]},"weight":23.7,"distance":368.1,"name":""},{"intersections":[{"classes":["motorway"],"out":2,"location":[-71.289959,46.786893],"bearings":[133,138,321],"entry":[false,false,true],"in":0},{"classes":["motorway"],"out":0,"location":[-71.289095,46.791477],"bearings":[25,30,210],"entry":[true,true,false],"in":2},{"classes":["motorway"],"out":0,"location":[-71.288091,46.794647],"bearings":[15,180,195],"entry":[true,false,false],"in":1},{"classes":["motorway"],"lanes":[{"valid":true,"indications":["none"]},{"valid":true,"indications":["none"]},{"valid":true,"indications":["none"]},{"valid":false,"indications":["slight right"]}],"out":0,"location":[-71.287442,46.796587],"bearings":[15,30,210],"entry":[true,true,false],"in":2},{"classes":["motorway"],"out":2,"location":[-71.285916,46.800541],"bearings":[150,180,345],"entry":[false,false,true],"in":1},{"classes":["motorway"],"out":0,"location":[-71.289887,46.80681],"bearings":[0,15,180],"entry":[true,true,false],"in":2},{"classes":["motorway"],"out":0,"location":[-71.289307,46.809696],"bearings":[0,165,195],"entry":[true,false,false],"in":2}],"driving_side":"right","geometry":{"coordinates":[[-71.289959,46.786893],[-71.290098,46.787012],[-71.290301,46.787166],[-71.290459,46.787327],[-71.2906,46.787486],[-71.290742,46.787673],[-71.290841,46.787829],[-71.29092,46.787982],[-71.29104,46.78832],[-71.291069,46.788533],[-71.291093,46.788715],[-71.291089,46.789013],[-71.291013,46.789345],[-71.290919,46.789567],[-71.290805,46.789771],[-71.290518,46.790126],[-71.290345,46.790302],[-71.290175,46.790448],[-71.2901,46.790523],[-71.289499,46.791056],[-71.289355,46.791202],[-71.28916,46.791401],[-71.289095,46.791477],[-71.288841,46.791842],[-71.288656,46.792203],[-71.288596,46.792355],[-71.288522,46.79257],[-71.288379,46.793312],[-71.288091,46.794647],[-71.287956,46.795292],[-71.287895,46.795526],[-71.28782,46.795798],[-71.287702,46.796118],[-71.287596,46.796365],[-71.287442,46.796587],[-71.287316,46.79681],[-71.287184,46.797009],[-71.286985,46.797262],[-71.286784,46.797504],[-71.286439,46.797947],[-71.286268,46.79818],[-71.286119,46.798422],[-71.28599,46.798717],[-71.285912,46.798973],[-71.285838,46.79927],[-71.2858,46.799513],[-71.285802,46.799757],[-71.285805,46.799942],[-71.285861,46.800319],[-71.285894,46.800457],[-71.285916,46.800541],[-71.285933,46.800604],[-71.28596,46.800694],[-71.286053,46.800912],[-71.286118,46.801057],[-71.286209,46.801199],[-71.286282,46.801317],[-71.286351,46.801408],[-71.286512,46.801585],[-71.286817,46.80193],[-71.287054,46.802136],[-71.287392,46.8024],[-71.287828,46.802687],[-71.28835,46.803085],[-71.288734,46.803376],[-71.289004,46.803616],[-71.289201,46.803814],[-71.289341,46.80398],[-71.289506,46.804207],[-71.289637,46.804441],[-71.289741,46.804649],[-71.28985,46.8049],[-71.289919,46.805095],[-71.289958,46.805226],[-71.28999,46.805401],[-71.290005,46.805599],[-71.290007,46.80585],[-71.28998,46.806164],[-71.289887,46.80681],[-71.28979,46.807399],[-71.289729,46.807747],[-71.289528,46.808702],[-71.289307,46.809696],[-71.289215,46.810239],[-71.288963,46.811553]],"type":"LineString"},"mode":"driving","duration":153.4,"maneuver":{"bearing_after":320,"type":"merge","modifier":"slight left","bearing_before":312,"location":[-71.289959,46.786893]},"ref":"740","weight":153.4,"distance":2954.1,"name":"Autoroute Robert-Bourassa"},{"intersections":[{"classes":["motorway"],"lanes":[{"valid":false,"indications":["none"]},{"valid":false,"indications":["none"]},{"valid":false,"indications":["none"]},{"valid":true,"indications":["slight right"]}],"out":1,"location":[-71.288963,46.811553],"bearings":[8,17,187],"entry":[true,true,false],"in":2}],"driving_side":"right","geometry":{"coordinates":[[-71.288963,46.811553],[-71.288596,46.812358],[-71.288473,46.81257],[-71.288358,46.812713],[-71.288237,46.812838],[-71.288072,46.812968],[-71.287893,46.81306],[-71.287741,46.813112],[-71.28754,46.813132],[-71.287388,46.813127],[-71.287259,46.813097],[-71.286436,46.812797],[-71.286228,46.812756]],"type":"LineString"},"mode":"driving","destinations":"Boulevard Père-Lelièvre","duration":29.2,"maneuver":{"bearing_after":16,"type":"off ramp","modifier":"slight right","bearing_before":7,"location":[-71.288963,46.811553]},"weight":29.2,"distance":328,"name":""},{"intersections":[{"out":1,"location":[-71.286228,46.812756],"bearings":[30,210,285,315],"entry":[true,true,false,true],"in":2},{"out":2,"location":[-71.286696,46.812061],"bearings":[30,120,210],"entry":[false,true,true],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.286228,46.812756],[-71.286696,46.812061],[-71.287332,46.811118],[-71.287457,46.810983]],"type":"LineString"},"mode":"driving","duration":34.8,"maneuver":{"bearing_after":203,"type":"turn","modifier":"right","bearing_before":105,"location":[-71.286228,46.812756]},"weight":34.8,"distance":218.4,"name":"Rue De Brugnon"},{"intersections":[{"out":2,"location":[-71.287457,46.810983],"bearings":[30,135,225,300],"entry":[false,false,true,true],"in":0},{"out":1,"location":[-71.28756,46.810894],"bearings":[45,135,300],"entry":[false,true,false],"in":0}],"driving_side":"right","geometry":{"coordinates":[[-71.287457,46.810983],[-71.28756,46.810894],[-71.287375,46.810795],[-71.287252,46.81072],[-71.287107,46.810628],[-71.28693,46.8105],[-71.286667,46.810274],[-71.286259,46.809938],[-71.286071,46.809789],[-71.285919,46.809672],[-71.285699,46.809523],[-71.285548,46.80944],[-71.285347,46.809396]],"type":"LineString"},"mode":"driving","duration":34.9,"maneuver":{"bearing_after":217,"type":"end of road","modifier":"left","bearing_before":212,"location":[-71.287457,46.810983]},"weight":34.9,"distance":252.1,"name":"Boulevard Père-Lelièvre"},{"intersections":[{"out":1,"location":[-71.285347,46.809396],"bearings":[120,210,315],"entry":[true,true,true],"in":2}],"driving_side":"right","geometry":{"coordinates":[[-71.285347,46.809396],[-71.285535,46.809226],[-71.285776,46.808959],[-71.285822,46.808891],[-71.285846,46.808835],[-71.285846,46.808802],[-71.28583,46.80875],[-71.285774,46.808702]],"type":"LineString"},"mode":"driving","duration":12.9,"maneuver":{"bearing_after":216,"type":"turn","modifier":"right","bearing_before":127,"location":[-71.285347,46.809396]},"weight":12.9,"distance":89.9,"name":"Rue Pépin"},{"intersections":[{"in":0,"entry":[true],"bearings":[321],"location":[-71.285774,46.808702]}],"driving_side":"right","geometry":{"coordinates":[[-71.285774,46.808702],[-71.285774,46.808702]],"type":"LineString"},"mode":"driving","duration":0,"maneuver":{"bearing_after":0,"location":[-71.285774,46.808702],"bearing_before":141,"type":"arrive"},"weight":0,"distance":0,"name":"Rue Pépin"}],"distance":4671.4,"duration":349.8,"summary":"Chemin Sainte-Foy, Autoroute Robert-Bourassa","weight":349.8}]}"
}`

Response

{
"error": null,
"data": {
"message": "OK"
}
}

Delete route

Remove route by id

Request

curl --location --request DELETE 'https://api-v1-stg.lumyri.com/routes/d70d9f36-f121-47d9-ab2b-e625fbe7f114' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}'

Response

{
"error": null,
"data": {
"message": "OK"
}
}

Get route by id

Get route by id

Request

curl --location --request GET 'https://api-v1-stg.lumyri.com/routes/ROUTE_IDENTIFY' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}'

Response

{
"error": null,
"data": {
"id": "ROUTE_IDENTIFY",
"name": "Route for test",
"color": "#D35CC0",
"app_id": "APPLICATION_IDENTIFY",
"status": "Not Start",
"scheduled_date": "2023-03-01",
"agent_id": "AGENT_IDENTIFY",
"company_id": "COMPANY_IDENTIFY",
"origin": {
"name": "Route de l'Église, Saint-Louis-de-France, Saint-Louis, Sainte-Foy–Sillery–Cap-Rouge, Quebec, Québec (Agglomération), Capitale-Nationale, G1W 3P3, Canada",
"geo": [46.76318210483648, -71.28298290491814]
},
"destination": {
"name": "Rue Pépin, Domaine-Saint-Charles, Duberger–Les Saules, Les Rivières, Quebec, Québec (Agglomération), Capitale-Nationale, G1M 1P2, Canada",
"geo": [46.8087024, -71.2857737]
},
"routes": {
"distance": 7571.4,
"duration": 604.8,
"legs": [
{
"distance": 7571.4,
"duration": 604.8,
"steps": [
{
"distance": 612.3,
"duration": 60.6,
"name": "Route de l'Église",
"geometry": {
"coordinates": [
[-71.282983, 46.763182],
[-71.283132, 46.763295],
[-71.283559, 46.763637],
[-71.284979, 46.764875],
[-71.285209, 46.76503],
[-71.285483, 46.76518],
[-71.286424, 46.765514],
[-71.286803, 46.765669],
[-71.287083, 46.765846],
[-71.287346, 46.766027],
[-71.287508, 46.76615],
[-71.287687, 46.76628],
[-71.287985, 46.766493],
[-71.288093, 46.766574],
[-71.288198, 46.766649],
[-71.28834, 46.766747],
[-71.288476, 46.766835],
[-71.288531, 46.766871],
[-71.288696, 46.766971]
]
}
},
{
"distance": 1266.4,
"duration": 125.9,
"name": "Boulevard Laurier",
"geometry": {
"coordinates": [
[-71.288696, 46.766971],
[-71.28832, 46.767165],
[-71.288209, 46.76722],
[-71.28802, 46.767317],
[-71.287843, 46.767407],
[-71.287633, 46.767515],
[-71.287298, 46.767688],
[-71.286752, 46.76797],
[-71.286594, 46.768052],
[-71.286165, 46.768272],
[-71.284726, 46.769007],
[-71.283692, 46.76954],
[-71.283632, 46.769571],
[-71.283146, 46.769822],
[-71.28258, 46.770113],
[-71.282385, 46.770214],
[-71.281838, 46.770496],
[-71.2818, 46.770515],
[-71.281146, 46.770851],
[-71.280273, 46.771298],
[-71.279998, 46.771438],
[-71.279535, 46.771673],
[-71.278604, 46.772145],
[-71.278339, 46.772281],
[-71.277997, 46.772457],
[-71.277742, 46.772588],
[-71.27754, 46.772693],
[-71.277438, 46.772745],
[-71.277095, 46.772922],
[-71.276987, 46.772977],
[-71.276601, 46.773176],
[-71.275515, 46.773735],
[-71.275393, 46.773798]
]
}
},
{
"distance": 4804.3,
"duration": 306.5,
"name": "Autoroute Robert-Bourassa",
"geometry": {
"coordinates": [
[-71.275393, 46.773798],
[-71.275233, 46.773874],
[-71.275305, 46.773939],
[-71.275379, 46.774005],
[-71.275483, 46.774098],
[-71.276876, 46.775329],
[-71.276967, 46.775409],
[-71.277023, 46.775459],
[-71.27732, 46.775721],
[-71.277852, 46.776192],
[-71.277943, 46.776269],
[-71.279654, 46.777885],
[-71.279979, 46.778161],
[-71.280872, 46.778921],
[-71.280966, 46.778998],
[-71.282628, 46.780353],
[-71.283389, 46.780956],
[-71.285629, 46.782778],
[-71.28637, 46.783373],
[-71.286619, 46.783593],
[-71.286825, 46.783797],
[-71.286949, 46.783942],
[-71.287437, 46.784555],
[-71.287836, 46.785046],
[-71.288364, 46.785664],
[-71.288693, 46.785946],
[-71.289959, 46.786893],
[-71.290098, 46.787012],
[-71.290301, 46.787166],
[-71.290459, 46.787327],
[-71.2906, 46.787486],
[-71.290742, 46.787673],
[-71.290841, 46.787829],
[-71.29092, 46.787982],
[-71.29104, 46.78832],
[-71.291069, 46.788533],
[-71.291093, 46.788715],
[-71.291089, 46.789013],
[-71.291013, 46.789345],
[-71.290919, 46.789567],
[-71.290805, 46.789771],
[-71.290518, 46.790126],
[-71.290345, 46.790302],
[-71.290175, 46.790448],
[-71.2901, 46.790523],
[-71.289499, 46.791056],
[-71.289355, 46.791202],
[-71.28916, 46.791401],
[-71.289095, 46.791477],
[-71.288841, 46.791842],
[-71.288656, 46.792203],
[-71.288596, 46.792355],
[-71.288522, 46.79257],
[-71.288379, 46.793312],
[-71.288091, 46.794647],
[-71.287956, 46.795292],
[-71.287895, 46.795526],
[-71.28782, 46.795798],
[-71.287702, 46.796118],
[-71.287596, 46.796365],
[-71.287442, 46.796587],
[-71.287316, 46.79681],
[-71.287184, 46.797009],
[-71.286985, 46.797262],
[-71.286784, 46.797504],
[-71.286439, 46.797947],
[-71.286268, 46.79818],
[-71.286119, 46.798422],
[-71.28599, 46.798717],
[-71.285912, 46.798973],
[-71.285838, 46.79927],
[-71.2858, 46.799513],
[-71.285802, 46.799757],
[-71.285805, 46.799942],
[-71.285861, 46.800319],
[-71.285894, 46.800457],
[-71.285916, 46.800541],
[-71.285933, 46.800604],
[-71.28596, 46.800694],
[-71.286053, 46.800912],
[-71.286118, 46.801057],
[-71.286209, 46.801199],
[-71.286282, 46.801317],
[-71.286351, 46.801408],
[-71.286512, 46.801585],
[-71.286817, 46.80193],
[-71.287054, 46.802136],
[-71.287392, 46.8024],
[-71.287828, 46.802687],
[-71.28835, 46.803085],
[-71.288734, 46.803376],
[-71.289004, 46.803616],
[-71.289201, 46.803814],
[-71.289341, 46.80398],
[-71.289506, 46.804207],
[-71.289637, 46.804441],
[-71.289741, 46.804649],
[-71.28985, 46.8049],
[-71.289919, 46.805095],
[-71.289958, 46.805226],
[-71.28999, 46.805401],
[-71.290005, 46.805599],
[-71.290007, 46.80585],
[-71.28998, 46.806164],
[-71.289887, 46.80681],
[-71.28979, 46.807399],
[-71.289729, 46.807747],
[-71.289528, 46.808702],
[-71.289307, 46.809696],
[-71.289215, 46.810239],
[-71.288963, 46.811553]
]
}
},
{
"distance": 328,
"duration": 29.2,
"name": "",
"geometry": {
"coordinates": [
[-71.288963, 46.811553],
[-71.288596, 46.812358],
[-71.288473, 46.81257],
[-71.288358, 46.812713],
[-71.288237, 46.812838],
[-71.288072, 46.812968],
[-71.287893, 46.81306],
[-71.287741, 46.813112],
[-71.28754, 46.813132],
[-71.287388, 46.813127],
[-71.287259, 46.813097],
[-71.286436, 46.812797],
[-71.286228, 46.812756]
]
}
},
{
"distance": 218.4,
"duration": 34.8,
"name": "Rue De Brugnon",
"geometry": {
"coordinates": [
[-71.286228, 46.812756],
[-71.286696, 46.812061],
[-71.287332, 46.811118],
[-71.287457, 46.810983]
]
}
},
{
"distance": 252.1,
"duration": 34.9,
"name": "Boulevard Père-Lelièvre",
"geometry": {
"coordinates": [
[-71.287457, 46.810983],
[-71.28756, 46.810894],
[-71.287375, 46.810795],
[-71.287252, 46.81072],
[-71.287107, 46.810628],
[-71.28693, 46.8105],
[-71.286667, 46.810274],
[-71.286259, 46.809938],
[-71.286071, 46.809789],
[-71.285919, 46.809672],
[-71.285699, 46.809523],
[-71.285548, 46.80944],
[-71.285347, 46.809396]
]
}
},
{
"distance": 89.9,
"duration": 12.9,
"name": "Rue Pépin",
"geometry": {
"coordinates": [
[-71.285347, 46.809396],
[-71.285535, 46.809226],
[-71.285776, 46.808959],
[-71.285822, 46.808891],
[-71.285846, 46.808835],
[-71.285846, 46.808802],
[-71.28583, 46.80875],
[-71.285774, 46.808702]
]
}
},
{
"distance": 0,
"duration": 0,
"name": "Rue Pépin",
"geometry": {
"coordinates": [
[-71.285774, 46.808702],
[-71.285774, 46.808702]
]
}
}
]
}
]
},
"created_at": "2023-02-23T04:07:11.181562Z",
"updated_at": "2023-02-23T04:07:11.181562Z",
"deleted_at": null,
"labels": [
{
"id": "d8aba21a-8558-4606-815a-337cb8dd23b0",
"name": "Pizza",
"color": "#4883BA"
}
],
"tickets": null,
"agent": {
"id": "AGENT_IDENTIFY",
"first_name": "50",
"last_name": "Cents",
"phone": "63473734737347",
"avatar": ""
},
"total_tickets": 0
}
}

Get routes

Remove list routes by condition

Parameters

scheduled_date: required

  • Type: string
  • Description: route in date

limit: optional

  • Type: string
  • Description: limit the number of response

page: optional

  • Type: string
  • Description: page number

status: optional

  • Type: string
  • Description: status of the route. includes: Not Start | In Progress | Completed

search: optional

  • Type: string
  • Description: search by ticket number

Request

curl --location --request GET 'https://api-v1-stg.lumyri.com/routes?limit=10&page=1&scheduled_date=2023-03-01' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}'

Response

{
"error": null,
"data": {
"total": 1,
"per_page": 10,
"current_page": 1,
"last_page": 1,
"data": [
{
"id": "ROUTE_IDENTIFY",
"name": "Route test updated",
"color": "#D35CC0",
"app_id": "APPLICATION_IDENTIFY",
"status": "Not Start",
"scheduled_date": "2023-03-01",
"agent_id": "AGENT_IDENTIFY",
"company_id": "COMPANY_IDENTIFY",
"origin": {
"name": "Route de l'Église, Saint-Louis-de-France, Saint-Louis, Sainte-Foy–Sillery–Cap-Rouge, Quebec, Québec (Agglomération), Capitale-Nationale, G1W 3P3, Canada",
"geo": [46.76318210483648, -71.28298290491814]
},
"destination": {
"name": "Rue Pépin, Domaine-Saint-Charles, Duberger–Les Saules, Les Rivières, Quebec, Québec (Agglomération), Capitale-Nationale, G1M 1P2, Canada",
"geo": [46.8087024, -71.2857737]
},
"routes": {
"distance": 0,
"duration": 0,
"legs": null
},
"created_at": "2023-02-23T04:07:11.181562Z",
"updated_at": "2023-02-23T04:28:56.123686Z",
"deleted_at": null,
"total_tickets": 1
}
]
}
}

Assign tickets to routes

Assign list tickets to route

Parameters

ticket_ids: required

  • Type: string[]
  • Description: list ticket ids

Request

curl --location --request POST 'https://api-v1-stg.lumyri.com/routes/assign/ROUTE_IDENTIFY' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}' \
--data-raw '{
"ticket_ids" :[
"6e9fb15a-c41b-4d1c-a606-7b4203ddf5c3"
]
}'

Response

{
"error": null,
"data": {
"message": "OK"
}
}

Unassign tickets

Unassign list tickets to route

Parameters

ticket_ids: required

  • Type: string[]
  • Description: list ticket ids

Request

curl --location --request POST 'https://api-v1-stg.lumyri.com/routes/unassign/ROUTE_IDENTIFY' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'x-app-id: {{APPLICATION_IDENTIFY}}' \
--data-raw '{
"ticket_ids" :[
"6e9fb15a-c41b-4d1c-a606-7b4203ddf5c3"
]
}'

Response

{
"error": null,
"data": {
"message": "OK"
}
}

Start route

Start route. This is available only agent role.

Request

curl --location --request PUT 'https://api-v1-stg.lumyri.com/routes/start/ROUTE_IDENTIFY' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json'

Response

{
"error": null,
"data": {
"message": "OK"
}
}

End route

End route. This is available only agent role.

Request

curl --location --request PUT 'https://api-v1-stg.lumyri.com/routes/end/ROUTE_IDENTIFY' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json'

Response

{
"error": null,
"data": {
"message": "OK"
}
}