Skip to content

M2X APIS (1.0.0)

M2X APIs

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/

Analytics

Analytics data

Operations

Billing Groups

Invoiceable unit used by the system

Operations

Bookings

Bookings information

Operations

Carrier Bookings

Corporate bookings received by carriers

Operations

Carrier Large Contracts

Carrier large contracts

Operations

Carrier Orders

Carrier orders

Operations

Corporate Planning

Corporate Planning supplies and demands

Operations

Customer Bookings

Customer bookings on carriers

Operations

Customers

Customers used for invoices

Operations

Drivers

Drivers information

Operations

Fuel

Fuel deliveries management

Operations

Fulfilment Requests

Fulfilment request on carriers

OperationsWebhooks

General Consignments

General consignments

Operations

ISO containers

ISO containers information

Operations

Jobs

Vehicle units of work

OperationsWebhooks

Locations

Locations information

Operations

Master Bookings

Master bookings

OperationsWebhooks

Offers

Corporate monetary offers to carriers

OperationsWebhooks

Products

Products used by the system

Operations

Runs

Runs management

Operations

Subcontractors

Subcontractors information

Operations

Tractor Unit

Tractor units information

Operations

Trailer

Trailers information

Operations

Transaction

Transaction management

Operations

Vehicle

Vehicles information

Operations

Get vehicles list

Request

Security
M2X_auth_application
curl -i -X GET \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
vehicleIdstringrequired

Human identifier for the vehicle

Example: "L001"
disabledbooleanrequired
Example: false
registrationstring or null
Example: "ABC123"
externalIdstring or null
Example: "Human searchable external id"
tareWeightKgnumber
Default 0
maxPayloadWeightKgnumber
Default 0
heightMetresnumber
Default 0
typestringrequired
Enum"Livestock""Bulk""Curtain Side""Tanker""Skeletal""Spreader"
Discriminator
propertiesobject

A key value store containing bespoke properties usable for pricing and optimisation

Default {}
metadataobject

Opaque passenger data

Default {}
updatedstring(date-time)
depotIdstring or null

The depot id

Example: "fewa8fewhaea"
vinstring or null

The VIN

Example: "ABC123"
trackingProviderstring or null

(optional) select which telematics to use (requires relevant telematics device id to be set)

Default "NONE"
Enum"EROAD""MOTIVE""MTDATA""SAMSARA""ORBCOMM""MIX_TELEMATICS""NONE"
eroadVehicleIdstring or null

(optional) telematics device id

Default null
motiveVehicleIdstring or null

(optional) telematics device id

Default null
mtDataVehicleIdstring or null

(optional) telematics device id

Default null
samsaraVehicleIdstring or null

(optional) telematics device id

Default null
orbcommVehicleIdstring or null

(optional) telematics device id

Default null
mixTelematicsVehicleIdstring or null

(optional) telematics device id

Default null
readonlyFieldsobject

Specifies which field should not be touched by the user

physicalConfigurationobject(BulkPhysicalConfiguration)
]
Response
application/json
[ { "vehicleId": "L001", "disabled": false, "registration": "ABC123", "externalId": "Human searchable external id", "tareWeightKg": 0, "maxPayloadWeightKg": 0, "heightMetres": 0, "type": "Livestock", "properties": {}, "metadata": {}, "updated": "2019-08-24T14:15:22Z", "depotId": "fewa8fewhaea", "vin": "ABC123", "trackingProvider": "EROAD", "eroadVehicleId": null, "motiveVehicleId": null, "mtDataVehicleId": null, "samsaraVehicleId": null, "orbcommVehicleId": null, "mixTelematicsVehicleId": null, "readonlyFields": { … }, "physicalConfiguration": { … }, "id": "L001" } ]

Create new vehicle

Request

Security
M2X_auth_application
Bodyapplication/jsonrequired

Update for the vehicle

vehicleIdstringrequired

Human identifier for the vehicle

Example: "L001"
disabledbooleanrequired
Example: false
registrationstring or null
Example: "ABC123"
externalIdstring or null
Example: "Human searchable external id"
tareWeightKgnumber
Default 0
maxPayloadWeightKgnumber
Default 0
heightMetresnumber
Default 0
typestringrequired
Enum"Livestock""Bulk""Curtain Side""Tanker""Skeletal""Spreader"
Discriminator
propertiesobject

A key value store containing bespoke properties usable for pricing and optimisation

Default {}
metadataobject

Opaque passenger data

Default {}
updatedstring(date-time)
depotIdstring or null

The depot id

Example: "fewa8fewhaea"
vinstring or null

