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

ISO containers

ISO containers information

Operations
OperationsWebhooks
Operations

Request

Security
M2X_auth_application
Path
depotIdstringrequired

The depot Id

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

Responses

Successful operation

Bodyapplication/json
namestring
Example: "A test depot"
createdstring(date-time)
updatedstring(date-time)
locationobject(Location)
deletedboolean
Example: false
publishedboolean
Example: false
Response
application/json
{ "name": "A test depot", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z", "location": { "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null }, "deleted": false, "published": false }

Request

Security
M2X_auth_application
Query
lastDepotIdstring

The last lastDepotId, query would start after that.

pagesToReturninteger

Number of depots to return, default/max 20.

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/depots?lastDepotId=string&pagesToReturn=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
lastDepotIdstring

Document from where the page starts

pagesToReturninteger

Page size

depotsArray of objects(Depot)

Queried locations

latestDepotIdinteger

Last document in this batch

Response
application/json
{ "lastDepotId": "string", "pagesToReturn": 0, "depots": [ { … } ], "latestDepotId": 0 }

Request

Security
M2X_auth_application
Path
locationIdstringrequired

The M2X internal location id

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

Responses

Successful operation

Bodyapplication/json
locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
idstring
Example: "D001"
updatedstring or null(date-time)
Response
application/json
{ "locationKind": "Farm", "shortName": "Dreamy Farm", "areaName": "Mystery Creek", "facilityName": "Main Yards", "addressText": "Main Yards", "latitude": 0, "longitude": 0, "externalId": "string", "inboundIntegrationIds": [ "string" ], "disabled": false, "onHold": false, "customer": null, "mobile": "+33 123", "phone": "+33 123", "email": "asd@asd.asd", "hazards": "string", "notes": "string", "properties": null, "requirements": null, "restrictions": null, "metadata": null, "readonlyFields": { "disabled": false, "latitude": false, "longitude": false, "notes": false, "hazards": false, "shortName": false, "externalId": false, "inboundIntegrationIds": false, "areaName": false, "facilityName": false, "locationKind": false, "customer": false, "mobile": false, "phone": false, "email": false, "onHold": false, "gtnCaptureRequiredPickup": false, "gtnCaptureRequiredDelivery": false, "openingHours": false }, "accessLatitude": null, "accessLongitude": null, "maxIncomingWeight": null, "maxOutgoingWeight": null, "minIncomingWeight": null, "minOutgoingWeight": null, "offRoadDistance": null, "offRoadDuration": null, "waitTime": null, "contactName": null, "contactNotes": null, "dairySupplyGeneration": null, "geofenceType": "Circular", "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))", "radius": 300, "geofenceAlerting": null, "gtnCaptureRequiredPickup": "MANDATORY", "gtnCaptureRequiredDelivery": "MANDATORY", "openingHours": {}, "weeklySupplyGeneration": { "enabled": true, "interactionsInstructions": [ … ], "defaultProductEnabled": true, "dayCollectionWindow": { … }, "generationBasis": "PATTERN", "patternType": "TWICE_WEEKLY", "pattern": [ … ], "patternStartDay": "2024-01-01", "customPriority": "HIGH", "isTopupSite": true, "product": { … }, "productQuantity": 0 }, "id": "D001", "updated": "2019-08-24T14:15:22Z" }

Request

Security
M2X_auth_application
Path
locationIdstringrequired

The M2X internal location id

Bodyapplication/jsonrequired

Update for the location

locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
locationGroupUpsertRequestobject(LocationGroupUpsertRequest)
curl -i -X PUT \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations/{locationId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "locationKind": "Farm",
    "shortName": "Dreamy Farm",
    "areaName": "Mystery Creek",
    "facilityName": "Main Yards",
    "addressText": "Main Yards",
    "latitude": 0,
    "longitude": 0,
    "externalId": "string",
    "inboundIntegrationIds": [
      "string"
    ],
    "disabled": false,
    "onHold": false,
    "customer": null,
    "mobile": "+33 123",
    "phone": "+33 123",
    "email": "asd@asd.asd",
    "hazards": "string",
    "notes": "string",
    "properties": null,
    "requirements": null,
    "restrictions": null,
    "metadata": null,
    "readonlyFields": {
      "disabled": false,
      "latitude": false,
      "longitude": false,
      "notes": false,
      "hazards": false,
      "shortName": false,
      "externalId": false,
      "inboundIntegrationIds": false,
      "areaName": false,
      "facilityName": false,
      "locationKind": false,
      "customer": false,
      "mobile": false,
      "phone": false,
      "email": false,
      "onHold": false,
      "gtnCaptureRequiredPickup": false,
      "gtnCaptureRequiredDelivery": false,
      "openingHours": false
    },
    "accessLatitude": null,
    "accessLongitude": null,
    "maxIncomingWeight": null,
    "maxOutgoingWeight": null,
    "minIncomingWeight": null,
    "minOutgoingWeight": null,
    "offRoadDistance": null,
    "offRoadDuration": null,
    "waitTime": null,
    "contactName": null,
    "contactNotes": null,
    "dairySupplyGeneration": null,
    "geofenceType": "Circular",
    "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))",
    "radius": 300,
    "geofenceAlerting": null,
    "gtnCaptureRequiredPickup": "MANDATORY",
    "gtnCaptureRequiredDelivery": "MANDATORY",
    "openingHours": {},
    "weeklySupplyGeneration": {
      "enabled": true,
      "interactionsInstructions": [
        {
          "storageId": "string",
          "storageName": "string",
          "onHold": true,
          "capacity": {
            "capacityFuelMinPumpableLitres": 0,
            "capacityFuelSafeFillLitres": 0,
            "capacityFuelSafetyStockLitres": 0,
            "capacityLitres": 0
          },
          "product": {
            "productCodeId": "string",
            "productCodeName": "string",
            "productId": "string",
            "productLinearRate": 0
          },
          "productLinearRateCalculated": true
        }
      ],
      "defaultProductEnabled": true,
      "dayCollectionWindow": {
        "startTime": "07:00",
        "endTime": "28:00"
      },
      "generationBasis": "PATTERN",
      "patternType": "TWICE_WEEKLY",
      "pattern": [
        {
          "monday": {
            "day": true,
            "night": true
          },
          "tuesday": {
            "day": true,
            "night": true
          },
          "wednesday": {
            "day": true,
            "night": true
          },
          "thursday": {
            "day": true,
            "night": true
          },
          "friday": {
            "day": true,
            "night": true
          },
          "saturday": {
            "day": true,
            "night": true
          },
          "sunday": {
            "day": true,
            "night": true
          }
        }
      ],
      "patternStartDay": "2024-01-01",
      "customPriority": "HIGH",
      "isTopupSite": true,
      "product": {
        "productCodeName": "string",
        "productCodeId": "string",
        "productId": "string",
        "productBundle": {
          "payload": [
            {
              "productCode": {
                "productCodeId": "string",
                "productCodeName": "string",
                "productId": "string"
              },
              "proportion": 0,
              "quantity": 0,
              "description": "string",
              "itemId": "string",
              "productLinearRate": 0
            }
          ]
        }
      },
      "productQuantity": 0
    },
    "locationGroupUpsertRequest": {
      "name": "string",
      "saveIfUnknown": false,
      "integrationId": "string",
      "code": "string",
      "type": "Supplier",
      "agentsIntegrationIds": [
        "string"
      ],
      "locationPoolsIntegrationIds": [
        "string"
      ]
    }
  }'

Responses

Successful operation

