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

Get a list of billing groups

Request

Security
M2X_auth_application
Query
startstring(date)

Start of the queried interval (YYYY-MM-DD)

endstring(date)

End of the queried interval (YYYY-MM-DD)

statestring

State filter

Enum"Booked""Started""Delivered""Accepted""Invoiced""Paid"
customerIdstring

Customer filter

inactiveboolean

Search for inactive billingGroups

Default false
curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/billingGroups?start=2019-08-24&end=2019-08-24&state=Booked&customerId=string&inactive=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring
humanReadableIdstring
datestring(date)
priceManualnumber
priceStoragenumber
priceProductnumber
priceFafnumber
priceTransportnumber
priceTotalnumber
fromstring
tostring
productDescriptionstring
propertiesobject or null

A key value store containing custom properties

Default null
customerIdstring
customerNamestring
customerIntegrationIdstring

Customer integration id for this job

customerExternalIdstring

External customer id for this job

inactiveboolean
statusstring
vehiclesArray of strings

A list of vehicles involved in a billing group execution

vehicleExternalIdsArray of strings

A list of vehicle external Ids involved in a billing group execution

vehicleNamesArray of strings

A list of vehicle Names involved in a billing group execution

vehiclesSnapshotArray of objects

A list of vehicle involved in the execution at the tome of the snapshot

subcontractorsArray of strings

A list of subcontractors involved in a billing group execution

subcontractorExternalIdsArray of strings

A list of subcontractor external Ids involved in a billing group execution

subcontractorNamesArray of strings

A list of subcontractor Names involved in a billing group execution

subcontractorsSnapshotArray of objects

A list of subcontractor involved in the execution at the tome of the snapshot

transportArray of objects
storageArray of objects
productsArray of objects
manualArray of objects
]
Response
application/json
[ { "id": "string", "humanReadableId": "string", "date": "2019-08-24", "priceManual": 0, "priceStorage": 0, "priceProduct": 0, "priceFaf": 0, "priceTransport": 0, "priceTotal": 0, "from": "string", "to": "string", "productDescription": "string", "properties": null, "customerId": "string", "customerName": "string", "customerIntegrationId": "string", "customerExternalId": "string", "inactive": true, "status": "string", "vehicles": [ … ], "vehicleExternalIds": [ … ], "vehicleNames": [ … ], "vehiclesSnapshot": [ … ], "subcontractors": [ … ], "subcontractorExternalIds": [ … ], "subcontractorNames": [ … ], "subcontractorsSnapshot": [ … ], "transport": [ … ], "storage": [ … ], "products": [ … ], "manual": [ … ] } ]

Force bulk update billing group status, can make a mess, use at own risk

Request

Security
M2X_auth_application
Bodyapplication/jsonArray [
billingGroupIdstringrequired
deleteStatusboolean

Deletes the manual status on the billing group

Default false
statusstring
Enum"Booked""Started""Delivered""Accepted""Invoiced""Paid"
]
curl -i -X POST \
  https://developer.m2x.app/_mock/apis/publicapi/openapi/billingGroups/bulkStatusUpdate \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "billingGroupId": "string",
      "deleteStatus": false,
      "status": "Booked"
    }
  ]'

Responses

Successful Operation

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

Get billing group by id

Request

Security
M2X_auth_application
Path
billingGroupIdstringrequired

The billing group Id

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

Responses

Successful operation

Bodyapplication/json
idstring
humanReadableIdstring
datestring(date)
priceManualnumber
priceStoragenumber
priceProductnumber
priceFafnumber
priceTransportnumber
priceTotalnumber
fromstring
tostring
productDescriptionstring
propertiesobject or null

A key value store containing custom properties

Default null
customerIdstring
customerNamestring
customerIntegrationIdstring

Customer integration id for this job

customerExternalIdstring

External customer id for this job

inactiveboolean
statusstring
vehiclesArray of strings

A list of vehicles involved in a billing group execution

vehicleExternalIdsArray of strings

A list of vehicle external Ids involved in a billing group execution

vehicleNamesArray of strings

A list of vehicle Names involved in a billing group execution