The VIN

Example: "ABC123"
trackingProviderstring or null

(optional) select which telematics to use (requires relevant telematics device id to be set)

Default "NONE"
Enum"EROAD""MOTIVE""MTDATA""SAMSARA""ORBCOMM""MIX_TELEMATICS""NONE"
eroadVehicleIdstring or null

(optional) telematics device id

Default null
motiveVehicleIdstring or null

(optional) telematics device id

Default null
mtDataVehicleIdstring or null

(optional) telematics device id

Default null
samsaraVehicleIdstring or null

(optional) telematics device id

Default null
orbcommVehicleIdstring or null

(optional) telematics device id

Default null
mixTelematicsVehicleIdstring or null

(optional) telematics device id

Default null
readonlyFieldsobject

Specifies which field should not be touched by the user

physicalConfigurationobject(BulkPhysicalConfiguration)
curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "vehicleId": "L001",
    "disabled": false,
    "registration": "ABC123",
    "externalId": "Human searchable external id",
    "tareWeightKg": 0,
    "maxPayloadWeightKg": 0,
    "heightMetres": 0,
    "type": "Bulk",
    "properties": {},
    "metadata": {},
    "updated": "2019-08-24T14:15:22Z",
    "depotId": "fewa8fewhaea",
    "vin": "ABC123",
    "trackingProvider": "EROAD",
    "eroadVehicleId": null,
    "motiveVehicleId": null,
    "mtDataVehicleId": null,
    "samsaraVehicleId": null,
    "orbcommVehicleId": null,
    "mixTelematicsVehicleId": null,
    "readonlyFields": {
      "vehicleId": false,
      "registration": false,
      "vin": false,
      "type": false,
      "tareWeightKg": false,
      "maxPayloadWeightKg": false,
      "heightMetres": false,
      "weightClass": false,
      "base": false,
      "externalId": false,
      "telematics": false,
      "compartments": false
    },
    "physicalConfiguration": {
      "heightMetres": 2.1,
      "tareWeightKg": 1000,
      "maxPayloadWeightKg": 30000,
      "axleLoadingConfig": null,
      "frontAxle": null,
      "distanceFromFrontAxle": 7800,
      "frontAxleMaxLoadKg": 6000,
      "frontTareKg": 4000,
      "rearAxleMaxLoadKg": 18000,
      "rearConnection": "Shared Axle",
      "rearTareKg": 6000,
      "wheelbase": 8000,
      "compartments": [
        {
          "compartmentId": "asd123",
          "name": "acme compartment",
          "volumeM3": 4,
          "offset": 1000
        }
      ]
    }
  }'

Responses

Successful operation

Bodyapplication/json
vehicleIdstringrequired

Human identifier for the vehicle

Example: "L001"
disabledbooleanrequired
Example: false
registrationstring or null
Example: "ABC123"
externalIdstring or null
Example: "Human searchable external id"
tareWeightKgnumber
Default 0
maxPayloadWeightKgnumber
Default 0
heightMetresnumber
Default 0
typestringrequired
Enum"Livestock""Bulk""Curtain Side""Tanker""Skeletal""Spreader"
Discriminator
propertiesobject

A key value store containing bespoke properties usable for pricing and optimisation

Default {}
metadataobject

Opaque passenger data

Default {}
updatedstring(date-time)
depotIdstring or null

The depot id

Example: "fewa8fewhaea"
vinstring or null

The VIN

Example: "ABC123"
trackingProviderstring or null

(optional) select which telematics to use (requires relevant telematics device id to be set)

Default "NONE"
Enum"EROAD""MOTIVE""MTDATA""SAMSARA""ORBCOMM""MIX_TELEMATICS""NONE"
eroadVehicleIdstring or null

(optional) telematics device id

Default null
motiveVehicleIdstring or null

(optional) telematics device id

Default null
mtDataVehicleIdstring or null

(optional) telematics device id

Default null
samsaraVehicleIdstring or null

(optional) telematics device id

Default null
orbcommVehicleIdstring or null

(optional) telematics device id

Default null
mixTelematicsVehicleIdstring or null

(optional) telematics device id

Default null
readonlyFieldsobject

Specifies which field should not be touched by the user

