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

Subcontractors

Subcontractors information

Operations

Tractor Unit

Tractor units information

Operations
Operations
Operations
Operations

Vehicle Execution Statements

Unit of execution for trucks

OperationsWebhooks

Find vehicle timeline statement by ID

Request

Security
M2X_auth_application
Path
vehicleTimelineStatementIdstringrequired

The vehicle execution statement Id

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicleTimelineStatements/{vehicleTimelineStatementId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstringrequired
vehicleIdstringrequired
serviceDaystringrequired
deletedbooleanrequired
typestringrequired
Enum"SERVICE""PICKUP""DELIVERY""START""END"
subTypesArray of stringsrequired
Items Enum"CLEAN""WAYPOINT""TRAILER_SWAP""DRIVER_SWAP""ISO_CONTAINER_SWAP"
inboundAssetsobject(ExecutionAssets)required
inboundAssets.​driverobject(Asset)
inboundAssets.​tractorUnitobject(Asset)
inboundAssets.​trailersArray of objects(Asset)
inboundAssets.​miscAssetsArray of objects(Asset)
inboundAssets.​isoContainersArray of objects(Asset)
outboundAssetsobject(ExecutionAssets)required
outboundAssets.​driverobject(Asset)
outboundAssets.​tractorUnitobject(Asset)
outboundAssets.​trailersArray of objects(Asset)
outboundAssets.​miscAssetsArray of objects(Asset)
outboundAssets.​isoContainersArray of objects(Asset)
arrivalTimestampstring(date-time)
statementTypestringrequired
Enum"BOOKED""VEHICLE""RECONCILED""EXECUTION_CHECKED""DISPATCHER_OVERRIDE"
jobIdActionedstring
jobIdsOnBoardArray of strings
mapIdstring
fromLocationobject(VehicleTimelineStatementLocation)required
fromLocation.​addressTextstringrequired
fromLocation.​latitudenumberrequired
Default 0
fromLocation.​namestringrequired
fromLocation.​locationIdstring or null

The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID.

fromLocation.​externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

fromLocation.​longitudenumberrequired
Default 0
fromLocation.​timezonestring or null

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
fromLocation.​ownerIdstring or null

The M2X internal location owner id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location Owner ID.

fromLocation.​versionstring or null

The version of the location. This is used to track changes to the location.

toLocationobject(VehicleTimelineStatementLocation)required
toLocation.​addressTextstringrequired
toLocation.​latitudenumberrequired
Default 0
toLocation.​namestringrequired
toLocation.​locationIdstring or null

The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID.

toLocation.​externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

toLocation.​longitudenumberrequired
Default 0
toLocation.​timezonestring or null

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
toLocation.​ownerIdstring or null

The M2X internal location owner id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location Owner ID.

toLocation.​versionstring or null

The version of the location. This is used to track changes to the location.

metricsobjectrequired
metrics.​distanceMetersnumber
metrics.​driveDurationSecondsnumber
metrics.​payloadKgnumber
metrics.​queueDurationSecondsnumber
metrics.​waitDurationSecondsnumber
metrics.​serviceDurationSecondsnumber
referencesobject
timeOnSiteobject or null
]
Response
application/json
[ { "id": "string", "vehicleId": "string", "serviceDay": "string", "deleted": true, "type": "SERVICE", "subTypes": [], "inboundAssets": {}, "outboundAssets": {}, "arrivalTimestamp": "2019-08-24T14:15:22Z", "statementType": "BOOKED", "jobIdActioned": "string", "jobIdsOnBoard": [], "mapId": "string", "fromLocation": {}, "toLocation": {}, "metrics": {}, "references": {}, "timeOnSite": {} } ]

Find vehicle timeline statement allocation by ID

Request

Security
M2X_auth_application
Path
vehicleTimelineStatementsAllocationIdstringrequired