vehiclesSnapshotArray of objects

A list of vehicle involved in the execution at the tome of the snapshot

subcontractorsArray of strings

A list of subcontractors involved in a billing group execution

subcontractorExternalIdsArray of strings

A list of subcontractor external Ids involved in a billing group execution

subcontractorNamesArray of strings

A list of subcontractor Names involved in a billing group execution

subcontractorsSnapshotArray of objects

A list of subcontractor involved in the execution at the tome of the snapshot

transportArray of objects
storageArray of objects
productsArray of objects
manualArray of objects
Response
application/json
{ "id": "string", "humanReadableId": "string", "date": "2019-08-24", "priceManual": 0, "priceStorage": 0, "priceProduct": 0, "priceFaf": 0, "priceTransport": 0, "priceTotal": 0, "from": "string", "to": "string", "productDescription": "string", "properties": null, "customerId": "string", "customerName": "string", "customerIntegrationId": "string", "customerExternalId": "string", "inactive": true, "status": "string", "vehicles": [ "string" ], "vehicleExternalIds": [ "string" ], "vehicleNames": [ "string" ], "vehiclesSnapshot": [ { … } ], "subcontractors": [ "string" ], "subcontractorExternalIds": [ "string" ], "subcontractorNames": [ "string" ], "subcontractorsSnapshot": [ { … } ], "transport": [ { … } ], "storage": [ { … } ], "products": [ { … } ], "manual": [ { … } ] }

Force update billing group status by id

Request

Security
M2X_auth_application
Path
billingGroupIdstringrequired

The billing group Id

Bodyapplication/json
statusstring
Enum"Booked""Started""Delivered""Accepted""Invoiced""Paid"
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/billingGroups/{billingGroupId}/status' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "status": "Booked"
  }'

Responses

Successful Operation

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

Remove forced update billing group status by id

Request

Security
M2X_auth_application
Path
billingGroupIdstringrequired

The billing group Id

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

Responses

Successful Operation

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

Get billing group details by id

Request

Security
M2X_auth_application
Path
billingGroupIdstringrequired

The billing group Id

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

Responses

Successful operation

Bodyapplication/json
idstring
humanReadableIdstring
branchesArray of objects(Branch)
customerIdstring or null
customerNamestring or null
customerIntegrationIdstring or null

Customer integration id for this job

customerExternalIdstring or null

External customer id for this job

crnNumberByCustomerIdobject or null

Key value store of customer id and crn

inactiveboolean
statusstring
datestring(date)
propertiesobject or null

A key value store containing custom properties

Default null
jobsArray of objects(Job)
transportRevenuesArray of objects(TransportRevenue)
storageRevenuesArray of objects(StorageRevenue)
productRevenuesArray of objects(ProductRevenue)
manualRevenuesArray of objects(ManualRevenue)
Response
application/json
{ "id": "string", "humanReadableId": "string", "branches": [ { … } ], "customerId": "string", "customerName": "string", "customerIntegrationId": "string", "customerExternalId": "string", "crnNumberByCustomerId": {}, "inactive": true, "status": "string", "date": "2019-08-24", "properties": null, "jobs": [ { … } ], "transportRevenues": [ { … } ], "storageRevenues": [ { … } ], "productRevenues": [ { … } ], "manualRevenues": [ { … } ] }

Get a list of invoices

Request

Security
M2X_auth_application
Query
createdSincestring(date)

Get invoices created after this day

updatedSincestring(date)

Get invoices created after this day

limitinteger

Max number of invoices returned

Default 100
pageinteger

Page of invoices returned

