Skip to content
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/
Operations

Billing Groups

Invoiceable unit used by the system

Operations
Operations

Carrier Bookings

Corporate bookings received by carriers

Operations

Carrier Large Contracts

Carrier large contracts

Operations
Operations

Corporate Planning

Corporate Planning supplies and demands

Operations

Customer Bookings

Customer bookings on carriers

Operations

Request

Security
M2X_auth_application
Path
customerBookingIdstringrequired

The customer booking Id

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/customerBookings/{customerBookingId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring
externalReferencestring
externalNotestring
canceledboolean
acknowledgedboolean
statusstring
requestCreatedstring(date-time)
updatedstring(date-time)
carrierIdstring

The M2X carrier id for this booking

customerIdstring

Carrier customer id for this booking

customerPortalProfileIdstring

Carrier customer portal profile id for this booking

customerNamestring

Carrier customer name for this booking

productCodestring or null

M2X internal tracking id for the product code used

Default null
productCodeNamestring or null

M2X name for the product code used

Default null
productCodeExternalIdstring or null

External Id for product tracking

Default null
propertiesobject or null

A key value store containing custom properties

Default null
contentArray of objects or null(Content)

The sub components of the product if present

quantitynumber

The product quantity

Default 0
productSpatialRequirementnumber or null

Total volume or area for the booking

Default null
productMassKgnumber or null

Total weight for the booking

Default null
sourceIdstring

The source of the booking

fromLocationobject(CorporateLocation)
fromDateAndTimeConstraintobject(DateAndTimeConstraint)
fromContactDetailsobject(ContactDetails)
fromTimeWindowsArray of objects(TimeWindows)
fromReferencestring

The sender reference

toLocationobject(CorporateLocation)
toDateAndTimeConstraintobject(DateAndTimeConstraint)
toContactDetailsobject(ContactDetails)
toTimeWindowsArray of objects(TimeWindows)
toReferencestring

The receiver reference

]
Response
application/json
[ { "id": "string", "externalReference": "string", "externalNote": "string", "canceled": true, "acknowledged": true, "status": "string", "requestCreated": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z", "carrierId": "string", "customerId": "string", "customerPortalProfileId": "string", "customerName": "string", "productCode": null, "productCodeName": null, "productCodeExternalId": null, "properties": null, "content": [ … ], "quantity": 0, "productSpatialRequirement": null, "productMassKg": null, "sourceId": "string", "fromLocation": { … }, "fromDateAndTimeConstraint": { … }, "fromContactDetails": { … }, "fromTimeWindows": [ … ], "fromReference": "string", "toLocation": { … }, "toDateAndTimeConstraint": { … }, "toContactDetails": { … }, "toTimeWindows": [ … ], "toReference": "string" } ]

Update/create customer booking by ID

Request

Security
M2X_auth_application
Path
customerBookingIdstringrequired

The booking Id

Bodyapplication/jsonrequired

Update for the customer booking

bookingobject(CustomerBookingRequest)
mappingRequestsobject(CustomerBookingMappingRequest)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/customerBookings/{customerBookingId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "externalReference": "string",
      "externalNote": "string",
      "canceled": true,
      "properties": null,
      "quantity": 0,
      "productSpatialRequirement": null,
      "productMassKg": null,
      "fromLocation": {
        "addressText": "string",
        "latitude": 0,
        "longitude": 0,
        "locationName": "string",
        "locationId": "string",
        "externalId": "string",
        "timezone": "Pacific/Auckland",
        "properties": null
      },
      "fromReference": "string",
      "fromDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "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
      },
      "toReference": "string",
      "toDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "toContactDetails": {
        "email": "string",
        "phone": "string",
        "name": "string"
      }
    },
    "mappingRequests": {
      "content": null,
      "product": {
        "productCode": null,
        "productCodeExternalId": null,
        "productDescription": null
      },
      "fromLocation": {
        "locationId": null,
        "addressText": null,
        "locationExternalId": null,
        "locationName": null,
        "latitude": 0,
        "longitude": 0,
        "saveIfUnknown": false
      },
      "toLocation": {
        "locationId": null,
        "addressText": null,
        "locationExternalId": null,
        "locationName": null,
        "latitude": 0,
        "longitude": 0,
        "saveIfUnknown": false
      }
    }
  }'

Responses

Successful Operation

Bodyapplication/json
successboolean
Example: true
Response
application/json
{ "success": true }

Request

Security
M2X_auth_application
Path
customerBookingIdstringrequired

The customer booking Id

curl -i -X DELETE \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/customerBookings/{customerBookingId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful Operation

Bodyapplication/json
successboolean
Example: true
Response
application/json
{ "success": true }

Update/create customer booking by ID (by carrier)

Request

Security
M2X_auth_application
Path
customerBookingIdstringrequired

The booking Id

Bodyapplication/jsonrequired

Update for the customer booking

bookingobject(CustomerBookingRequest)
mappingRequestsobject(CarrierCustomerBookingMappingRequest)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/customerBookings/carrier/{customerBookingId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "booking": {
      "externalReference": "string",
      "externalNote": "string",
      "canceled": true,
      "properties": null,
      "quantity": 0,
      "productSpatialRequirement": null,
      "productMassKg": null,
      "fromLocation": {
        "addressText": "string",
        "latitude": 0,
        "longitude": 0,
        "locationName": "string",
        "locationId": "string",
        "externalId": "string",
        "timezone": "Pacific/Auckland",
        "properties": null
      },
      "fromReference": "string",
      "fromDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "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
      },
      "toReference": "string",
      "toDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "toContactDetails": {
        "email": "string",
        "phone": "string",
        "name": "string"
      }
    },
    "mappingRequests": {
      "customer": {
        "customerName": "Fruit World",
        "customerId": "Yc7cXUulBhMM58iuOQce",
        "externalId": "FTW",
        "integrationId": "C99"
      },
      "content": null,
      "product": {
        "productCode": null,
        "productCodeExternalId": null,
        "productDescription": null
      },
      "fromLocation": {
        "locationId": null,
        "addressText": null,
        "locationExternalId": null,
        "locationName": null,
        "latitude": 0,
        "longitude": 0,
        "saveIfUnknown": false
      },
      "toLocation": {
        "locationId": null,
        "addressText": null,
        "locationExternalId": null,
        "locationName": null,
        "latitude": 0,
        "longitude": 0,
        "saveIfUnknown": false
      }
    }
  }'

Responses

Successful Operation

Bodyapplication/json
successboolean
Example: true
Response
application/json
{ "success": true }

Customers

Customers used for invoices

Operations
Operations
Operations

Fulfilment Requests

Fulfilment request on carriers

OperationsWebhooks

General Consignments

General consignments

Operations

ISO containers

ISO containers information

Operations
OperationsWebhooks
Operations
OperationsWebhooks

Offers

Corporate monetary offers to carriers

OperationsWebhooks

Products

Products used by the system

Operations
Operations

Subcontractors

Subcontractors information

Operations

Tractor Unit

Tractor units information

Operations
Operations
Operations
Operations

Vehicle Execution Statements

Unit of execution for trucks

OperationsWebhooks
Webhooks