M2X APIs
- Create new vehicle
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles
- https://developer.m2x.app/apis/v0/vehicles
- NZ Production server (uses live data)https://m2x.app/apis/v0/vehicles
- US Production server (uses live data)https://us.m2x.app/apis/v0/vehicles
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/vehicles
- Sandbox serverhttps://staging.m2x.app/apis/v0/vehicles
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
- Bulk
- Curtain Side
- Tanker
- Spreader
- Livestock
- Skeletal
- Vehicle
A key value store containing bespoke properties usable for pricing and optimisation
(optional) select which telematics to use (requires relevant telematics device id to be set)
[ { "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" } ]
Update for the vehicle
- Bulk
- Curtain Side
- Tanker
- Spreader
- Livestock
- Skeletal
- Vehicle
A key value store containing bespoke properties usable for pricing and optimisation
(optional) select which telematics to use (requires relevant telematics device id to be set)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles
- https://developer.m2x.app/apis/v0/vehicles
- NZ Production server (uses live data)https://m2x.app/apis/v0/vehicles
- US Production server (uses live data)https://us.m2x.app/apis/v0/vehicles
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/vehicles
- Sandbox serverhttps://staging.m2x.app/apis/v0/vehicles
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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": 1,
"volumeM3": 4,
"offset": 1000
}
]
}
}'Successful operation
- Bulk
- Curtain Side
- Tanker
- Spreader
- Livestock
- Skeletal
- Vehicle
A key value store containing bespoke properties usable for pricing and optimisation
(optional) select which telematics to use (requires relevant telematics device id to be set)
{ "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": [ … ] } }
A key value store containing bespoke properties usable for pricing and optimisation
(optional) select which telematics to use (requires relevant telematics device id to be set)
(optional) telematics device id
(optional) telematics device id
(optional) telematics device id
(optional) telematics device id
(optional) telematics device id
(optional) telematics device id
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/vehicles/bulk
- https://developer.m2x.app/apis/v0/vehicles/bulk
- NZ Production server (uses live data)https://m2x.app/apis/v0/vehicles/bulk
- US Production server (uses live data)https://us.m2x.app/apis/v0/vehicles/bulk
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/vehicles/bulk
- Sandbox serverhttps://staging.m2x.app/apis/v0/vehicles/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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": 1,
"lengthM": 4
}
]
}
}
}
]'{ "success": true, "batchId": "ABC123" }