M2X APIs
M2X APIS (1.0.0)
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/
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentId}
- https://developer.m2x.app/apis/v0/generalConsignments/{consignmentId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/generalConsignments/{consignmentId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/generalConsignments/{consignmentId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/generalConsignments/{consignmentId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/generalConsignments/{consignmentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentId}?includeLegDetails=true' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
Optional reference label for the consignment group
Example: "GRP0091892"
Internal M2X consignment id
Example: "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224"
Optional reference label for the consignment
Example: "C002901092"
Nature of work, e.g. G = general, WH = warehouse, C = container
Enum"C""G""R""W""WH"
Example: "WH"
Any additional human readable detail to be supplied with consignment
Example: "Call Bob to confirm"
Specific information about the content carted
Internal M2X product code id
Example: "Z5BFB6nUToADamO7M01G"
External product code id
Example: "FERT"
Human readable product code name
Example: "Bagged Fertiliser"
Additional detail about the product
Example: "BB SKU00390029 25kg"
Primary quantity (meaning is dependent on product code)
Example: 10
Number of pallets or bin (omit or null if not available)
Example: 10
lift (omit or null if not available)
Example: 3.78
Cube m³ (omit or null if not available)
Example: 12.58
Name of person signing (accepting responsibility)
Default null
Example: "John Doe"
User that carried out this operation, e.g. Driver
Default null
Response
application/json
{ "consignmentGroupId": "yMnAFBBcNA4VQ8NjaJYz", "groupReference": "GRP0091892", "consignmentId": "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224", "consignmentIntegrationId": "TIMB/000001/IN", "consignmentReference": "C002901092", "customerId": "Yc7cXUulBhMM58iuOQce", "customerExternalId": "FTW", "customerIntegrationId": "C99", "customerName": "Fruit World", "status": "Booked", "properties": { "serviceCode": "WH", "dangerousGoods": true, "noCharge": false, "loadShare": false }, "transportNote": "Call Bob to confirm", "content": { "payload": [ … ] }, "senderReference": "S49029", "fromLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "fromDateAndTimeConstraint": { "date": "2019-08-24", "timezone": "Pacific/Auckland", "timeConstraint": {} }, "fromRegion": "BOP", "receiverReference": "R04746", "toLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "toDateAndTimeConstraint": { "date": "2019-08-24", "timezone": "Pacific/Auckland", "timeConstraint": {} }, "toRegion": "AKL", "pod": { "delivery": { … } }, "metadata": {}, "deleted": true, "pickupTimestamp": "2019-08-24T14:15:22Z", "deliveryTimestamp": "2019-08-24T14:15:22Z", "expense": 0, "expenseFaf": 0, "revenue": 0, "revenueFaf": 0, "created": "2019-08-24T14:15:22Z", "legs": [ { … } ] }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentId}
- https://developer.m2x.app/apis/v0/generalConsignments/{consignmentId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/generalConsignments/{consignmentId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/generalConsignments/{consignmentId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/generalConsignments/{consignmentId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/generalConsignments/{consignmentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentIntegrationId}
- https://developer.m2x.app/apis/v0/generalConsignments/{consignmentIntegrationId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/generalConsignments/{consignmentIntegrationId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/generalConsignments/{consignmentIntegrationId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/generalConsignments/{consignmentIntegrationId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/generalConsignments/{consignmentIntegrationId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentIntegrationId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"generalConsignment": {
"integrationId": "string",
"consignmentReference": "C002901092",
"properties": {
"serviceCode": "WH",
"dangerousGoods": true,
"noCharge": false,
"loadShare": false
},
"transportNote": "Call Bob to confirm",
"senderReference": "S49029",
"fromDateAndTimeConstraint": {
"date": "2019-08-24",
"timezone": "Pacific/Auckland",
"timeConstraint": {}
},
"receiverReference": "R04746",
"toDateAndTimeConstraint": {
"date": "2019-08-24",
"timezone": "Pacific/Auckland",
"timeConstraint": {}
},
"metadata": {}
},
"mappingRequests": {
"customer": {
"customerName": "Fruit World",
"customerId": "Yc7cXUulBhMM58iuOQce",
"externalId": "FTW",
"integrationId": "C99"
},
"fromLocation": {
"locationId": "C6mruxd3AVUTW14vEZ0v",
"addressText": "123 Example Road, Auckland 1010",
"externalId": "WHC6",
"locationName": "Auckland Storage 1",
"latitude": -36.983882,
"longitude": 174.709879,
"locationNameResolutionEnabled": false,
"saveIfUnknown": false
},
"toLocation": {
"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": {
"payload": [
{
"description": "BB SKU00390029 25kg",
"measures": {
"items": 10,
"pltOrBin": 10,
"lift": 3.78,
"volume": 12.58,
"mass": 8500
},
"product": {
"productCode": "Z5BFB6nUToADamO7M01G",
"productCodeExternalId": "FERT",
"productDescription": "Palletized fertiliser bags (10kg)"
}
}
]
}
}
}'Response
application/json
{ "consignmentId": "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224" }