Default 0
curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/invoices?createdSince=2019-08-24&updatedSince=2019-08-24&limit=100&page=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstringrequired
billingGroupIdsArray of stringsrequired
invoiceDatestringrequired
invoicedByobject(User)required
invoicedBy.​uidstring
invoicedBy.​emailstring or null
invoicedBy.​namestring or null
statusstringrequired
createdstring(date-time)required
updatedstring(date-time)required
]
Response
application/json
[ { "id": "string", "billingGroupIds": [ … ], "invoiceDate": "string", "invoicedBy": { … }, "status": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" } ]

Get invoice by id

Request

Security
M2X_auth_application
Path
invoiceIdstringrequired

The invoice Id

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

Responses

Successful operation

Bodyapplication/json
idstringrequired
billingGroupsArray of objects(BillingGroup)required
billingGroups[].​idstring
billingGroups[].​humanReadableIdstring
billingGroups[].​datestring(date)
billingGroups[].​priceManualnumber
billingGroups[].​priceStoragenumber
billingGroups[].​priceProductnumber
billingGroups[].​priceFafnumber
billingGroups[].​priceTransportnumber
billingGroups[].​priceTotalnumber
billingGroups[].​fromstring
billingGroups[].​tostring
billingGroups[].​productDescriptionstring
billingGroups[].​propertiesobject or null

A key value store containing custom properties

Default null
billingGroups[].​customerIdstring
billingGroups[].​customerNamestring
billingGroups[].​customerIntegrationIdstring

Customer integration id for this job

billingGroups[].​customerExternalIdstring

External customer id for this job

billingGroups[].​inactiveboolean
billingGroups[].​statusstring
billingGroups[].​vehiclesArray of strings

A list of vehicles involved in a billing group execution

billingGroups[].​vehicleExternalIdsArray of strings

A list of vehicle external Ids involved in a billing group execution

billingGroups[].​vehicleNamesArray of strings

A list of vehicle Names involved in a billing group execution

billingGroups[].​vehiclesSnapshotArray of objects

A list of vehicle involved in the execution at the tome of the snapshot

billingGroups[].​subcontractorsArray of strings

A list of subcontractors involved in a billing group execution

billingGroups[].​subcontractorExternalIdsArray of strings

A list of subcontractor external Ids involved in a billing group execution

billingGroups[].​subcontractorNamesArray of strings

A list of subcontractor Names involved in a billing group execution

billingGroups[].​subcontractorsSnapshotArray of objects

A list of subcontractor involved in the execution at the tome of the snapshot

billingGroups[].​transportArray of objects
billingGroups[].​storageArray of objects
billingGroups[].​productsArray of objects
billingGroups[].​manualArray of objects
invoiceDatestringrequired
invoicedByobject(User)required
invoicedBy.​uidstring
invoicedBy.​emailstring or null
invoicedBy.​namestring or null
statusstringrequired
createdstring(date-time)required
updatedstring(date-time)required
Response
application/json
{ "id": "string", "billingGroups": [ { … } ], "invoiceDate": "string", "invoicedBy": { "uid": "string", "email": "string", "name": "string" }, "status": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }

Get invoice billing group details snapshot by id

Request

Security
M2X_auth_application
Path
invoiceIdstringrequired

The invoice Id

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

Responses

Successful operation

Bodyapplication/json
idstringrequired
billingGroupDetailsArray of objects(BillingGroupDetails)required
billingGroupDetails[].​idstring
billingGroupDetails[].​humanReadableIdstring
billingGroupDetails[].​branchesArray of objects(Branch)
billingGroupDetails[].​customerIdstring or null
billingGroupDetails[].​customerNamestring or null
billingGroupDetails[].​customerIntegrationIdstring or null

Customer integration id for this job

billingGroupDetails[].​customerExternalIdstring or null

External customer id for this job

billingGroupDetails[].​crnNumberByCustomerIdobject or null

Key value store of customer id and crn

billingGroupDetails[].​inactiveboolean
billingGroupDetails[].​statusstring
billingGroupDetails[].​datestring(date)
billingGroupDetails[].​propertiesobject or null

A key value store containing custom properties

Default null
billingGroupDetails[].​jobsArray of objects(Job)
billingGroupDetails[].​transportRevenuesArray of objects(TransportRevenue)
billingGroupDetails[].​storageRevenuesArray of objects(StorageRevenue)
billingGroupDetails[].​productRevenuesArray of objects(ProductRevenue)
billingGroupDetails[].​manualRevenuesArray of objects(ManualRevenue)
invoiceDatestringrequired
invoicedByobject(User)required
invoicedBy.​uidstring
invoicedBy.​emailstring or null
invoicedBy.​namestring or null
statusstringrequired
createdstring(date-time)required
updatedstring(date-time)required
Response
application/json
{ "id": "string", "billingGroupDetails": [ { … } ], "invoiceDate": "string", "invoicedBy": { "uid": "string", "email": "string", "name": "string" }, "status": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }

Invoice webhookWebhook

Request

webhook type: INVOICE

Bodyapplication/jsonrequired
idstringrequired
billingGroupsArray of objects(BillingGroup)required
billingGroups[].​idstring
billingGroups[].​humanReadableIdstring
billingGroups[].​datestring(date)
billingGroups[].​priceManualnumber
billingGroups[].​priceStoragenumber
billingGroups[].​priceProductnumber
billingGroups[].​priceFafnumber
billingGroups[].​priceTransportnumber
billingGroups[].​priceTotalnumber
billingGroups[].​fromstring
billingGroups[].​tostring
billingGroups[].​productDescriptionstring
billingGroups[].​propertiesobject or null

A key value store containing custom properties

Default null
billingGroups[].​customerIdstring
billingGroups[].​customerNamestring
billingGroups[].​customerIntegrationIdstring

Customer integration id for this job

billingGroups[].​customerExternalIdstring

External customer id for this job

billingGroups[].​inactiveboolean
billingGroups[].​statusstring
billingGroups[].​vehiclesArray of strings

A list of vehicles involved in a billing group execution

billingGroups[].​vehicleExternalIdsArray of strings

A list of vehicle external Ids involved in a billing group execution

billingGroups[].​vehicleNamesArray of strings

A list of vehicle Names involved in a billing group execution

billingGroups[].​vehiclesSnapshotArray of objects

A list of vehicle involved in the execution at the tome of the snapshot

billingGroups[].​subcontractorsArray of strings

A list of subcontractors involved in a billing group execution

billingGroups[].​subcontractorExternalIdsArray of strings

A list of subcontractor external Ids involved in a billing group execution

billingGroups[].​subcontractorNamesArray of strings

A list of subcontractor Names involved in a billing group execution

billingGroups[].​subcontractorsSnapshotArray of objects

A list of subcontractor involved in the execution at the tome of the snapshot

billingGroups[].​transportArray of objects
billingGroups[].​storageArray of objects
billingGroups[].​productsArray of objects
billingGroups[].​manualArray of objects
invoiceDatestringrequired
invoicedByobject(User)required
invoicedBy.​uidstring
invoicedBy.​emailstring or null
invoicedBy.​namestring or null
statusstringrequired
createdstring(date-time)required
updatedstring(date-time)required
application/json
{ "id": "string", "billingGroups": [ { … } ], "invoiceDate": "string", "invoicedBy": { "uid": "string", "email": "string", "name": "string" }, "status": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }

Responses

Webhook received successfully

Billing group details webhookWebhook

Request

webhook type: BILLING_GROUP_DETAILS

Bodyapplication/jsonrequired
idstring
humanReadableIdstring
branchesArray of objects(Branch)
customerIdstring or null
customerNamestring or null
customerIntegrationIdstring or null

Customer integration id for this job

customerExternalIdstring or null

External customer id for this job

crnNumberByCustomerIdobject or null

Key value store of customer id and crn

inactiveboolean
statusstring
datestring(date)
propertiesobject or null

A key value store containing custom properties

Default null
jobsArray of objects(Job)
transportRevenuesArray of objects(TransportRevenue)
storageRevenuesArray of objects(StorageRevenue)
productRevenuesArray of objects(ProductRevenue)
manualRevenuesArray of objects(ManualRevenue)
application/json
{ "id": "string", "humanReadableId": "string", "branches": [ { … } ], "customerId": "string", "customerName": "string", "customerIntegrationId": "string", "customerExternalId": "string", "crnNumberByCustomerId": {}, "inactive": true, "status": "string", "date": "2019-08-24", "properties": null, "jobs": [ { … } ], "transportRevenues": [ { … } ], "storageRevenues": [ { … } ], "productRevenues": [ { … } ], "manualRevenues": [ { … } ] }

Responses

Webhook received successfully

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

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