M2X APIs
- Query runs activities
Upsert Pickup
Delete Pickup
Get collection by Id
Update/create collection by Id
Query runs activities
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/
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/runs/activities
- https://developer.m2x.app/apis/v0/runs/activities
- NZ Production server (uses live data)https://m2x.app/apis/v0/runs/activities
- US Production server (uses live data)https://us.m2x.app/apis/v0/runs/activities
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/runs/activities
- Sandbox serverhttps://staging.m2x.app/apis/v0/runs/activities
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/activities?start=2019-08-24&end=2019-08-24' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
[ { "id": "D001", "departureTime": "2019-08-24T14:15:22Z", "arrivalTime": "2019-08-24T14:15:22Z", "deleted": true, "type": "pickup", "constraintId": "D001", "dispatchGroupId": "ABC1123-asdasdasd-123213", "vehicleId": "D001", "location": { … }, "product": {}, "productComponents": [ … ], "productSpatialRequirement": 0, "totalProductSpatialRequirement": 0, "shiftMetadata": { … }, "actual": { … }, "timeConstraint": { … }, "firstPublishedState": { … } } ]
Bodyapplication/json
M2X internal tracking id for the location code used
Default null
Example: "C6mruxd3AVUTW14vEZ0v"
Address, if present and no locationId or external Id is matching, will try to geocode
Default null
Example: "123 Example Road, Auckland 1010"
Helps user creating the missing mapping upon mapping failure, or used to save location if new
Default null
Example: "Auckland Storage 1"
Try to resolve location by name, quick weak method, disabled by default
Default false
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/{pickupId}
- https://developer.m2x.app/apis/v0/runs/pickups/{pickupId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/runs/pickups/{pickupId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/runs/pickups/{pickupId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/runs/pickups/{pickupId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/runs/pickups/{pickupId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/{pickupId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"customer": {
"customerName": "Fruit World",
"customerId": "Yc7cXUulBhMM58iuOQce",
"externalId": "FTW",
"integrationId": "C99"
},
"location": {
"locationId": "C6mruxd3AVUTW14vEZ0v",
"addressText": "123 Example Road, Auckland 1010",
"externalId": "WHC6",
"locationName": "Auckland Storage 1",
"latitude": -36.983882,
"longitude": 174.709879,
"locationNameResolutionEnabled": false,
"saveIfUnknown": false
},
"content": null,
"product": {
"productCodeName": "string",
"productCodeId": "string",
"integrationId": "string"
},
"quantity": 0,
"externalId": 0,
"priority": "LOW",
"orderDay": "2019-08-24",
"readonlyFields": {
"deleted": false,
"customer": false,
"location": false,
"content": false,
"product": false,
"quantity": false,
"priority": false,
"properties": false
},
"properties": null,
"metadata": null
}'Response
application/json
{ "success": true }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/{pickupId}
- https://developer.m2x.app/apis/v0/runs/pickups/{pickupId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/runs/pickups/{pickupId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/runs/pickups/{pickupId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/runs/pickups/{pickupId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/runs/pickups/{pickupId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/{pickupId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "success": true }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/collections/truckDairyPump/{collectionId}
- https://developer.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/collections/truckDairyPump/{collectionId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
application/json
{ "locationExternalId": "string", "locationName": "string", "toLocationExternalId": "string", "toLocationName": "string", "truckName": "string", "truckExternalId": "string", "driverName": "string", "driverExternalId": "string", "customerName": "string", "serviceDay": "2019-08-24", "startTime": "2019-08-24T14:15:22Z", "endTime": "2019-08-24T14:15:22Z", "productQuantity": 0, "customerRunNumber": "string", "internalRunNumber": "string", "properties": {}, "metadata": {}, "measurements": { "temperature": 0, "minTemperature": 0, "maxTemperature": 0 }, "updated": "2019-08-24T14:15:22Z", "measurementId": "string" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/collections/truckDairyPump/{collectionId}
- https://developer.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/runs/pickups/collections/truckDairyPump/{collectionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/collections/truckDairyPump/{collectionId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"locationExternalId": "string",
"locationName": "string",
"toLocationExternalId": "string",
"toLocationName": "string",
"truckName": "string",
"truckExternalId": "string",
"driverName": "string",
"driverExternalId": "string",
"customerName": "string",
"serviceDay": "2019-08-24",
"startTime": "2019-08-24T14:15:22Z",
"endTime": "2019-08-24T14:15:22Z",
"productQuantity": 0,
"customerRunNumber": "string",
"internalRunNumber": "string",
"properties": {},
"metadata": {},
"measurements": {
"temperature": 0,
"minTemperature": 0,
"maxTemperature": 0
}
}'Response
application/json
{ "locationExternalId": "string", "locationName": "string", "toLocationExternalId": "string", "toLocationName": "string", "truckName": "string", "truckExternalId": "string", "driverName": "string", "driverExternalId": "string", "customerName": "string", "serviceDay": "2019-08-24", "startTime": "2019-08-24T14:15:22Z", "endTime": "2019-08-24T14:15:22Z", "productQuantity": 0, "customerRunNumber": "string", "internalRunNumber": "string", "properties": {}, "metadata": {}, "measurements": { "temperature": 0, "minTemperature": 0, "maxTemperature": 0 }, "updated": "2019-08-24T14:15:22Z", "measurementId": "string" }