Bodyapplication/json
locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
idstring
Example: "D001"
updatedstring or null(date-time)
Response
application/json
{ "locationKind": "Farm", "shortName": "Dreamy Farm", "areaName": "Mystery Creek", "facilityName": "Main Yards", "addressText": "Main Yards", "latitude": 0, "longitude": 0, "externalId": "string", "inboundIntegrationIds": [ "string" ], "disabled": false, "onHold": false, "customer": null, "mobile": "+33 123", "phone": "+33 123", "email": "asd@asd.asd", "hazards": "string", "notes": "string", "properties": null, "requirements": null, "restrictions": null, "metadata": null, "readonlyFields": { "disabled": false, "latitude": false, "longitude": false, "notes": false, "hazards": false, "shortName": false, "externalId": false, "inboundIntegrationIds": false, "areaName": false, "facilityName": false, "locationKind": false, "customer": false, "mobile": false, "phone": false, "email": false, "onHold": false, "gtnCaptureRequiredPickup": false, "gtnCaptureRequiredDelivery": false, "openingHours": false }, "accessLatitude": null, "accessLongitude": null, "maxIncomingWeight": null, "maxOutgoingWeight": null, "minIncomingWeight": null, "minOutgoingWeight": null, "offRoadDistance": null, "offRoadDuration": null, "waitTime": null, "contactName": null, "contactNotes": null, "dairySupplyGeneration": null, "geofenceType": "Circular", "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))", "radius": 300, "geofenceAlerting": null, "gtnCaptureRequiredPickup": "MANDATORY", "gtnCaptureRequiredDelivery": "MANDATORY", "openingHours": {}, "weeklySupplyGeneration": { "enabled": true, "interactionsInstructions": [ … ], "defaultProductEnabled": true, "dayCollectionWindow": { … }, "generationBasis": "PATTERN", "patternType": "TWICE_WEEKLY", "pattern": [ … ], "patternStartDay": "2024-01-01", "customPriority": "HIGH", "isTopupSite": true, "product": { … }, "productQuantity": 0 }, "id": "D001", "updated": "2019-08-24T14:15:22Z" }

Request

Security
M2X_auth_application
Query
lastLocationIdstring

The last locationId, query would start after that.

pagesToReturninteger

Number of locations to return, default/max 20.

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations?lastLocationId=string&pagesToReturn=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
lastLocationIdstring

Document from where the page starts

pagesToReturninteger

Page size

locationsArray of objects(JobLocation)

Queried locations

latestLocationIdinteger

Last document in this batch

Response
application/json
{ "lastLocationId": "string", "pagesToReturn": 0, "locations": [ { … } ], "latestLocationId": 0 }

Get paginated locations with more data (for example depots)

Request

Security
M2X_auth_application
Query
lastLocationIdstring

The last locationId, query would start after that.

pagesToReturninteger

Number of locations to return, default/max 20.

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/locationsWithStorage?lastLocationId=string&pagesToReturn=0' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
lastLocationIdstring

Document from where the page starts

pagesToReturninteger

Page size

locationsArray of objects

Queried locations

latestLocationIdinteger

Last document in this batch

Response
application/json
{ "lastLocationId": "string", "pagesToReturn": 0, "locations": [ { … } ], "latestLocationId": 0 }

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
addressTextstring or null

Search by addressText

Default null
pageFromnumber

From which document number to start the page

Default 0
pageSizenumber

How big the page should be

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

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": [ { … } ] }

Request

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

Responses

Successful operation

