M2X APIs
- DEPRECATED, use PUT instead - update/create bookings bulk
Get bookings list
Find booking by ID
Update/create booking by ID
Delete booking by ID
Get the integration status of a batch
Get the integration status of a booking
Get events in booking by bookingId
Find event by ID
Update/create event by ID
Mark event as canceled by ID
Get booking attachments metadata
Add attachment to booking
Delete booking attachment by ID
DEPRECATED, use PUT instead - create new booking
DEPRECATED, use PUT instead - create and event for a booking
Bookings (carrier allocation webhook)
Corporate booking event webhook
DEPRECATED, use PUT inste...
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/
Bodyapplication/jsonrequired
Update for the booking
Request timestamp, useful to discard stale updates than were made offline and came online later
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/bookings
- https://developer.m2x.app/apis/v0/bookings
- NZ Production server (uses live data)https://m2x.app/apis/v0/bookings
- US Production server (uses live data)https://us.m2x.app/apis/v0/bookings
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/bookings
- Sandbox serverhttps://staging.m2x.app/apis/v0/bookings
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://developer.m2x.app/_mock/apis/publicapi/openapi/bookings \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"booking": {
"agent": {
"email": "string",
"uid": "string",
"phone": "string",
"name": "string",
"externalId": "string"
},
"externalReference": "string",
"externalNote": "string",
"carrierId": "string",
"canceled": true,
"completed": true,
"quantity": 0,
"noPayment": false,
"noPrice": false,
"properties": null,
"productSpatialRequirement": null,
"productMassKg": null,
"productNetWeightKg": null,
"productTareWeightKg": null,
"metadata": null,
"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": {}
},
"fromTimeWindows": [
{
"start": 0,
"end": 0
}
],
"fromLocationGroup": {
"groupId": "string",
"code": "C123",
"externalId": "asd-asd-asd",
"name": "string"
},
"fromContactDetails": {
"email": "string",
"phone": "string",
"name": "string"
},
"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": {}
},
"toTimeWindows": [
{
"start": 0,
"end": 0
}
],
"toLocationGroup": {
"groupId": "string",
"code": "C123",
"externalId": "asd-asd-asd",
"name": "string"
},
"toContactDetails": {
"email": "string",
"phone": "string",
"name": "string"
}
},
"requestTimestamp": "2019-08-24T14:15:22Z",
"mappingRequests": {
"agent": {
"externalId": "string"
},
"carrier": {
"carrierExternalId": "string"
},
"content": null,
"product": {
"productCode": null,
"productCodeExternalId": null,
"productDescription": null
},
"fromLocation": {
"locationId": null,
"addressText": null,
"locationExternalId": null,
"locationName": null,
"latitude": 0,
"longitude": 0,
"saveIfUnknown": false,
"locationNameResolutionEnabled": false,
"useDefaultParentGroup": false,
"parentGroupExternalId": null,
"parentGroupName": null,
"saveGroupIfUnknown": false
},
"fromLocationGroup": {
"groupId": null,
"externalId": null,
"usePrimaryLocation": false,
"subLocationExternalId": null
},
"toLocation": {
"locationId": null,
"addressText": null,
"locationExternalId": null,
"locationName": null,
"latitude": 0,
"longitude": 0,
"saveIfUnknown": false,
"locationNameResolutionEnabled": false,
"useDefaultParentGroup": false,
"parentGroupExternalId": null,
"parentGroupName": null,
"saveGroupIfUnknown": false
},
"toLocationGroup": {
"groupId": null,
"externalId": null,
"usePrimaryLocation": false,
"subLocationExternalId": null
},
"corporateSubaccount": {
"corporateSubaccountId": "string",
"corporateSubaccountIntegrationId": "string"
}
}
}'Response
application/json
{ "batchId": "XYZ123", "id": "ABC123-example-1737580145879" }
Bodyapplication/jsonArray [ ]
Whether upon acceptance the carrier shall get a payment or not (e.g. freight forward)
Default false
Optional net weight override for the booking
Default null
Optional tare weight override for the booking
Default null
Request timestamp, useful to discard stale updates than were made offline and came online later
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/bookings/bulk
- https://developer.m2x.app/apis/v0/bookings/bulk
- NZ Production server (uses live data)https://m2x.app/apis/v0/bookings/bulk
- US Production server (uses live data)https://us.m2x.app/apis/v0/bookings/bulk
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/bookings/bulk
- Sandbox serverhttps://staging.m2x.app/apis/v0/bookings/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/bookings/bulk \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
{
"id": "string",
"booking": {
"agent": {
"email": "string",
"uid": "string",
"phone": "string",
"name": "string",
"externalId": "string"
},
"externalReference": "string",
"externalNote": "string",
"carrierId": "string",
"canceled": true,
"completed": true,
"quantity": 0,
"noPayment": false,
"noPrice": false,
"properties": null,
"productSpatialRequirement": null,
"productMassKg": null,
"productNetWeightKg": null,
"productTareWeightKg": null,
"metadata": null,
"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": {}
},
"fromTimeWindows": [
{
"start": 0,
"end": 0
}
],
"fromLocationGroup": {
"groupId": "string",
"code": "C123",
"externalId": "asd-asd-asd",
"name": "string"
},
"fromContactDetails": {
"email": "string",
"phone": "string",
"name": "string"
},
"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": {}
},
"toTimeWindows": [
{
"start": 0,
"end": 0
}
],
"toLocationGroup": {
"groupId": "string",
"code": "C123",
"externalId": "asd-asd-asd",
"name": "string"
},
"toContactDetails": {
"email": "string",
"phone": "string",
"name": "string"
}
},
"requestTimestamp": "2019-08-24T14:15:22Z",
"mappingRequests": {
"agent": {
"externalId": "string"
},
"carrier": {
"carrierExternalId": "string"
},
"content": null,
"product": {
"productCode": null,
"productCodeExternalId": null,
"productDescription": null
},
"fromLocation": {
"locationId": null,
"addressText": null,
"locationExternalId": null,
"locationName": null,
"latitude": 0,
"longitude": 0,
"saveIfUnknown": false,
"locationNameResolutionEnabled": false,
"useDefaultParentGroup": false,
"parentGroupExternalId": null,
"parentGroupName": null,
"saveGroupIfUnknown": false
},
"fromLocationGroup": {
"groupId": null,
"externalId": null,
"usePrimaryLocation": false,
"subLocationExternalId": null
},
"toLocation": {
"locationId": null,
"addressText": null,
"locationExternalId": null,
"locationName": null,
"latitude": 0,
"longitude": 0,
"saveIfUnknown": false,
"locationNameResolutionEnabled": false,
"useDefaultParentGroup": false,
"parentGroupExternalId": null,
"parentGroupName": null,
"saveGroupIfUnknown": false
},
"toLocationGroup": {
"groupId": null,
"externalId": null,
"usePrimaryLocation": false,
"subLocationExternalId": null
},
"corporateSubaccount": {
"corporateSubaccountId": "string",
"corporateSubaccountIntegrationId": "string"
}
},
"cancel": true
}
]'Response
application/json
{ "success": true, "batchId": "ABC123" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/bookings/{bookingId}/events
- https://developer.m2x.app/apis/v0/bookings/{bookingId}/events
- NZ Production server (uses live data)https://m2x.app/apis/v0/bookings/{bookingId}/events
- US Production server (uses live data)https://us.m2x.app/apis/v0/bookings/{bookingId}/events
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/bookings/{bookingId}/events
- Sandbox serverhttps://staging.m2x.app/apis/v0/bookings/{bookingId}/events
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/bookings/{bookingId}/events' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"event": "load",
"status": "partial",
"note": "string",
"reference": "string",
"actualId": "string",
"created": "2019-08-24T14:15:22Z",
"actual": {
"quantity": 0,
"properties": null,
"productSpatialRequirement": null,
"productMassKg": null,
"productNetWeightKg": null,
"productTareWeightKg": null,
"metadata": null,
"product": {
"productCode": null,
"productCodeExternalId": null,
"productDescription": null
},
"content": null
}
}'