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

Get a carrier large contract by contract id

Request

Security
M2X_auth_application
Path
contractIdstringrequired

M2X large contract id

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

Responses

Successful operation

Bodyapplication/json
contractIdstring
externalIdstring or null
bookingIdstring or null
customerBookingIdstring or null
branchesArray of objects(Branch)
createdstring or null(date-time)
updatedstring or null(date-time)
customerIdstring

Carrier customer id for this contract

customerNamestring

Carrier customer name for this contract

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
productComponentsnull or Array of ProductComponent (objects)
Default null
Any of:
null
Default null
propertiesobject or null

A key value store containing custom properties

Default null
quantitynumber

The product quantity

Default 0
fromLocationobject(Location)
fromTimeConstraintnull or TimeConstraint (object)
Any of:
null
toLocationobject(Location)
toTimeConstraintnull or TimeConstraint (object)
Any of:
null
noteLongstring or null

Long note

noteShortstring or null

Short note

priceTotalnumber or null

Total transport price. Use priceTotal OR pricePerUnit + priceUnitOfMeasure

pricePerUnitnumber or null

Transport price per unit

priceUnitOfMeasurestring or null

Unit of measure used for transport pricing e.g. metric values ea, t, kg, m3, km and imperial values ea, tn, cwt, lb, ft3, mi

adjustmentPriceTotalnumber or null

Total adjustment price when specifying a fixed price. Use adjustmentPriceTotal OR adjustmentPricePerUnit + adjustmentPriceUnitOfMeasure

adjustmentPricePerUnitnumber or null

Price per unit

adjustmentPriceUnitOfMeasurestring or null

Unit of measure used for adjustment pricing e.g. no value allows adjustmentPricePerUnit to be specified as a decimal percentage of transport total price, metric values t, kg, km and imperial values tn, cwt, lb, mi

transportPricePerUnitnumber or null

Transport price per unit

validFromDatestring or null(date)

The date this contract is valid from

requiredByDatestring or null(date)

The date this contract needs to be completed by

completedboolean

True if the contract has been completed

draftboolean

True if the contract is a draft

Response
application/json
{ "contractId": "string", "externalId": "string", "bookingId": "string", "customerBookingId": "string", "branches": [ { … } ], "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z", "customerId": "string", "customerName": "string", "productCode": null, "productCodeName": null, "productCodeExternalId": null, "productComponents": null, "properties": null, "quantity": 0, "fromLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "fromTimeConstraint": {}, "toLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "toTimeConstraint": {}, "noteLong": "string", "noteShort": "string", "priceTotal": 0, "pricePerUnit": 0, "priceUnitOfMeasure": "string", "adjustmentPriceTotal": 0, "adjustmentPricePerUnit": 0, "adjustmentPriceUnitOfMeasure": "string", "transportPricePerUnit": 0, "validFromDate": "2019-08-24", "requiredByDate": "2019-08-24", "completed": true, "draft": true }

Update/create carrier large contract by ID

Request

Security
M2X_auth_application
Path
contractIdstringrequired

M2X large contract id

Bodyapplication/jsonrequired

Create or update a large contract

contractobject(CarrierLargeContractRequest)required
contract.​contractIdstringrequired
contract.​externalIdstring
contract.​bookingIdstring
contract.​customerBookingIdstring
contract.​quantitynumberrequired

The product quantity

Default 0
contract.​propertiesobject or null

A key value store containing custom properties

Default null
contract.​fromTimeConstraintobject(TimeConstraint)
contract.​toTimeConstraintobject(TimeConstraint)
contract.​noteLongstring

Long note

contract.​noteShortstring

Short note

contract.​priceTotalnumber or null

Total transport price. Use priceTotal OR pricePerUnit + priceUnitOfMeasure

Default null
contract.​pricePerUnitnumber or null

Transport price per unit

Default null
contract.​priceUnitOfMeasurestring or null

Unit of measure used for transport pricing e.g. metric values ea, t, kg, m3, km and imperial values ea, tn, cwt, lb, ft3, mi

Default null
contract.​adjustmentPriceTotalnumber or null

Total adjustment price when specifying a fixed price. Use adjustmentPriceTotal OR adjustmentPricePerUnit + adjustmentPriceUnitOfMeasure

Default null
contract.​adjustmentPricePerUnitnumber or null

Price per unit

Default null
contract.​adjustmentPriceUnitOfMeasurestring or null

Unit of measure used for adjustment pricing e.g. no value allows adjustmentPricePerUnit to be specified as a decimal percentage of transport total price, metric values t, kg, km and imperial values tn, cwt, lb, mi

Default null
contract.​transportPricePerUnitnumber

Transport price per unit

contract.​validFromDatestring(date)

The date this contract is valid from

contract.​requiredByDatestring(date)

The date this contract needs to be completed by

contract.​draftboolean

True if the contract is a draft

Default false
contract.​readonlyFieldsobject

Specifies which field should not be touched by the user

mappingRequestsobject(CarrierLargeContractMappingRequests)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(CarrierLargeContractContentMappingRequest)
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.​branchobject(CarrierBranchMappingRequest)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/largeContracts/{contractId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "contract": {
      "contractId": "string",
      "externalId": "string",
      "bookingId": "string",
      "customerBookingId": "string",
      "quantity": 0,
      "properties": null,
      "fromTimeConstraint": {
        "type": "NO_LATER_THAN",
        "time": "11:52",
        "start": "11:52",
        "end": "14:52",
        "timezone": "Pacific/Auckland"
      },
      "toTimeConstraint": {
        "type": "NO_LATER_THAN",
        "time": "11:52",
        "start": "11:52",
        "end": "14:52",
        "timezone": "Pacific/Auckland"
      },
      "noteLong": "string",
      "noteShort": "string",
      "priceTotal": null,
      "pricePerUnit": null,
      "priceUnitOfMeasure": null,
      "adjustmentPriceTotal": null,
      "adjustmentPricePerUnit": null,
      "adjustmentPriceUnitOfMeasure": null,
      "transportPricePerUnit": 0,
      "validFromDate": "2019-08-24",
      "requiredByDate": "2019-08-24",
      "draft": false,
      "readonlyFields": {
        "externalId": false,
        "customer": false,
        "product": false,
        "quantity": false,
        "fromLocation": false,
        "fromTimeConstraint": false,
        "toLocation": false,
        "toTimeConstraint": false,
        "properties": false,
        "noteLong": false,
        "noteShort": false,
        "transportPricePerUnit": false,
        "validFromDate": false,
        "requiredByDate": false,
        "deleted": false
      }
    },
    "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
      },
      "branch": {
        "branchId": "string",
        "externalId": "string",
        "branchName": "string"
      }
    }
  }'

Responses

Successful Operation

Bodyapplication/json
contractIdstring
Example: "ABC123-example-1697761533817"
Response
application/json
{ "contractId": "ABC123-example-1697761533817" }

Delete carrier large contract by ID

Request

Security
M2X_auth_application
Path
contractIdstringrequired

M2X large contract id

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

Responses

Successful operation

Bodyapplication/json
contractIdstring
Response
application/json
{ "contractId": "string" }
Operations

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