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

Request

Security
M2X_auth_application
Query
createdFromstring(date-time)required

Range creation date from

createdTostring(date-time)required

Range creation date to

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>'

Responses

Successful operation

Bodyapplication/jsonArray [
orderIdstring
deletedboolean
canceledboolean
cancellationNotesstring or null
Default null
cancellationReasonstring or null
Default null
agentAgent (object) or null
One of:
object Agent Recursive
attachmentsArray of CarrierAttachmentBase (object)(CarrierAttachment)
bookingIdstring or null
Default null
customerBookingIdstring or null
Default null
bookingEntityIdstring
carrierIdstring
consignmentIdstring or null
customerIdstring

Internal ID of the customer associated with this order

customerExternalIdstring or null

External ID of the customer associated with this order

customerIntegrationIdstring or null

Integration ID of the customer associated with this order

customerNamestring or null

Name of the customer associated with this order

createdstring(date-time)
createdBystring or null

The name of the user who created the order

updatedstring(date-time)
externalIdstring or null
externalNotestring or null
largeContractIdstring or null
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
productComponentsArray of ProductComponent (objects) or null
One of:

The sub components of the product if present

quantitynumber

The product quantity

Default 0
legsArray of objects(CarrierOrderLeg)
fromLocationLocation (object) or null
One of:
object Location Recursive
toLocationLocation (object) or null
One of:
object Location Recursive
defaultLegBranchesArray of objects(Branch)

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.

billingEntityIdstringDeprecated

Legacy field for customerId

]
Response
application/json
[ { "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": [ … ] } ]

Request

Security
M2X_auth_application
Path
orderIdstringrequired

Internal M2X order id

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

Responses

Successful operation

Bodyapplication/json
orderIdstring
deletedboolean
canceledboolean
cancellationNotesstring or null
Default null
cancellationReasonstring or null
Default null
agentAgent (object) or null
One of:
object Agent Recursive
attachmentsArray of CarrierAttachmentBase (object)(CarrierAttachment)
bookingIdstring or null
Default null
customerBookingIdstring or null
Default null
bookingEntityIdstring
carrierIdstring
consignmentIdstring or null
customerIdstring

Internal ID of the customer associated with this order

customerExternalIdstring or null

External ID of the customer associated with this order

customerIntegrationIdstring or null

Integration ID of the customer associated with this order

customerNamestring or null

Name of the customer associated with this order

createdstring(date-time)
createdBystring or null

The name of the user who created the order

updatedstring(date-time)
externalIdstring or null
externalNotestring or null
largeContractIdstring or null
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
productComponentsArray of ProductComponent (objects) or null
One of:

The sub components of the product if present

quantitynumber

The product quantity

Default 0
legsArray of objects(CarrierOrderLeg)
fromLocationLocation (object) or null
One of:
object Location Recursive
toLocationLocation (object) or null
One of:
object Location Recursive
defaultLegBranchesArray of objects(Branch)

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.

billingEntityIdstringDeprecated

Legacy field for customerId

Response
application/json
{ "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": [ { … } ] }

Request

Security
M2X_auth_application
Path
orderIdstringrequired

M2X order id

Bodyapplication/jsonrequired

Create or update an order

orderobject(CarrierOrderRequest)required
order.​orderIdstringrequired
order.​externalIdstring
order.​externalNotestring
order.​bookingIdstring
order.​customerBookingIdstring
order.​largeContractIdstring
order.​quantitynumberrequired

The product quantity

Default 0
order.​propertiesobject or null

A key value store containing custom properties

Default null
order.​metadataobject or null

A key value store containing metadata

Default null
order.​fromReferencestring
order.​fromDateAndTimeConstraintobject(DateAndTimeConstraint)
order.​toReferencestring
order.​toDateAndTimeConstraintobject(DateAndTimeConstraint)
order.​shortNotestring
mappingRequestsobject(CarrierOrderMappingRequests)required
mappingRequests.​customerobject(CarrierCustomerMappingRequest)required
mappingRequests.​customer.​customerNamestring
Example: "Fruit World"
mappingRequests.​customer.​customerIdstring
Example: "Yc7cXUulBhMM58iuOQce"
mappingRequests.​customer.​externalIdstring
Example: "FTW"
mappingRequests.​customer.​integrationIdstring
Example: "C99"
mappingRequests.​contentobject or null(CarrierContentMappingRequest)
mappingRequests.​productobject(CarrierProductMappingRequest)required
mappingRequests.​product.​productCodeNamestring
mappingRequests.​product.​productCodeIdstring
mappingRequests.​product.​integrationIdstring
mappingRequests.​fromLocationobject(CarrierLocationMappingRequest)required
mappingRequests.​fromLocation.​locationIdstring or null

