M2X APIs
- Shift publication webhook
Get vehicles list
Create new vehicle
Update vehicles bulk
Find vehicle by ID
Update/create vehicle by ID
Updates vehicle location
Get day published shifts (Webhook DTO)
Get vehicle published tasks
Get vehicle published tasks by shift id (Webhook DTO)
Get vehicle published tasks by service day
Get vehicle published tasks by service day and shift
Update task actuals
Task upload attachment
get task attachment
Set the next active task for a vehicle
Service day publication webhook
Shift publication webhook
M2X APIS (1.0.0)
Download OpenAPI description
Overview
License
All Rights Reserved
Languages
Servers
Mock server
https://developer.m2x.app/_mock/apis/publicapi/openapi/
https://developer.m2x.app/apis/v0/
NZ Production server (uses live data)
https://m2x.app/apis/v0/
US Production server (uses live data)
https://us.m2x.app/apis/v0/
AUS Production server (uses live data)
https://au.m2x.app/apis/v0/
Sandbox server
https://staging.m2x.app/apis/v0/
Bodyapplication/jsonrequired
Vehicle active task request
The task ID to set as active for the vehicle. Must be a task that is assigned to the vehicle and not already complete.
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles/{vehicleId}/activeTask
- https://developer.m2x.app/apis/v0/vehicles/{vehicleId}/activeTask
- NZ Production server (uses live data)https://m2x.app/apis/v0/vehicles/{vehicleId}/activeTask
- US Production server (uses live data)https://us.m2x.app/apis/v0/vehicles/{vehicleId}/activeTask
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/vehicles/{vehicleId}/activeTask
- Sandbox serverhttps://staging.m2x.app/apis/v0/vehicles/{vehicleId}/activeTask
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles/{vehicleId}/activeTask' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"taskId": "string",
"timestamp": 0,
"name": null
}'Response
application/json
{ "success": true }
Bodyapplication/jsonrequired
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/Shift Publication
- https://developer.m2x.app/apis/v0/Shift Publication
- NZ Production server (uses live data)https://m2x.app/apis/v0/Shift Publication
- US Production server (uses live data)https://us.m2x.app/apis/v0/Shift Publication
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/Shift Publication
- Sandbox serverhttps://staging.m2x.app/apis/v0/Shift Publication
application/json
{ "shiftId": "string", "tasks": [ { … } ] }
Bodyapplication/jsonrequiredArray []
tasksArray of MovingTaskProperties (object) or CustomerTaskProperties (object) or ServiceTaskProperties (object)(Task)required
One of:
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/Service Day Publication
- https://developer.m2x.app/apis/v0/Service Day Publication
- NZ Production server (uses live data)https://m2x.app/apis/v0/Service Day Publication
- US Production server (uses live data)https://us.m2x.app/apis/v0/Service Day Publication
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/Service Day Publication
- Sandbox serverhttps://staging.m2x.app/apis/v0/Service Day Publication
application/json
[ { "shiftId": "string", "tasks": [ … ] } ]