M2X APIs
- Query deliveries
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/activities/shift/{shiftId}
- https://developer.m2x.app/apis/v0/fuel/activities/shift/{shiftId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/fuel/activities/shift/{shiftId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/fuel/activities/shift/{shiftId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/fuel/activities/shift/{shiftId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/fuel/activities/shift/{shiftId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/activities/shift/{shiftId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "activities": { "starts": [ … ], "ends": [ … ], "pickups": [ … ], "deliveries": [ … ], "inventoryAdjust": [ … ] }, "shiftId": "string" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/deliveries
- https://developer.m2x.app/apis/v0/fuel/deliveries
- NZ Production server (uses live data)https://m2x.app/apis/v0/fuel/deliveries
- US Production server (uses live data)https://us.m2x.app/apis/v0/fuel/deliveries
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/fuel/deliveries
- Sandbox serverhttps://staging.m2x.app/apis/v0/fuel/deliveries
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/deliveries?start=2019-08-24&end=2019-08-24' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'[ { "id": "D001", "constraintId": "D001", "externalId": "string", "dispatchGroupId": "ABC1123-asdasdasd-123213", "deleted": true, "vehicleId": "D001", "vehicleExternalId": "string", "driver": { … }, "location": { … }, "products": [ … ], "shiftMetadata": { … }, "actual": { … } } ]
Parameters to try to map a customer with M2X
Parameters to try to map a location with M2X
M2X internal tracking id for the location code used
Address, if present and no locationId or external Id is matching, will try to geocode
Helps user creating the missing mapping upon mapping failure, or used to save location if new
Try to resolve location by name, quick weak method, disabled by default
Mapping for a delivery to a standard (non sold-as) tank
The product quantity. For a pump-from-drum product this is a count of drums and must be a whole number.
When true, the quantity provided is ignored and M2X forecasted volume is applied to the tank
The date from where the deliver will be available for dispatch, if not provided, assume today
an office note for the delivery, not going to the driver
A key value store containing bespoke properties usable for pricing and optimisation
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- https://developer.m2x.app/apis/v0/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/fuel/bulkTankDeliveryRequests/{deliveryRequestId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/bulkTankDeliveryRequests/{deliveryRequestId}' \
-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
},
"tanks": [
{
"tankName": "string",
"tankId": "string",
"integrationId": "string",
"quantity": 0,
"forecast": true,
"fixed": true,
"product": {
"productCodeName": "string",
"productCodeId": "string",
"integrationId": "string"
}
}
],
"externalId": "string",
"priority": "LOW",
"orderDay": "2019-08-24",
"targetDate": "2019-08-24",
"shortNote": "string",
"officeNotes": "string",
"properties": null,
"metadata": null,
"readonlyFields": {
"deleted": false,
"customer": false,
"location": false,
"priority": false,
"properties": false,
"externalId": false
},
"associationConstraints": [
{
"operation": "LOADING",
"entities": [
"VEHICLE"
],
"conditionType": "REQUIRE",
"constraintLabelId": "string"
}
]
}'{ "success": true }