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

Customers

Customers used for invoices

Operations
Operations
Operations

Fulfilment Requests

Fulfilment request on carriers

OperationsWebhooks

General Consignments

General consignments

Operations

Get consignment by id (Webhook DTO)

Request

Security
M2X_auth_application
Path
consignmentIdstringrequired

Internal M2X consignment id

Query
includeLegDetailsboolean

Whether or not to include detailed consignment leg information

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentId}?includeLegDetails=true' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
consignmentGroupIdstringrequired

Internal M2X consignment group id

Example: "yMnAFBBcNA4VQ8NjaJYz"
groupReferencestring or nullrequired

Optional reference label for the consignment group

Example: "GRP0091892"
consignmentIdstringrequired

Internal M2X consignment id

Example: "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224"
consignmentIntegrationIdstring or null

External consignment integration id

Example: "TIMB/000001/IN"
consignmentReferencestring or nullrequired

Optional reference label for the consignment

Example: "C002901092"
customerIdstring or null

The M2X customer id for this job

Example: "Yc7cXUulBhMM58iuOQce"
customerExternalIdstring or null

External customer id for this job

Example: "FTW"
customerIntegrationIdstring or null

Customer integration id for this job

Example: "C99"
customerNamestring or null

Customer name for this job

Example: "Fruit World"
statusstringrequired

Current consignment status

Enum"Booked""Started""Delivered""Accepted""Invoiced"
propertiesobject(ConsignmentProperties)required
properties.​serviceCodestringrequired

Nature of work, e.g. G = general, WH = warehouse, C = container

Enum"C""G""R""W""WH"
Example: "WH"
properties.​dangerousGoodsbooleanrequired
properties.​noChargeboolean

Indicate internal work that should not be invoiced

Default false
properties.​loadShareboolean

Indicate consignment qualifies for load share rating

Default false
transportNotestring or null

Any additional human readable detail to be supplied with consignment

Example: "Call Bob to confirm"
contentobjectrequired

Specific information about the content carted

content.​payloadArray of objectsnon-emptyrequired
content.​payload[].​productCodestringrequired

Internal M2X product code id

Example: "Z5BFB6nUToADamO7M01G"
content.​payload[].​productCodeExternalIdstring or nullrequired

External product code id

Example: "FERT"
content.​payload[].​productCodeNamestringrequired

Human readable product code name

Example: "Bagged Fertiliser"
content.​payload[].​descriptionstring or nullrequired

Additional detail about the product

Example: "BB SKU00390029 25kg"
content.​payload[].​measuresobjectrequired
content.​payload[].​measures.​itemsnumber>= 0required

Primary quantity (meaning is dependent on product code)

Example: 10
content.​payload[].​measures.​pltOrBininteger or null>= 0

Number of pallets or bin (omit or null if not available)

Example: 10
content.​payload[].​measures.​liftnumber or null>= 0

lift (omit or null if not available)

Example: 3.78
content.​payload[].​measures.​volumenumber or null>= 0

Cube m³ (omit or null if not available)

Example: 12.58
content.​payload[].​measures.​massinteger or null>= 0

kg (omit or null if not available)

Example: 8500
senderReferencestring or null

Optional additional reference label

Example: "S49029"
fromLocationobject(Location)
fromDateAndTimeConstraintobject(DateAndTimeConstraint)required
fromDateAndTimeConstraint.​datestring(date)required

Day required (YYYY-MM-DD)

fromDateAndTimeConstraint.​timezonestringrequired

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
fromDateAndTimeConstraint.​timeConstraintnull or TimeConstraint (object)
Any of:
null
fromRegionstring or null

Dispatch region

Example: "BOP"
receiverReferencestring or null

Optional additional reference label

Example: "R04746"
toLocationobject(Location)
toDateAndTimeConstraintobject(DateAndTimeConstraint)required
toDateAndTimeConstraint.​datestring(date)required

Day required (YYYY-MM-DD)

toDateAndTimeConstraint.​timezonestringrequired

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
toDateAndTimeConstraint.​timeConstraintnull or TimeConstraint (object)
Any of:
null
toRegionstring or null

Dispatch region

Example: "AKL"
podobject or nullrequired
pod.​deliveryobject(ProofOfDelivery)required
pod.​delivery.​signedBystring or null

Name of person signing (accepting responsibility)

Default null
Example: "John Doe"
pod.​delivery.​completedByobject or null