Bodyapplication/jsonArray [
idstringrequired

the unique geometry region identifier

disabledbooleanrequired
namestringrequired

the name of the geometry region

externalIdstring or null

a short human id for the region

regionGeometryGeoJsonstringrequired

the geojson representation of the geometry

createdstring(date-time)required
updatedstring(date-time)required
]
Response
application/json
[ { "id": "string", "disabled": true, "name": "string", "externalId": "string", "regionGeometryGeoJson": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" } ]

Request

Security
M2X_auth_application
Path
geometryRegionIdstringrequired

The geometry region Id

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

Responses

Successful operation

Bodyapplication/json
idstringrequired

the unique geometry region identifier

disabledbooleanrequired
namestringrequired

the name of the geometry region

externalIdstring or null

a short human id for the region

regionGeometryGeoJsonstringrequired

the geojson representation of the geometry

createdstring(date-time)required
updatedstring(date-time)required
Response
application/json
{ "id": "string", "disabled": true, "name": "string", "externalId": "string", "regionGeometryGeoJson": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }

Find location belonging to a customer

Request

Security
M2X_auth_application
Path
customerIdstringrequired

The customer Id

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

Responses

Successful operation

Bodyapplication/jsonArray [
locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
idstring
Example: "D001"
updatedstring or null(date-time)
]
Response
application/json
[ { "locationKind": "Farm", "shortName": "Dreamy Farm", "areaName": "Mystery Creek", "facilityName": "Main Yards", "addressText": "Main Yards", "latitude": 0, "longitude": 0, "externalId": "string", "inboundIntegrationIds": [ … ], "disabled": false, "onHold": false, "customer": null, "mobile": "+33 123", "phone": "+33 123", "email": "asd@asd.asd", "hazards": "string", "notes": "string", "properties": null, "requirements": null, "restrictions": null, "metadata": null, "readonlyFields": { … }, "accessLatitude": null, "accessLongitude": null, "maxIncomingWeight": null, "maxOutgoingWeight": null, "minIncomingWeight": null, "minOutgoingWeight": null, "offRoadDistance": null, "offRoadDuration": null, "waitTime": null, "contactName": null, "contactNotes": null, "dairySupplyGeneration": null, "geofenceType": "Circular", "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))", "radius": 300, "geofenceAlerting": null, "gtnCaptureRequiredPickup": "MANDATORY", "gtnCaptureRequiredDelivery": "MANDATORY", "openingHours": {}, "weeklySupplyGeneration": { … }, "id": "D001", "updated": "2019-08-24T14:15:22Z" } ]

Request

Security
M2X_auth_application
Path
externalIdstringrequired

The externalId

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

Responses

Successful operation

Bodyapplication/jsonArray [
locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
idstring
Example: "D001"
updatedstring or null(date-time)
]
Response
application/json
[ { "locationKind": "Farm", "shortName": "Dreamy Farm", "areaName": "Mystery Creek", "facilityName": "Main Yards", "addressText": "Main Yards", "latitude": 0, "longitude": 0, "externalId": "string", "inboundIntegrationIds": [ … ], "disabled": false, "onHold": false, "customer": null, "mobile": "+33 123", "phone": "+33 123", "email": "asd@asd.asd", "hazards": "string", "notes": "string", "properties": null, "requirements": null, "restrictions": null, "metadata": null, "readonlyFields": { … }, "accessLatitude": null, "accessLongitude": null, "maxIncomingWeight": null, "maxOutgoingWeight": null, "minIncomingWeight": null, "minOutgoingWeight": null, "offRoadDistance": null, "offRoadDuration": null, "waitTime": null, "contactName": null, "contactNotes": null, "dairySupplyGeneration": null, "geofenceType": "Circular", "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))", "radius": 300, "geofenceAlerting": null, "gtnCaptureRequiredPickup": "MANDATORY", "gtnCaptureRequiredDelivery": "MANDATORY", "openingHours": {}, "weeklySupplyGeneration": { … }, "id": "D001", "updated": "2019-08-24T14:15:22Z" } ]

Request

Security
M2X_auth_application
Path
propertyIdstringrequired

The property Id

Query
valuestringrequired

The property value

curl -i -X GET \
  'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations/propertyLookup/{propertyId}?value=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/jsonArray [
locationKindstring or null
Enum"Farm""Carrier""Port""Warehouse""Sale Yard""Holding Yard""Works""Weighbridge""Accommodation""Quarry"
shortNamestringrequired
Example: "Dreamy Farm"
areaNamestring or null
Example: "Mystery Creek"
facilityNamestring or null
Example: "Main Yards"
addressTextstring or null
Example: "Main Yards"
latitudenumber or null

If null or not provided, the latitude from the current location will be retained. If there is no current latitude, it will be resolved by geocoding.

longitudenumber or null

If null or not provided, the longitude from the current location will be retained. If there is no current longitude, it will be resolved by geocoding.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

inboundIntegrationIdsArray of strings or null
disabledbooleanrequired
Example: false
onHoldboolean
Example: false
customerobject or null

At least one field needs to be provided to resolve the customer

Default null
mobilestring or null

Location mobile number

Example: "+33 123"
phonestring or null

Location phone number

Example: "+33 123"
emailstring or null

Location email

Example: "asd@asd.asd"
hazardsstring or null

Hazards descriptions

notesstring or null

Notes

propertiesobject or null(CustomProperties)
requirementsobject or null(CustomProperties)
restrictionsobject or null(CustomProperties)
metadataobject or null(Metadata)
readonlyFieldsobject or null

Specifies which field should not be touched by the user

accessLatitudenumber or null
Default null
accessLongitudenumber or null
Default null
maxIncomingWeightnumber or null
Default null
maxOutgoingWeightnumber or null
Default null
minIncomingWeightnumber or null
Default null
minOutgoingWeightnumber or null
Default null
offRoadDistancenumber or null
Default null
offRoadDurationnumber or null
Default null
waitTimenumber or null
Default null
contactNamestring or null
Default null
contactNotesstring or null
Default null
dairySupplyGenerationobject or null
Default null
geofenceTypestring or null
Default null
Enum"Circular""Polygon"null
polygonGeofencestring or null

If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)

Default null
Example: "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))"
radiusinteger or null

If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long

Default null
Example: 300
geofenceAlertingobject or null
Default null
gtnCaptureRequiredPickupstring or null

Policy for weighbridge input on pickup

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
gtnCaptureRequiredDeliverystring or null

Policy for weighbridge input on delivery

Default null
Enum"MANDATORY""OPTIONAL""NONE"null
openingHoursnull or LocationOpeningHours (object)
Any of:
null
weeklySupplyGenerationobject or null
idstring
Example: "D001"
updatedstring or null(date-time)
]
Response
application/json
[ { "locationKind": "Farm", "shortName": "Dreamy Farm", "areaName": "Mystery Creek", "facilityName": "Main Yards", "addressText": "Main Yards", "latitude": 0, "longitude": 0, "externalId": "string", "inboundIntegrationIds": [ … ], "disabled": false, "onHold": false, "customer": null, "mobile": "+33 123", "phone": "+33 123", "email": "asd@asd.asd", "hazards": "string", "notes": "string", "properties": null, "requirements": null, "restrictions": null, "metadata": null, "readonlyFields": { … }, "accessLatitude": null, "accessLongitude": null, "maxIncomingWeight": null, "maxOutgoingWeight": null, "minIncomingWeight": null, "minOutgoingWeight": null, "offRoadDistance": null, "offRoadDuration": null, "waitTime": null, "contactName": null, "contactNotes": null, "dairySupplyGeneration": null, "geofenceType": "Circular", "polygonGeofence": "POLYGON ((-105.0105 39.7617,-105.0108 39.7614,-105.0111 39.7616,-105.0105 39.7617))", "radius": 300, "geofenceAlerting": null, "gtnCaptureRequiredPickup": "MANDATORY", "gtnCaptureRequiredDelivery": "MANDATORY", "openingHours": {}, "weeklySupplyGeneration": { … }, "id": "D001", "updated": "2019-08-24T14:15:22Z" } ]

Request

webhook type: LOCATION

Bodyapplication/jsonrequired
addressTextstringrequired
latitudenumberrequired
Default 0
longitudenumberrequired
Default 0
locationNamestringrequired
locationIdstring or null

The M2X internal location id. When a location is manually created in M2X, this is a randomly generated unique identifier. If creating locations via API, the caller can set the Location ID.

externalIdstring or null

An optional external identifier assigned to the location. This ID can be provided when creating the location and is typically used for cross-system referencing or integration with external data sources.

timezonestring

IANA (aka TZ database) timezone name

Example: "Pacific/Auckland"
propertiesobject or null
Default null
actionstring

The action that was performed on the location

Enum"create""update""disable"
Example: "create"
application/json
{ "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null, "action": "create" }

Responses

Webhook received successfully

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