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

Query fuel activities by shift (Webhook DTO)

Request

Security
M2X_auth_application
Path
shiftIdstringrequired

Shift Id

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

Responses

Successful operation

Bodyapplication/json
activitiesobject(FuelActivities)required
activities.​startsArray of objects(FuelStartEndActivity)
activities.​endsArray of objects(FuelStartEndActivity)
activities.​pickupsArray of objects(FuelPickupActivity)
activities.​deliveriesArray of objects(FuelDeliveryActivity)
activities.​inventoryAdjustArray of objects(FuelInventoryAdjustmentActivity)
shiftIdstringrequired
Response
application/json
{ "activities": { "starts": [ … ], "ends": [ … ], "pickups": [ … ], "deliveries": [ … ], "inventoryAdjust": [ … ] }, "shiftId": "string" }

Request

Security
M2X_auth_application
Query
startstring(date)required

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

endstring(date)required

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

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/deliveries?start=2019-08-24&end=2019-08-24' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
idstring
Example: "D001"
constraintIdstring or null
Example: "D001"
externalIdstring or null
dispatchGroupIdstring or null
Example: "ABC1123-asdasdasd-123213"
deletedboolean
vehicleIdstring
Example: "D001"
vehicleExternalIdstring or null
Any of:
string
driverFuelDriver (object) or null
Any of:
object FuelDriver Recursive
locationobject(JobLocation)
productsArray of objects(DynamicFulfilmentProduct)
shiftMetadataobject(ShiftMetadata)
actualobject or null
]
Response
application/json
[ { "id": "D001", "constraintId": "D001", "externalId": "string", "dispatchGroupId": "ABC1123-asdasdasd-123213", "deleted": true, "vehicleId": "D001", "vehicleExternalId": "string", "driver": { … }, "location": { … }, "products": [ … ], "shiftMetadata": { … }, "actual": { … } } ]

Upsert a delivery request that references tanks at the delivery location

Request

Security
M2X_auth_application
Path
deliveryRequestIdstringrequired

The unique delivery requests Id

Bodyapplication/json
customerobject(CarrierCustomerMappingRequest)required
customer.​customerNamestring
Example: "Fruit World"
customer.​customerIdstring
Example: "Yc7cXUulBhMM58iuOQce"
customer.​externalIdstring
Example: "FTW"
customer.​integrationIdstring
Example: "C99"
locationobject(CarrierLocationMappingRequest)required
location.​locationIdstring or null

M2X internal tracking id for the location code used

Default null
Example: "C6mruxd3AVUTW14vEZ0v"
location.​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"
location.​externalIdstring or null

External Id

Default null
Example: "WHC6"
location.​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"
location.​latitudenumber
Default 0
Example: -36.983882
location.​longitudenumber
Default 0
Example: 174.709879
location.​locationNameResolutionEnabledboolean

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

Default false
location.​saveIfUnknownboolean

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

Default false
tanksArray of objects(CarrierTankMappingRequest)required
tanks[].​tankNamestring
tanks[].​tankIdstring

M2X internal tank id

tanks[].​integrationIdstring
tanks[].​productobject(CarrierProductMappingRequest)
tanks[].​quantitynumber

The product quantity

Default 0
externalIdstring
prioritystring(DynamicFulfilmentActivityPriority)
Enum"LOW""MEDIUM""HIGH"
orderDaystring(date)(DynamicFulfilmentOrderDay)
targetDatestring(date)(DynamicFulfilmentTargetDate)
shortNotestring(DynamicFulfilmentShortNote)
officeNotesstring(DynamicFulfilmentOfficeNotes)
propertiesobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

associationConstraintsArray of objects(AssociationConstraint)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/fuel/bulkTankDeliveryRequests/{deliveryRequestId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "customer": {
      "customerName": "Fruit World",
      "customerId": "Yc7cXUulBhMM58iuOQce",
      "externalId": "FTW",
      "integrationId": "C99"
    },
    "location": {
      "locationId": "C6mruxd3AVUTW14vEZ0v",
      "addressText": "123 Example Road, Auckland 1010",
      "externalId": "WHC6",
      "locationName": "Auckland Storage 1",
      "latitude": -36.983882,
      "longitude": 174.709879,
      "locationNameResolutionEnabled": false,
      "saveIfUnknown": false
    },
    "tanks": [
      {
        "tankName": "string",
        "tankId": "string",
        "integrationId": "string",
        "product": {
          "productCodeName": "string",
          "productCodeId": "string",
          "integrationId": "string"
        },
        "quantity": 0
      }
    ],
    "externalId": "string",
    "priority": "LOW",
    "orderDay": "2019-08-24",
    "targetDate": "2019-08-24",
    "shortNote": "string",
    "officeNotes": "string",
    "properties": null,
    "metadata": null,
    "readonlyFields": {
      "deleted": false,
      "customer": false,
      "location": false,
      "priority": false,
      "properties": false
    },
    "associationConstraints": [
      {
        "operation": "LOADING",
        "entities": [
          "VEHICLE"
        ],
        "conditionType": "REQUIRE",
        "constraintLabelId": "string"
      }
    ]
  }'

Responses

Successful Operation

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

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