The vehicle execution statements allocation ID

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicleTimelineStatementsAllocations/{vehicleTimelineStatementsAllocationId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
idstringrequired
vehicleIdstringrequired
deletedbooleanrequired
jobsArray of objects(ExecutionAllocation)required
jobs[].​idstringrequired
jobs[].​allocationobjectrequired
jobs[].​allocation.​costnumberrequired
jobs[].​allocation.​distanceMetersnumberrequired
jobs[].​allocation.​durationSecondsnumberrequired
jobs[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementsArray of objects(ExecutionAllocation)required
vehicleTimelineStatements[].​idstringrequired
vehicleTimelineStatements[].​allocationobjectrequired
vehicleTimelineStatements[].​allocation.​costnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersnumberrequired
vehicleTimelineStatements[].​allocation.​durationSecondsnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersWeightKgnumberrequired
Response
application/json
{ "id": "string", "vehicleId": "string", "deleted": true, "jobs": [ {} ], "vehicleTimelineStatements": [ {} ] }

Find vehicle timeline statement allocation details by ID

Request

Security
M2X_auth_application
Path
vehicleTimelineStatementsAllocationIdstringrequired

The vehicle execution statements allocation ID

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicleTimelineStatementsAllocations/{vehicleTimelineStatementsAllocationId}/details' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
idstringrequired
vehicleIdstringrequired
deletedbooleanrequired
jobsArray of objects(ExecutionAllocation)required
jobs[].​idstringrequired
jobs[].​allocationobjectrequired
jobs[].​allocation.​costnumberrequired
jobs[].​allocation.​distanceMetersnumberrequired
jobs[].​allocation.​durationSecondsnumberrequired
jobs[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementsArray of objects(ExecutionAllocation)required
vehicleTimelineStatements[].​idstringrequired
vehicleTimelineStatements[].​allocationobjectrequired
vehicleTimelineStatements[].​allocation.​costnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersnumberrequired
vehicleTimelineStatements[].​allocation.​durationSecondsnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementDetailsArray of objects(VehicleTimelineStatement)
Response
application/json
{ "id": "string", "vehicleId": "string", "deleted": true, "jobs": [ {} ], "vehicleTimelineStatements": [ {} ], "vehicleTimelineStatementDetails": [ {} ] }

Vehicle timeline statement webhookWebhook

Request

webhook type: VEHICLE_TIMELINE_STATEMENT

Bodyapplication/jsonrequired
idstringrequired
vehicleIdstringrequired
serviceDaystringrequired
deletedbooleanrequired
typestringrequired
Enum"SERVICE""PICKUP""DELIVERY""START""END"
subTypesArray of stringsrequired
Items Enum"CLEAN""WAYPOINT""TRAILER_SWAP""DRIVER_SWAP""ISO_CONTAINER_SWAP"
inboundAssetsobject(ExecutionAssets)required
inboundAssets.​driverobject(Asset)
inboundAssets.​tractorUnitobject(Asset)
inboundAssets.​trailersArray of objects(Asset)
inboundAssets.​miscAssetsArray of objects(Asset)
inboundAssets.​isoContainersArray of objects(Asset)
outboundAssetsobject(ExecutionAssets)required
outboundAssets.​driverobject(Asset)
outboundAssets.​tractorUnitobject(Asset)
outboundAssets.​trailersArray of objects(Asset)
outboundAssets.​miscAssetsArray of objects(Asset)
outboundAssets.​isoContainersArray of objects(Asset)
arrivalTimestampstring(date-time)
statementTypestringrequired
Enum"BOOKED""VEHICLE""RECONCILED""EXECUTION_CHECKED""DISPATCHER_OVERRIDE"
jobIdActionedstring
jobIdsOnBoardArray of strings
mapIdstring
fromLocationobject(VehicleTimelineStatementLocation)required
fromLocation.​addressTextstringrequired
fromLocation.​latitudenumberrequired
Default 0
fromLocation.​namestringrequired
fromLocation.​locationIdstring or null

The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID.

fromLocation.​externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

fromLocation.​longitudenumberrequired
Default 0
fromLocation.​timezonestring or null

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
fromLocation.​ownerIdstring or null

The M2X internal location owner id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location Owner ID.

fromLocation.​versionstring or null

The version of the location. This is used to track changes to the location.

toLocationobject(VehicleTimelineStatementLocation)required
toLocation.​addressTextstringrequired
toLocation.​latitudenumberrequired
Default 0
toLocation.​namestringrequired
toLocation.​locationIdstring or null

The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID.

toLocation.​externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

toLocation.​longitudenumberrequired
Default 0
toLocation.​timezonestring or null

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
toLocation.​ownerIdstring or null

The M2X internal location owner id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location Owner ID.

toLocation.​versionstring or null

The version of the location. This is used to track changes to the location.

metricsobjectrequired
metrics.​distanceMetersnumber
metrics.​driveDurationSecondsnumber
metrics.​payloadKgnumber
metrics.​queueDurationSecondsnumber
metrics.​waitDurationSecondsnumber
metrics.​serviceDurationSecondsnumber
referencesobject
timeOnSiteobject or null
application/json
{ "id": "string", "vehicleId": "string", "serviceDay": "string", "deleted": true, "type": "SERVICE", "subTypes": [ "CLEAN" ], "inboundAssets": { "driver": {}, "tractorUnit": {}, "trailers": [], "miscAssets": [], "isoContainers": [] }, "outboundAssets": { "driver": {}, "tractorUnit": {}, "trailers": [], "miscAssets": [], "isoContainers": [] }, "arrivalTimestamp": "2019-08-24T14:15:22Z", "statementType": "BOOKED", "jobIdActioned": "string", "jobIdsOnBoard": [ "string" ], "mapId": "string", "fromLocation": { "addressText": "string", "latitude": 0, "name": "string", "locationId": "string", "externalId": "string", "longitude": 0, "timezone": "Pacific/Auckland", "ownerId": "string", "version": "string" }, "toLocation": { "addressText": "string", "latitude": 0, "name": "string", "locationId": "string", "externalId": "string", "longitude": 0, "timezone": "Pacific/Auckland", "ownerId": "string", "version": "string" }, "metrics": { "distanceMeters": 0, "driveDurationSeconds": 0, "payloadKg": 0, "queueDurationSeconds": 0, "waitDurationSeconds": 0, "serviceDurationSeconds": 0 }, "references": { "deliveryReference": "string", "fromReference": "string", "toReference": "string" }, "timeOnSite": { "arrivalTimestamp": "2019-08-24T14:15:22Z", "departureTimestamp": "2019-08-24T14:15:22Z" } }

Responses

Webhook received successfully

Vehicle timeline statements allocation webhookWebhook

Request

webhook type: VEHICLE_TIMELINE_STATEMENTS_ALLOCATION

Bodyapplication/jsonrequired
idstringrequired
vehicleIdstringrequired
deletedbooleanrequired
jobsArray of objects(ExecutionAllocation)required
jobs[].​idstringrequired
jobs[].​allocationobjectrequired
jobs[].​allocation.​costnumberrequired
jobs[].​allocation.​distanceMetersnumberrequired
jobs[].​allocation.​durationSecondsnumberrequired
jobs[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementsArray of objects(ExecutionAllocation)required
vehicleTimelineStatements[].​idstringrequired
vehicleTimelineStatements[].​allocationobjectrequired
vehicleTimelineStatements[].​allocation.​costnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersnumberrequired
vehicleTimelineStatements[].​allocation.​durationSecondsnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersWeightKgnumberrequired
application/json
{ "id": "string", "vehicleId": "string", "deleted": true, "jobs": [ {} ], "vehicleTimelineStatements": [ {} ] }

Responses

Webhook received successfully

Vehicle timeline statements allocation details webhookWebhook

Request

webhook type: VEHICLE_TIMELINE_STATEMENTS_ALLOCATION_DETAILS

Bodyapplication/jsonrequired
idstringrequired
vehicleIdstringrequired
deletedbooleanrequired
jobsArray of objects(ExecutionAllocation)required
jobs[].​idstringrequired
jobs[].​allocationobjectrequired
jobs[].​allocation.​costnumberrequired
jobs[].​allocation.​distanceMetersnumberrequired
jobs[].​allocation.​durationSecondsnumberrequired
jobs[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementsArray of objects(ExecutionAllocation)required
vehicleTimelineStatements[].​idstringrequired
vehicleTimelineStatements[].​allocationobjectrequired
vehicleTimelineStatements[].​allocation.​costnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersnumberrequired
vehicleTimelineStatements[].​allocation.​durationSecondsnumberrequired
vehicleTimelineStatements[].​allocation.​distanceMetersWeightKgnumberrequired
vehicleTimelineStatementDetailsArray of objects(VehicleTimelineStatement)
application/json
{ "id": "string", "vehicleId": "string", "deleted": true, "jobs": [ {} ], "vehicleTimelineStatements": [ {} ], "vehicleTimelineStatementDetails": [ {} ] }

Responses

Webhook received successfully

Webhooks