M2X APIs
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders
- https://developer.m2x.app/apis/v0/orders
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders?createdFrom=2019-08-24T14%3A15%3A22Z&createdTo=2019-08-24T14%3A15%3A22Z' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
The sub components of the product if present
The branches that will be applied to the legs of the order by default. When a leg is created, all of the defaultLegBranches will be applied to the branches field of the leg. Updating the defaultLegBranches will not update the branches field of existing legs.
[ { "orderId": "string", "deleted": true, "canceled": true, "cancellationNotes": null, "cancellationReason": null, "agent": { … }, "attachments": [ … ], "bookingId": null, "customerBookingId": null, "billingEntityId": "string", "bookingEntityId": "string", "carrierId": "string", "consignmentId": "string", "customerId": "string", "customerExternalId": "string", "customerIntegrationId": "string", "customerName": "string", "created": "2019-08-24T14:15:22Z", "createdBy": "string", "updated": "2019-08-24T14:15:22Z", "externalId": "string", "externalNote": "string", "largeContractId": "string", "productCode": null, "productCodeName": null, "productCodeExternalId": null, "properties": null, "productComponents": [ … ], "quantity": 0, "legs": [ … ], "fromLocation": { … }, "toLocation": { … }, "defaultLegBranches": [ … ] } ]
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}
- https://developer.m2x.app/apis/v0/orders/{orderId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
The sub components of the product if present
The branches that will be applied to the legs of the order by default. When a leg is created, all of the defaultLegBranches will be applied to the branches field of the leg. Updating the defaultLegBranches will not update the branches field of existing legs.
{ "orderId": "string", "deleted": true, "canceled": true, "cancellationNotes": null, "cancellationReason": null, "agent": { "email": "string", "uid": "string", "phone": "string", "name": "string", "externalId": "string" }, "attachments": [ { … } ], "bookingId": null, "customerBookingId": null, "billingEntityId": "string", "bookingEntityId": "string", "carrierId": "string", "consignmentId": "string", "customerId": "string", "customerExternalId": "string", "customerIntegrationId": "string", "customerName": "string", "created": "2019-08-24T14:15:22Z", "createdBy": "string", "updated": "2019-08-24T14:15:22Z", "externalId": "string", "externalNote": "string", "largeContractId": "string", "productCode": null, "productCodeName": null, "productCodeExternalId": null, "properties": null, "productComponents": [ { … } ], "quantity": 0, "legs": [ { … } ], "fromLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "toLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "defaultLegBranches": [ { … } ] }
Create or update an order
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
The branches that will be applied to the legs of the order by default. When a leg is created, all of the defaultLegBranches will be applied to the branches field of the leg. Updating the defaultLegBranches will not update the branches field of existing legs.
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}
- https://developer.m2x.app/apis/v0/orders/{orderId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"order": {
"orderId": "string",
"externalId": "string",
"externalNote": "string",
"bookingId": "string",
"customerBookingId": "string",
"largeContractId": "string",
"quantity": 0,
"properties": null,
"metadata": null,
"fromReference": "string",
"fromDateAndTimeConstraint": {
"date": "2019-08-24",
"timezone": "Pacific/Auckland",
"timeConstraint": {}
},
"toReference": "string",
"toDateAndTimeConstraint": {
"date": "2019-08-24",
"timezone": "Pacific/Auckland",
"timeConstraint": {}
},
"shortNote": "string"
},
"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
},
"defaultLegBranches": [
{
"branchId": "string",
"externalId": "string",
"branchName": "string"
}
]
}
}'{ "orderId": "ABC123-Ilon3tVMlqfCVLC8wZFy-1698357659017" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}
- https://developer.m2x.app/apis/v0/orders/{orderId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "orderId": "ABC123-example-1737580145879" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}
- https://developer.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}
- https://developer.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F attachment=string- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}
- https://developer.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/orders/{orderId}/attachment/{attachmentId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/orders/{orderId}/attachment/{attachmentId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'