M2X APIs
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/trailers
- https://developer.m2x.app/apis/v0/trailers
- NZ Production server (uses live data)https://m2x.app/apis/v0/trailers
- US Production server (uses live data)https://us.m2x.app/apis/v0/trailers
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/trailers
- Sandbox serverhttps://staging.m2x.app/apis/v0/trailers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.m2x.app/_mock/apis/publicapi/openapi/trailers \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
- Bulk
- Curtain Side
- Dolly
- Tanker
- Spreader
- Livestock
- Skeletal
- Flat Deck
- Trailer
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) an array of labels use to generate the vehicle groups for routing template selection
[ { "name": "T001", "disabled": false, "registration": "ABC123", "description": "Dog Trailer", "externalId": "Human searchable external id", "tareWeightKg": 0, "maxPayloadWeightKg": 0, "heightMetres": 0, "type": "Livestock", "properties": {}, "metadata": {}, "trackingProvider": "EROAD", "eroadVehicleId": null, "motiveVehicleId": null, "mtDataVehicleId": null, "samsaraVehicleId": null, "orbcommVehicleId": null, "mixTelematicsVehicleId": null, "labels": [], "readonlyFields": { … }, "physicalConfiguration": { … }, "id": "T001" } ]
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/trailers/{trailerId}
- https://developer.m2x.app/apis/v0/trailers/{trailerId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/trailers/{trailerId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/trailers/{trailerId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/trailers/{trailerId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/trailers/{trailerId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/trailers/{trailerId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
- Bulk
- Curtain Side
- Dolly
- Tanker
- Spreader
- Livestock
- Skeletal
- Flat Deck
- Trailer
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) an array of labels use to generate the vehicle groups for routing template selection
{ "name": "T001", "disabled": false, "registration": "ABC123", "description": "Dog Trailer", "externalId": "Human searchable external id", "tareWeightKg": 0, "maxPayloadWeightKg": 0, "heightMetres": 0, "type": "Bulk", "properties": {}, "metadata": {}, "trackingProvider": "EROAD", "eroadVehicleId": null, "motiveVehicleId": null, "mtDataVehicleId": null, "samsaraVehicleId": null, "orbcommVehicleId": null, "mixTelematicsVehicleId": null, "labels": [], "readonlyFields": { "name": false, "labels": false, "registration": false, "type": false, "tareWeightKg": false, "maxPayloadWeightKg": false, "heightMetres": false, "description": false, "externalId": false, "telematics": false, "axleLoadingConfig": 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 for the trailer
- Bulk
- Curtain Side
- Dolly
- Tanker
- Spreader
- Livestock
- Skeletal
- Flat Deck
- Trailer
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) an array of labels use to generate the vehicle groups for routing template selection
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/trailers/{trailerId}
- https://developer.m2x.app/apis/v0/trailers/{trailerId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/trailers/{trailerId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/trailers/{trailerId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/trailers/{trailerId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/trailers/{trailerId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/trailers/{trailerId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "T001",
"disabled": false,
"registration": "ABC123",
"description": "Dog Trailer",
"externalId": "Human searchable external id",
"tareWeightKg": 0,
"maxPayloadWeightKg": 0,
"heightMetres": 0,
"type": "Bulk",
"properties": {},
"metadata": {},
"trackingProvider": "EROAD",
"eroadVehicleId": null,
"motiveVehicleId": null,
"mtDataVehicleId": null,
"samsaraVehicleId": null,
"orbcommVehicleId": null,
"mixTelematicsVehicleId": null,
"labels": [],
"readonlyFields": {
"name": false,
"labels": false,
"registration": false,
"type": false,
"tareWeightKg": false,
"maxPayloadWeightKg": false,
"heightMetres": false,
"description": false,
"externalId": false,
"telematics": false,
"axleLoadingConfig": 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
- Dolly
- Tanker
- Spreader
- Livestock
- Skeletal
- Flat Deck
- Trailer
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) an array of labels use to generate the vehicle groups for routing template selection
{ "name": "T001", "disabled": false, "registration": "ABC123", "description": "Dog Trailer", "externalId": "Human searchable external id", "tareWeightKg": 0, "maxPayloadWeightKg": 0, "heightMetres": 0, "type": "Bulk", "properties": {}, "metadata": {}, "trackingProvider": "EROAD", "eroadVehicleId": null, "motiveVehicleId": null, "mtDataVehicleId": null, "samsaraVehicleId": null, "orbcommVehicleId": null, "mixTelematicsVehicleId": null, "labels": [], "readonlyFields": { "name": false, "labels": false, "registration": false, "type": false, "tareWeightKg": false, "maxPayloadWeightKg": false, "heightMetres": false, "description": false, "externalId": false, "telematics": false, "axleLoadingConfig": 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": [ … ] } }