M2X internal tracking id for the location code used

Default null
Example: "C6mruxd3AVUTW14vEZ0v"
mappingRequests.​fromLocation.​addressTextstring or null

Address, if present and no locationId or external Id is matching, will try to geocode

Default null
Example: "123 Example Road, Auckland 1010"
mappingRequests.​fromLocation.​externalIdstring or null

External Id

Default null
Example: "WHC6"
mappingRequests.​fromLocation.​locationNamestring or null

Helps user creating the missing mapping upon mapping failure, or used to save location if new

Default null
Example: "Auckland Storage 1"
mappingRequests.​fromLocation.​latitudenumber
Default 0
Example: -36.983882
mappingRequests.​fromLocation.​longitudenumber
Default 0
Example: 174.709879
mappingRequests.​fromLocation.​locationNameResolutionEnabledboolean

Try to resolve location by name, quick weak method, disabled by default

Default false
mappingRequests.​fromLocation.​saveIfUnknownboolean

If no existing location is found, locationId provided and lat/lng provided or geocode successful, will create location

Default false
mappingRequests.​toLocationobject(CarrierLocationMappingRequest)required
mappingRequests.​toLocation.​locationIdstring or null

M2X internal tracking id for the location code used

Default null
Example: "C6mruxd3AVUTW14vEZ0v"
mappingRequests.​toLocation.​addressTextstring or null

Address, if present and no locationId or external Id is matching, will try to geocode

Default null
Example: "123 Example Road, Auckland 1010"
mappingRequests.​toLocation.​externalIdstring or null

External Id

Default null
Example: "WHC6"
mappingRequests.​toLocation.​locationNamestring or null

Helps user creating the missing mapping upon mapping failure, or used to save location if new

Default null
Example: "Auckland Storage 1"
mappingRequests.​toLocation.​latitudenumber
Default 0
Example: -36.983882
mappingRequests.​toLocation.​longitudenumber
Default 0
Example: 174.709879
mappingRequests.​toLocation.​locationNameResolutionEnabledboolean

Try to resolve location by name, quick weak method, disabled by default

Default false
mappingRequests.​toLocation.​saveIfUnknownboolean

If no existing location is found, locationId provided and lat/lng provided or geocode successful, will create location

Default false
mappingRequests.​defaultLegBranchesArray of objects(CarrierBranchMappingRequest)

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.

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"
        }
      ]
    }
  }'

Responses

Successful operation

Bodyapplication/json
orderIdstring
Example: "ABC123-Ilon3tVMlqfCVLC8wZFy-1698357659017"
Response
application/json
{ "orderId": "ABC123-Ilon3tVMlqfCVLC8wZFy-1698357659017" }

Request

Security
M2X_auth_application
Path
orderIdstringrequired

M2X order id

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

Responses

Successful Operation

Bodyapplication/json
orderIdstring
Example: "ABC123-example-1737580145879"
Response
application/json
{ "orderId": "ABC123-example-1737580145879" }

Request

Security
M2X_auth_application
Path
orderIdstringrequired

M2X order id

attachmentIdstringrequired

The Attachment Id

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

Responses

Successful operation

Bodyapplication/octet-stream
string(binary)
Response
No content

Request

Security
M2X_auth_application
Path
orderIdstringrequired

M2X order ID

attachmentIdstringrequired

The Attachment ID. Accepts A–Z a–z 0–9 - _ . ! ~ * ' ( )

Bodymultipart/form-datarequired

Attachment file

attachmentstring(binary)required

Supported content types: application/pdf, image/jpeg, image/png

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

Responses

Attachment uploaded successfully

Response
No content

Request

Security
M2X_auth_application
Path
orderIdstringrequired

M2X order ID

attachmentIdstringrequired

The Attachment ID

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

Responses

Attachment deleted successfully

Response
No content

Corporate Planning

Corporate Planning supplies and demands

Operations

Customer Bookings

Customer bookings on carriers

Operations

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