M2X APIs
- Query deliveries
Query fuel activities
Query fuel activities by vehicle
Query fuel activities by shift (Webhook DTO)
Upsert a delivery request that references tanks at the delivery location
Get a bulk tank delivery request by delivery request ID
Delete bulk tank delivery request
Upsert a bulk delivery request that does not reference any tanks at the delivery location
Get a bulk delivery request that does not reference any tanks at the delivery location
Delete delivery request that does not reference any tanks at the delivery location
Upsert Delivery Request
Delete Delivery
Reads Delivery Request
query deliveries belonging to a request
query deliveries belonging to a request
Reads Delivery
Query pickups
Query pickups
Query pickups, inventory adjustments, and deliveries for a trip
Query storages for a location
Create/update storage for a location
Create/update a measurement for a storage
Upsert Delivery Request
Delete Delivery
Reads Delivery Request
Upsert Delivery
Delete Delivery
Fuel pickup webhook
Fuel delivery webhook
Fuel dispatch group checked webhook
Fuel shift checked webhook
Query deliveries
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/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>'Response
application/json
{ "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>'Response
application/json
[ { "id": "D001", "constraintId": "D001", "externalId": "string", "dispatchGroupId": "ABC1123-asdasdasd-123213", "deleted": true, "vehicleId": "D001", "vehicleExternalId": "string", "driver": { … }, "location": { … }, "products": [ … ], "shiftMetadata": { … }, "actual": { … } } ]
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/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",
"product": {
"productCodeName": "string",
"productCodeId": "string",
"integrationId": "string"
},
"quantity": 0
}
],
"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
},
"associationConstraints": [
{
"operation": "LOADING",
"entities": [
"VEHICLE"
],
"conditionType": "REQUIRE",
"constraintLabelId": "string"
}
]
}'Response
application/json
{ "success": true }