Dianomeas api documentation
by CrossNics
About this Documentation
Generated with mkdocs.
This document contains documentation for Dianomeas Api.
Endpoints
All Endpoints require an api key. Users have to get an api key by contacting Crossnics technical support.
listMissions
GET https://dianomeas.com/api/listMissions
Gets all missions that belongs to the key owner's company. Returns id and status, you have to call readMission for the mission you need more information
Example Request:
{
"key":"eyJpdiI6IkZqcU....WZkZDk0In0=",
}
Example Response:
{
"success": false,
"missions": [
{
"id": 32,
"status": "FAILED"
},
{
"id": 33,
"status": "FAILED"
},
{
"id": 34,
"status": "FAILED"
},
{
"id": 35,
"status": "FAILED"
},
...
]
}
readMission
GET https://dianomeas.com/api/readMission
Reads a mission from the database
Example Request:
{
"key":"eyJpdiI6IkZqcU....WZkZDk0In0=",
"mission_id":"81"
}
Example Response:
{
"success": true,
"mission": {
"id": 81,
"serial": "hDmSYqwPs0",
"status": "PENDING",
"mission_result": null,
"package_returned": null,
"receipt_code": "141717",
"tags": null,
"mission_group_id": null,
"company": {
"id": 1,
"name": "testCompany"
},
"from_address": {
"id": 17,
"provider_address": "Achilleos 18, Kallithea 176 74, Greece",
"lat": 37.94529299999999949477569316513836383819580078125,
"lng": 23.697226000000000567524693906307220458984375,
"details": {
"floor": 1,
"phone": "6940077005",
"doorbell": "fafalios"
}
},
"to_address": {
"id": 16,
"provider_address": "Vasilissis Sofias 10, Marousi 151 24, Greece",
"lat": 38.0518679999999989149728207848966121673583984375,
"lng": 23.80894500000000135742084239609539508819580078125,
"details": {
"floor": 1,
"phone": "6940077005",
"doorbell": "fafalios"
},
"contact": {
"id": 16,
"name": "giannis fafalios",
"phone": "6940077005",
"email": "giannisfafalios@gmail.com"
}
},
"originator_contact": {
"id": 1,
"email": "contact1@contact.com"
},
"group": {
"id": 8,
"name": "Express"
},
"dianomeas_id": null,
"dianomeas": null,
"isActive": false,
"details": null,
"product_details": {
"size": "MD",
"comments": null
},
"distance": 15375,
"price": 118.93000000000000682121026329696178436279296875,
"reward": 107.037000000000006139089236967265605926513671875,
"final_reward": 107.037000000000006139089236967265605926513671875,
"priceDetails": {
"next_km": 7.42999999999999971578290569595992565155029296875,
"first_km": 12.1199999999999992184029906638897955417633056640625
},
"started_at": null,
"in_progress_at": null,
"ended_at": null,
"deadline_at": "2022-12-12 00:00:00",
"created_at": "2021-01-07 16:08:12",
"updated_at": "2021-01-07 16:11:02",
"deleted_at": null
}
}
createMission
POST https://dianomeas.com/api/createMission
Creates a new mission. Missions are automatically sent to dianomeis. Missions are automatically grouped taking into account the tag attribute
Example Request:
{
"key":"eyJpdiI6IkZqcU....WZkZDk0In0=",
"from_address":"axileos 18 kallithea", // the real address is searched using google maps
"receiver":{
"floor":1,
"address":"Vasilissis Sofias 10 Marousi 151 24", // the real address is searched using google maps
"email":"giannisfafalios@gmail.com",
"first_name":"giannis",
"last_name":"fafalios",
"phone":"6940077005",
"doorbell":"fafalios"
},
"size":"MD",
"deadline_at":"2022-12-12 00:00:00",
"tag":"sintagma", // use this to help group missions
"price":{ // override default pricing
"first_km":12.12,
"next_km":7.43
},
"group":"Express" // which group should receive the mission. If it is not defined the mission gets handled by the marketplace
}
Example Response;
{
"success": true,
"mission": {
"id": 82,
"serial": "268QOSp9Nt",
"status": null,
"mission_result": null,
"package_returned": null,
"receipt_code": "926140",
"tags": null,
"mission_group_id": null,
"company": {
"id": 1,
"name": "testCompany"
},
"from_address": {
"id": 17,
"provider_address": "Achilleos 18, Kallithea 176 74, Greece",
"lat": 37.94529299999999949477569316513836383819580078125,
"lng": 23.697226000000000567524693906307220458984375,
"details": {
"floor": 1,
"phone": "6940077005",
"doorbell": "fafalios"
}
},
"to_address": {
"id": 16,
"provider_address": "Vasilissis Sofias 10, Marousi 151 24, Greece",
"lat": 38.0518679999999989149728207848966121673583984375,
"lng": 23.80894500000000135742084239609539508819580078125,
"details": {
"floor": 1,
"phone": "6940077005",
"doorbell": "fafalios"
},
"contact": {
"id": 16,
"name": "giannis fafalios",
"phone": "6940077005",
"email": "giannisfafalios@gmail.com"
}
},
"originator_contact": {
"id": 1,
"email": "contact1@contact.com"
},
"group": {
"id": 8,
"name": "Express"
},
"dianomeas_id": null,
"dianomeas": null,
"isActive": false,
"details": null,
"product_details": {
"size": "MD",
"comments": null
},
"distance": 15375,
"price": 118.94,
"reward": 107.04,
"final_reward": 107.04,
"priceDetails": {
"first_km": 12.12,
"next_km": 7.43
},
"started_at": null,
"in_progress_at": null,
"ended_at": null,
"deadline_at": "2022-12-12 00:00:00",
"created_at": "2021-01-08 15:31:21",
"updated_at": "2021-01-08 15:31:21",
"deleted_at": null
}
}