User that carried out this operation, e.g. Driver

Default null
pod.​delivery.​downloadUrlstring or null(uri)

URL where proof of delivery PDF can be downloaded from

Example: "https://m2x.app/apis/v0/resources/generalConsignments/TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224/pod/pdf"
metadataobject or null

Opaque passenger data

deletedboolean

True if the consignment is deleted

pickupTimestampstring or null(date-time)

RFC3339 date time of pickup (actual)

deliveryTimestampstring or null(date-time)

RFC3339 date time of delivery (actual)

expensenumber or null

Total expense for the consignment

expenseFafnumber or null

Fuel Adjustment Factor applied to the consignment expenses

revenuenumber or null

Total revenue for the consignment

revenueFafnumber or null

Fuel Adjustment Factor applied to the consignment revenue

createdstring or null(date-time)

RFC3339 date time

legsArray of objects or null

Consignment leg details

Response
application/json
{ "consignmentGroupId": "yMnAFBBcNA4VQ8NjaJYz", "groupReference": "GRP0091892", "consignmentId": "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224", "consignmentIntegrationId": "TIMB/000001/IN", "consignmentReference": "C002901092", "customerId": "Yc7cXUulBhMM58iuOQce", "customerExternalId": "FTW", "customerIntegrationId": "C99", "customerName": "Fruit World", "status": "Booked", "properties": { "serviceCode": "WH", "dangerousGoods": true, "noCharge": false, "loadShare": false }, "transportNote": "Call Bob to confirm", "content": { "payload": [ … ] }, "senderReference": "S49029", "fromLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "fromDateAndTimeConstraint": { "date": "2019-08-24", "timezone": "Pacific/Auckland", "timeConstraint": {} }, "fromRegion": "BOP", "receiverReference": "R04746", "toLocation": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "toDateAndTimeConstraint": { "date": "2019-08-24", "timezone": "Pacific/Auckland", "timeConstraint": {} }, "toRegion": "AKL", "pod": { "delivery": { … } }, "metadata": {}, "deleted": true, "pickupTimestamp": "2019-08-24T14:15:22Z", "deliveryTimestamp": "2019-08-24T14:15:22Z", "expense": 0, "expenseFaf": 0, "revenue": 0, "revenueFaf": 0, "created": "2019-08-24T14:15:22Z", "legs": [ { … } ] }

Request

Security
M2X_auth_application
Path
consignmentIdstringrequired

Internal M2X consignment id

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

Responses

Successful operation

Bodytext/plain
string

Request

Security
M2X_auth_application
Path
consignmentIntegrationIdstringrequired

M2X consignment integration id

Bodyapplication/jsonrequired

New consignment data

generalConsignmentobject(GeneralConsignmentRequest)
mappingRequestsobject(GeneralConsignmentRequestMappingRequest)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/generalConsignments/{consignmentIntegrationId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "generalConsignment": {
      "integrationId": "string",
      "consignmentReference": "C002901092",
      "properties": {
        "serviceCode": "WH",
        "dangerousGoods": true,
        "noCharge": false,
        "loadShare": false
      },
      "transportNote": "Call Bob to confirm",
      "senderReference": "S49029",
      "fromDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "receiverReference": "R04746",
      "toDateAndTimeConstraint": {
        "date": "2019-08-24",
        "timezone": "Pacific/Auckland",
        "timeConstraint": {}
      },
      "metadata": {}
    },
    "mappingRequests": {
      "customer": {
        "customerName": "Fruit World",
        "customerId": "Yc7cXUulBhMM58iuOQce",
        "externalId": "FTW",
        "integrationId": "C99"
      },
      "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
      },
      "content": {
        "payload": [
          {
            "description": "BB SKU00390029 25kg",
            "measures": {
              "items": 10,
              "pltOrBin": 10,
              "lift": 3.78,
              "volume": 12.58,
              "mass": 8500
            },
            "product": {
              "productCode": "Z5BFB6nUToADamO7M01G",
              "productCodeExternalId": "FERT",
              "productDescription": "Palletized fertiliser bags (10kg)"
            }
          }
        ]
      }
    }
  }'

Responses

Successful creation

Bodyapplication/json
consignmentIdstringrequired

Internal M2X consignment id

Example: "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224"
Response
application/json
{ "consignmentId": "TGX854-6OU9Ns9xm9E4JxP1YJYs-1670743772224" }

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