Skip to content

M2X APIS (1.0.0)

M2X APIs

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/

Analytics

Analytics data

Operations

Billing Groups

Invoiceable unit used by the system

Operations

Bookings

Bookings information

Operations

Carrier Bookings

Corporate bookings received by carriers

Operations

Carrier Large Contracts

Carrier large contracts

Operations

Carrier Orders

Carrier orders

Operations

Corporate Planning

Corporate Planning supplies and demands

Operations

Customer Bookings

Customer bookings on carriers

Operations

Customers

Customers used for invoices

Operations

Get all customers

Request

Security
M2X_auth_application
curl -i -X GET \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/customers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring
Example: "customer123"
namestring
Example: "My customer"
externalIdstring or null

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring or null

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring or null
Example: "email@test.com"
contactFirstNamestring or null
Example: "Joe"
contactLastNamestring or null
Example: "Blog"
businessPhonestring or null
Example: "000 000 00"
businessMobilePhonestring or null
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
]
Response
application/json
[ { "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true } ]

Create new customer

Request

Security
M2X_auth_application
Bodyapplication/json
namestringrequired
Example: "My customer"
externalIdstring

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring
Example: "email@test.com"
contactFirstNamestring
Example: "Joe"
contactLastNamestring
Example: "Blog"
businessPhonestring
Example: "000 000 00"
businessMobilePhonestring
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
readonlyFieldsobject or null

Specifies which field should not be touched by the user

curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/customers \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My customer",
    "externalId": "C123",
    "integrationId": "123-123-123",
    "postalAddress": "40 test street",
    "email": "email@test.com",
    "contactFirstName": "Joe",
    "contactLastName": "Blog",
    "businessPhone": "000 000 00",
    "businessMobilePhone": "000 000 00",
    "disabled": true,
    "onHold": true,
    "readonlyFields": {
      "name": false,
      "externalId": false,
      "integrationId": false,
      "postalAddress": false,
      "email": false,
      "contactFirstName": false,
      "contactLastName": false,
      "businessPhone": false,
      "businessMobilePhone": false,
      "disabled": false,
      "onHold": false
    }
  }'

Responses

Successful operation

Bodyapplication/json
idstring
Example: "customer123"
namestring
Example: "My customer"
externalIdstring or null

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring or null

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring or null
Example: "email@test.com"
contactFirstNamestring or null
Example: "Joe"
contactLastNamestring or null
Example: "Blog"
businessPhonestring or null
Example: "000 000 00"
businessMobilePhonestring or null
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }

Get customer by id

Request

Security
M2X_auth_application
Path
customerIdstringrequired

The customer Id

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

Responses

Successful operation

Bodyapplication/json
idstring
Example: "customer123"
namestring
Example: "My customer"
externalIdstring or null

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring or null

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring or null
Example: "email@test.com"
contactFirstNamestring or null
Example: "Joe"
contactLastNamestring or null
Example: "Blog"
businessPhonestring or null
Example: "000 000 00"
businessMobilePhonestring or null
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }

Update/create customer by id

Request

Security
M2X_auth_application
Path
customerIdstringrequired

The customer Id

Bodyapplication/json
namestringrequired
Example: "My customer"
externalIdstring

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring
Example: "email@test.com"
contactFirstNamestring
Example: "Joe"
contactLastNamestring
Example: "Blog"
businessPhonestring
Example: "000 000 00"
businessMobilePhonestring
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
readonlyFieldsobject or null

Specifies which field should not be touched by the user

curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My customer",
    "externalId": "C123",
    "integrationId": "123-123-123",
    "postalAddress": "40 test street",
    "email": "email@test.com",
    "contactFirstName": "Joe",
    "contactLastName": "Blog",
    "businessPhone": "000 000 00",
    "businessMobilePhone": "000 000 00",
    "disabled": true,
    "onHold": true,
    "readonlyFields": {
      "name": false,
      "externalId": false,
      "integrationId": false,
      "postalAddress": false,
      "email": false,
      "contactFirstName": false,
      "contactLastName": false,
      "businessPhone": false,
      "businessMobilePhone": false,
      "disabled": false,
      "onHold": false
    }
  }'

Responses

Successful operation

Bodyapplication/json
idstring
Example: "customer123"
namestring
Example: "My customer"
externalIdstring or null

Rapid searchable id for front end users

Example: "C123"
integrationIdstring

