Skip to content
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/
Operations

Billing Groups

Invoiceable unit used by the system

Operations
Operations

Carrier Bookings

Corporate bookings received by carriers

Operations

Carrier Large Contracts

Carrier large contracts

Operations
Operations

Corporate Planning

Corporate Planning supplies and demands

Operations

Customer Bookings

Customer bookings on carriers

Operations

Customers

Customers used for invoices

Operations
Operations
Operations

Fulfilment Requests

Fulfilment request on carriers

OperationsWebhooks

General Consignments

General consignments

Operations

ISO containers

ISO containers information

Operations
OperationsWebhooks
Operations
OperationsWebhooks

Offers

Corporate monetary offers to carriers

OperationsWebhooks

Products

Products used by the system

Operations
Operations

Request

Security
M2X_auth_application
Query
startstring(date)required

Start of the queried interval (YYYY-MM-DD)

endstring(date)required

End of the queried interval (YYYY-MM-DD)

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>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring
Example: "D001"
departureTimestring or null(date-time)
arrivalTimestring or null(date-time)
deletedboolean
typestring
Enum"pickup""delivery""start""end"
constraintIdstring or null
Example: "D001"
dispatchGroupIdstring or null
Example: "ABC1123-asdasdasd-123213"
vehicleIdstring
Example: "D001"
locationobject(JobLocation)
productnull or DynamicFulfilmentProduct (object)
Any of:
null
productComponentsArray of objects or null(ProductComponent)

The sub components of the product if present

productSpatialRequirementnumber or null
totalProductSpatialRequirementnumber or null
shiftMetadataobject(ShiftMetadata)
actualobject or null
timeConstraintActivityTimeConstraint (object) or null
Any of:
object ActivityTimeConstraint Recursive
firstPublishedStateDynamicFulfilmentActivityPublishedState (object) or null
Any of:

Details about the activity as it was when it was published for the first time

object DynamicFulfilmentActivityPublishedState Recursive
]
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": { … } } ]

Request

Security
M2X_auth_application
Path
pickupIdstringrequired

The unique pickup Id

Bodyapplication/json
customerobject(CarrierCustomerMappingRequest)required
customer.​customerNamestring
Example: "Fruit World"
customer.​customerIdstring
Example: "Yc7cXUulBhMM58iuOQce"
customer.​externalIdstring
Example: "FTW"
customer.​integrationIdstring
Example: "C99"
locationobject(CarrierLocationMappingRequest)required
location.​locationIdstring or null

M2X internal tracking id for the location code used

Default null
Example: "C6mruxd3AVUTW14vEZ0v"
location.​addressTextstring or null

Address, if present and no locationId or external Id is matching, will try to geocode

Default null
Example: "123 Example Road, Auckland 1010"
location.​externalIdstring or null

External Id

Default null
Example: "WHC6"
location.​locationNamestring or null

Helps user creating the missing mapping upon mapping failure, or used to save location if new

Default null
Example: "Auckland Storage 1"
location.​latitudenumber
Default 0
Example: -36.983882
location.​longitudenumber
Default 0
Example: 174.709879
location.​locationNameResolutionEnabledboolean

Try to resolve location by name, quick weak method, disabled by default

Default false
location.​saveIfUnknownboolean

If no existing location is found, locationId provided and lat/lng provided or geocode successful, will create location

Default false
contentobject or null(CarrierContentMappingRequest)
productobject(CarrierProductMappingRequest)required
product.​productCodeNamestring
product.​productCodeIdstring
product.​integrationIdstring
quantitynumberrequired
externalIdnumber
prioritystring(DynamicFulfilmentActivityPriority)
Enum"LOW""MEDIUM""HIGH"
orderDaystring(date)(DynamicFulfilmentOrderDay)
readonlyFieldsobject

Specifies which field should not be touched by the user

propertiesobject or null(CustomProperties)
metadataobject or null(Metadata)
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
  }'

Responses

Successful Operation

Bodyapplication/json
successboolean
Example: true
Response
application/json
{ "success": true }

Request

Security
M2X_auth_application
Path
pickupIdstringrequired

The unique pickup Id

curl -i -X DELETE \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/{pickupId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful Operation

Bodyapplication/json
successboolean
Example: true
Response
application/json
{ "success": true }

Request

Security
M2X_auth_application
Path
collectionIdstringrequired

The unique Id of the collection

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/runs/pickups/collections/truckDairyPump/{collectionId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
locationExternalIdstringrequired
locationNamestringrequired
toLocationExternalIdstring
toLocationNamestring
truckNamestringrequired
truckExternalIdstring
driverNamestring
driverExternalIdstring
customerNamestring
serviceDaystring(date)

The day the pickup belongs to in case of after midnight

startTimestring(date-time)required
endTimestring(date-time)required
productQuantitynumberrequired
customerRunNumberstring
internalRunNumberstring
propertiesobject
metadataobject
measurementsobject
updatedstring(date-time)
measurementIdstring
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" }

Request

Security
M2X_auth_application
Path
collectionIdstringrequired

The unique Id of the collection to ensure idempotence

Bodyapplication/jsonrequired

Update for the collection

locationExternalIdstringrequired
locationNamestringrequired
toLocationExternalIdstring
toLocationNamestring
truckNamestringrequired
truckExternalIdstring
driverNamestring
driverExternalIdstring
customerNamestring
serviceDaystring(date)

The day the pickup belongs to in case of after midnight

startTimestring(date-time)required
endTimestring(date-time)required
productQuantitynumberrequired
customerRunNumberstring
internalRunNumberstring
propertiesobject
metadataobject
measurementsobject
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
    }
  }'

Responses

Successful operation

Bodyapplication/json
locationExternalIdstringrequired
locationNamestringrequired
toLocationExternalIdstring
toLocationNamestring
truckNamestringrequired
truckExternalIdstring
driverNamestring
driverExternalIdstring
customerNamestring
serviceDaystring(date)

The day the pickup belongs to in case of after midnight

startTimestring(date-time)required
endTimestring(date-time)required
productQuantitynumberrequired
customerRunNumberstring
internalRunNumberstring
propertiesobject
metadataobject
measurementsobject
updatedstring(date-time)
measurementIdstring
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" }

Subcontractors

Subcontractors information

Operations

Tractor Unit

Tractor units information

Operations
Operations
Operations
Operations

Vehicle Execution Statements

Unit of execution for trucks

OperationsWebhooks
Webhooks