physicalConfigurationobject(BulkPhysicalConfiguration)
Response
application/json
{ "vehicleId": "L001", "disabled": false, "registration": "ABC123", "externalId": "Human searchable external id", "tareWeightKg": 0, "maxPayloadWeightKg": 0, "heightMetres": 0, "type": "Bulk", "properties": {}, "metadata": {}, "updated": "2019-08-24T14:15:22Z", "depotId": "fewa8fewhaea", "vin": "ABC123", "trackingProvider": "EROAD", "eroadVehicleId": null, "motiveVehicleId": null, "mtDataVehicleId": null, "samsaraVehicleId": null, "orbcommVehicleId": null, "mixTelematicsVehicleId": null, "readonlyFields": { "vehicleId": false, "registration": false, "vin": false, "type": false, "tareWeightKg": false, "maxPayloadWeightKg": false, "heightMetres": false, "weightClass": false, "base": false, "externalId": false, "telematics": false, "compartments": false }, "physicalConfiguration": { "heightMetres": 2.1, "tareWeightKg": 1000, "maxPayloadWeightKg": 30000, "axleLoadingConfig": null, "frontAxle": null, "distanceFromFrontAxle": 7800, "frontAxleMaxLoadKg": 6000, "frontTareKg": 4000, "rearAxleMaxLoadKg": 18000, "rearConnection": "Shared Axle", "rearTareKg": 6000, "wheelbase": 8000, "compartments": [ … ] } }

Update vehicles bulk

Request

Security
M2X_auth_application
Bodyapplication/jsonArray [
idstringrequired
vehicleobject(VehicleRequest)required
One of:
vehicle.​vehicleIdstringrequired

Human identifier for the vehicle

Example: "L001"
vehicle.​disabledbooleanrequired
Example: false
vehicle.​registrationstring or null
Example: "ABC123"
vehicle.​externalIdstring or null
Example: "Human searchable external id"
vehicle.​tareWeightKgnumber
Default 0
vehicle.​maxPayloadWeightKgnumber
Default 0
vehicle.​heightMetresnumber
Default 0
vehicle.​typestringrequired
Enum"Livestock""Bulk""Curtain Side""Tanker""Skeletal""Spreader"
vehicle.​propertiesobject

A key value store containing bespoke properties usable for pricing and optimisation

Default {}
vehicle.​metadataobject

Opaque passenger data

Default {}
vehicle.​updatedstring(date-time)
vehicle.​depotIdstring or null

The depot id

Example: "fewa8fewhaea"
vehicle.​vinstring or null

The VIN

Example: "ABC123"
vehicle.​trackingProviderstring or null

(optional) select which telematics to use (requires relevant telematics device id to be set)

Default "NONE"
Enum"EROAD""MOTIVE""MTDATA""SAMSARA""ORBCOMM""MIX_TELEMATICS""NONE"
vehicle.​eroadVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​motiveVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​mtDataVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​samsaraVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​orbcommVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​mixTelematicsVehicleIdstring or null

(optional) telematics device id

Default null
vehicle.​readonlyFieldsobject

Specifies which field should not be touched by the user

vehicle.​physicalConfigurationobject(SkeletalPhysicalConfiguration)
]
curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles/bulk \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "string",
      "vehicle": {
        "vehicleId": "L001",
        "disabled": false,
        "registration": "ABC123",
        "externalId": "Human searchable external id",
        "tareWeightKg": 0,
        "maxPayloadWeightKg": 0,
        "heightMetres": 0,
        "type": "Livestock",
        "properties": {},
        "metadata": {},
        "updated": "2019-08-24T14:15:22Z",
        "depotId": "fewa8fewhaea",
        "vin": "ABC123",
        "trackingProvider": "EROAD",
        "eroadVehicleId": null,
        "motiveVehicleId": null,
        "mtDataVehicleId": null,
        "samsaraVehicleId": null,
        "orbcommVehicleId": null,
        "mixTelematicsVehicleId": null,
        "readonlyFields": {
          "vehicleId": false,
          "registration": false,
          "vin": false,
          "type": false,
          "tareWeightKg": false,
          "maxPayloadWeightKg": false,
          "heightMetres": false,
          "weightClass": false,
          "base": false,
          "externalId": false,
          "telematics": false,
          "compartments": false
        },
        "physicalConfiguration": {
          "heightMetres": 2.1,
          "tareWeightKg": 1000,
          "maxPayloadWeightKg": 30000,
          "compartments": [
            {
              "compartmentId": "asd123",
              "name": "acme compartment",
              "lengthM": 4
            }
          ]
        }
      }
    }
  ]'

Responses

Successful operation

Bodyapplication/json
successboolean
Example: true
batchIdstring
Example: "ABC123"
Response
application/json
{ "success": true, "batchId": "ABC123" }

Vehicle Execution Statements

Unit of execution for trucks

OperationsWebhooks

Consignments

Webhooks