Customer Integration Id

Example: "123-123-123"
postalAddressstring or null

Address used to differentiate similar customers in the front end

Example: "40 test street"
emailstring or null
Example: "email@test.com"
contactFirstNamestring or null
Example: "Joe"
contactLastNamestring or null
Example: "Blog"
businessPhonestring or null
Example: "000 000 00"
businessMobilePhonestring or null
Example: "000 000 00"
disabledboolean

Whether the customer is searchable in the front end

onHoldboolean
Response
application/json
{ "id": "customer123", "name": "My customer", "externalId": "C123", "integrationId": "123-123-123", "postalAddress": "40 test street", "email": "email@test.com", "contactFirstName": "Joe", "contactLastName": "Blog", "businessPhone": "000 000 00", "businessMobilePhone": "000 000 00", "disabled": true, "onHold": true }

Update/create customers bulk

Request

Security
M2X_auth_application
Bodyapplication/jsonArray [
idstringrequired
customerobject(CustomerRequest)required
customer.​namestringrequired
Example: "My customer"
customer.​externalIdstring

Rapid searchable id for front end users

Example: "C123"
customer.​integrationIdstring

Customer Integration Id

Example: "123-123-123"
customer.​postalAddressstring

Address used to differentiate similar customers in the front end

Example: "40 test street"
customer.​emailstring
Example: "email@test.com"
customer.​contactFirstNamestring
Example: "Joe"
customer.​contactLastNamestring
Example: "Blog"
customer.​businessPhonestring
Example: "000 000 00"
customer.​businessMobilePhonestring
Example: "000 000 00"
customer.​disabledboolean

Whether the customer is searchable in the front end

customer.​onHoldboolean
customer.​readonlyFieldsobject or null

Specifies which field should not be touched by the user

]
curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/bulk \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "id": "string",
      "customer": {
        "name": "My customer",
        "externalId": "C123",
        "integrationId": "123-123-123",
        "postalAddress": "40 test street",
        "email": "email@test.com",
        "contactFirstName": "Joe",
        "contactLastName": "Blog",
        "businessPhone": "000 000 00",
        "businessMobilePhone": "000 000 00",
        "disabled": true,
        "onHold": true,
        "readonlyFields": {
          "name": false,
          "externalId": false,
          "integrationId": false,
          "postalAddress": false,
          "email": false,
          "contactFirstName": false,
          "contactLastName": false,
          "businessPhone": false,
          "businessMobilePhone": false,
          "disabled": false,
          "onHold": false
        }
      }
    }
  ]'

Responses

Successful operation

Bodyapplication/json
successboolean
Example: true
batchIdstring
Example: "ABC123"
Response
application/json
{ "success": true, "batchId": "ABC123" }

Search customers

Request

Security
M2X_auth_application
Bodyapplication/json
searchstring or null

A fuzzy search

Default null
includeDisabledboolean

Whether to return disabled

Default false
externalIdstring or null

Search by external Id

Default null
namestring or null

Search by name

Default null
pageFromnumber

From which document number to start the page

Default 0
pageSizenumber

How big the page should be

Default 20
curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/search \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "search": null,
    "includeDisabled": false,
    "externalId": null,
    "name": null,
    "pageFrom": 0,
    "pageSize": 20
  }'

Responses

Successful operation

Bodyapplication/json
frominteger

Document from where the page starts

sizeinteger

Page size

totalinteger

Total document count matching the query

hitsArray of objects
Response
application/json
{ "from": 0, "size": 0, "total": 0, "hits": [ { … } ] }

Drivers

Drivers information

Operations

Fuel

Fuel deliveries management

Operations

Fulfilment Requests

Fulfilment request on carriers

OperationsWebhooks

General Consignments

General consignments

Operations

ISO containers

ISO containers information

Operations

Jobs

Vehicle units of work

OperationsWebhooks

Locations

Locations information

Operations

Master Bookings

Master bookings

OperationsWebhooks

Offers

Corporate monetary offers to carriers

OperationsWebhooks

Products

Products used by the system

Operations

Runs

Runs management

Operations

Subcontractors

Subcontractors information

Operations

Tractor Unit

Tractor units information

Operations

Trailer

Trailers information

Operations

Transaction

Transaction management

Operations

Vehicle

Vehicles information

Operations

Vehicle Execution Statements

Unit of execution for trucks

OperationsWebhooks

Consignments

Webhooks