M2X APIs
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}
- https://developer.m2x.app/apis/v0/largeContracts/{contractId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/largeContracts/{contractId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/largeContracts/{contractId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/largeContracts/{contractId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/largeContracts/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
Unit of measure used for transport pricing e.g. metric values ea, t, kg, m3, km and imperial values ea, tn, cwt, lb, ft3, mi
Total adjustment price when specifying a fixed price. Use adjustmentPriceTotal OR adjustmentPricePerUnit + adjustmentPriceUnitOfMeasure
Unit of measure used for adjustment pricing e.g. no value allows adjustmentPricePerUnit to be specified as a decimal percentage of transport total price, metric values t, kg, km and imperial values tn, cwt, lb, mi
{ "contractId": "string", "externalId": "string", "bookingId": "string", "customerBookingId": "string", "branches": [ { … } ], "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z", "customerId": "string", "customerName": "string", "productCode": null, "productCodeName": null, "productCodeExternalId": null, "productComponents": null, "properties": null, "quantity": 0, "fromLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "fromTimeConstraint": {}, "toLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "toTimeConstraint": {}, "noteLong": "string", "noteShort": "string", "priceTotal": 0, "pricePerUnit": 0, "priceUnitOfMeasure": "string", "adjustmentPriceTotal": 0, "adjustmentPricePerUnit": 0, "adjustmentPriceUnitOfMeasure": "string", "transportPricePerUnit": 0, "validFromDate": "2019-08-24", "requiredByDate": "2019-08-24", "completed": true, "draft": true }
Create or update a large contract
Total transport price. Use priceTotal OR pricePerUnit + priceUnitOfMeasure
Unit of measure used for transport pricing e.g. metric values ea, t, kg, m3, km and imperial values ea, tn, cwt, lb, ft3, mi
Total adjustment price when specifying a fixed price. Use adjustmentPriceTotal OR adjustmentPricePerUnit + adjustmentPriceUnitOfMeasure
Unit of measure used for adjustment pricing e.g. no value allows adjustmentPricePerUnit to be specified as a decimal percentage of transport total price, metric values t, kg, km and imperial values tn, cwt, lb, mi
M2X internal tracking id for the location code used
Address, if present and no locationId or external Id is matching, will try to geocode
Helps user creating the missing mapping upon mapping failure, or used to save location if new
Try to resolve location by name, quick weak method, disabled by default
M2X internal tracking id for the location code used
Address, if present and no locationId or external Id is matching, will try to geocode
Helps user creating the missing mapping upon mapping failure, or used to save location if new
Try to resolve location by name, quick weak method, disabled by default
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}
- https://developer.m2x.app/apis/v0/largeContracts/{contractId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/largeContracts/{contractId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/largeContracts/{contractId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/largeContracts/{contractId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/largeContracts/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"contract": {
"contractId": "string",
"externalId": "string",
"bookingId": "string",
"customerBookingId": "string",
"quantity": 0,
"properties": null,
"fromTimeConstraint": {
"type": "NO_LATER_THAN",
"time": "11:52",
"start": "11:52",
"end": "14:52",
"timezone": "Pacific/Auckland"
},
"toTimeConstraint": {
"type": "NO_LATER_THAN",
"time": "11:52",
"start": "11:52",
"end": "14:52",
"timezone": "Pacific/Auckland"
},
"noteLong": "string",
"noteShort": "string",
"priceTotal": null,
"pricePerUnit": null,
"priceUnitOfMeasure": null,
"adjustmentPriceTotal": null,
"adjustmentPricePerUnit": null,
"adjustmentPriceUnitOfMeasure": null,
"transportPricePerUnit": 0,
"validFromDate": "2019-08-24",
"requiredByDate": "2019-08-24",
"draft": false,
"readonlyFields": {
"externalId": false,
"customer": false,
"product": false,
"quantity": false,
"fromLocation": false,
"fromTimeConstraint": false,
"toLocation": false,
"toTimeConstraint": false,
"properties": false,
"noteLong": false,
"noteShort": false,
"transportPricePerUnit": false,
"validFromDate": false,
"requiredByDate": false,
"deleted": false
}
},
"mappingRequests": {
"customer": {
"customerName": "Fruit World",
"customerId": "Yc7cXUulBhMM58iuOQce",
"externalId": "FTW",
"integrationId": "C99"
},
"content": null,
"product": {
"productCodeName": "string",
"productCodeId": "string",
"integrationId": "string"
},
"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
},
"branch": {
"branchId": "string",
"externalId": "string",
"branchName": "string"
}
}
}'{ "contractId": "ABC123-example-1697761533817" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}
- https://developer.m2x.app/apis/v0/largeContracts/{contractId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/largeContracts/{contractId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/largeContracts/{contractId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/largeContracts/{contractId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/largeContracts/{contractId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "contractId": "string" }