M2X APIs
- get all geometry regions
M2X APIS (1.0.0)
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/depots/{depotId}
- https://developer.m2x.app/apis/v0/depots/{depotId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/depots/{depotId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/depots/{depotId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/depots/{depotId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/depots/{depotId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/depots/{depotId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "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 }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/depots
- https://developer.m2x.app/apis/v0/depots
- NZ Production server (uses live data)https://m2x.app/apis/v0/depots
- US Production server (uses live data)https://us.m2x.app/apis/v0/depots
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/depots
- Sandbox serverhttps://staging.m2x.app/apis/v0/depots
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/depots?lastDepotId=string&pagesToReturn=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "lastDepotId": "string", "pagesToReturn": 0, "depots": [ { … } ], "latestDepotId": 0 }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations/{locationId}
- https://developer.m2x.app/apis/v0/locations/{locationId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations/{locationId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations/{locationId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations/{locationId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations/{locationId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations/{locationId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
{ "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" }
Update for the location
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations/{locationId}
- https://developer.m2x.app/apis/v0/locations/{locationId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations/{locationId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations/{locationId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations/{locationId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations/{locationId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
]
}
}'Successful operation
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
{ "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" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations
- https://developer.m2x.app/apis/v0/locations
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations?lastLocationId=string&pagesToReturn=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "lastLocationId": "string", "pagesToReturn": 0, "locations": [ { … } ], "latestLocationId": 0 }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locationsWithStorage
- https://developer.m2x.app/apis/v0/locationsWithStorage
- NZ Production server (uses live data)https://m2x.app/apis/v0/locationsWithStorage
- US Production server (uses live data)https://us.m2x.app/apis/v0/locationsWithStorage
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locationsWithStorage
- Sandbox serverhttps://staging.m2x.app/apis/v0/locationsWithStorage
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/locationsWithStorage?lastLocationId=string&pagesToReturn=0' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "lastLocationId": "string", "pagesToReturn": 0, "locations": [ { … } ], "latestLocationId": 0 }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations/search
- https://developer.m2x.app/apis/v0/locations/search
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations/search
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations/search
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations/search
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
}'{ "from": 0, "size": 0, "total": 0, "hits": [ { … } ] }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/geometryRegions
- https://developer.m2x.app/apis/v0/geometryRegions
- NZ Production server (uses live data)https://m2x.app/apis/v0/geometryRegions
- US Production server (uses live data)https://us.m2x.app/apis/v0/geometryRegions
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/geometryRegions
- Sandbox serverhttps://staging.m2x.app/apis/v0/geometryRegions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://developer.m2x.app/_mock/apis/publicapi/openapi/geometryRegions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'[ { "id": "string", "disabled": true, "name": "string", "externalId": "string", "regionGeometryGeoJson": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" } ]
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/geometryRegions/{geometryRegionId}
- https://developer.m2x.app/apis/v0/geometryRegions/{geometryRegionId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/geometryRegions/{geometryRegionId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/geometryRegions/{geometryRegionId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/geometryRegions/{geometryRegionId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/geometryRegions/{geometryRegionId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/geometryRegions/{geometryRegionId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'{ "id": "string", "disabled": true, "name": "string", "externalId": "string", "regionGeometryGeoJson": "string", "created": "2019-08-24T14:15:22Z", "updated": "2019-08-24T14:15:22Z" }
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}/locations
- https://developer.m2x.app/apis/v0/customers/{customerId}/locations
- NZ Production server (uses live data)https://m2x.app/apis/v0/customers/{customerId}/locations
- US Production server (uses live data)https://us.m2x.app/apis/v0/customers/{customerId}/locations
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/customers/{customerId}/locations
- Sandbox serverhttps://staging.m2x.app/apis/v0/customers/{customerId}/locations
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/customers/{customerId}/locations' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
[ { "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" } ]
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations/externalIdLookup/{externalId}
- https://developer.m2x.app/apis/v0/locations/externalIdLookup/{externalId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations/externalIdLookup/{externalId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations/externalIdLookup/{externalId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations/externalIdLookup/{externalId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations/externalIdLookup/{externalId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations/externalIdLookup/{externalId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
[ { "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" } ]
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/locations/propertyLookup/{propertyId}
- https://developer.m2x.app/apis/v0/locations/propertyLookup/{propertyId}
- NZ Production server (uses live data)https://m2x.app/apis/v0/locations/propertyLookup/{propertyId}
- US Production server (uses live data)https://us.m2x.app/apis/v0/locations/propertyLookup/{propertyId}
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/locations/propertyLookup/{propertyId}
- Sandbox serverhttps://staging.m2x.app/apis/v0/locations/propertyLookup/{propertyId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://developer.m2x.app/_mock/apis/publicapi/openapi/locations/propertyLookup/{propertyId}?value=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Successful operation
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.
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.
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.
If geofenceType is "Polygon" uses this WKT closed polygon (last and first lat/long pair must match)
If geofenceType is "Circular" uses this integer radius in meters around the determined or provided lat/long
Policy for weighbridge input on pickup
Policy for weighbridge input on delivery
[ { "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" } ]
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.
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.
- Mock serverhttps://developer.m2x.app/_mock/apis/publicapi/openapi/Location
- https://developer.m2x.app/apis/v0/Location
- NZ Production server (uses live data)https://m2x.app/apis/v0/Location
- US Production server (uses live data)https://us.m2x.app/apis/v0/Location
- AUS Production server (uses live data)https://au.m2x.app/apis/v0/Location
- Sandbox serverhttps://staging.m2x.app/apis/v0/Location
{ "addressText": "string", "latitude": 0, "longitude": 0, "locationName": "string", "locationId": "string", "externalId": "string", "timezone": "Pacific/Auckland", "properties": null, "action": "create" }