Create Location
Create a new location in Last Mile Intelligence.
Operation
Section titled “Operation”createLocation
Resource
Section titled “Resource”location
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Location Data | JSON | Yes | - | Location object with required fields |
Location Data Fields
Section titled “Location Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Location name |
| type | string | Yes | Location type (warehouse, terminal, etc.) |
| address | object | Yes | Address object with street, city, state, zip |
| coordinates | object | No | Lat/lng coordinates |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "loc_new123", "name": "South Distribution Center", "type": "warehouse", "address": { "street": "500 Logistics Way", "city": "Indianapolis", "state": "IN", "zip": "46201" }, "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "address": "Address is required" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Geocoding Failed: Could not geocode the provided address
- Validation Error: Required fields missing or invalid
- Permission Denied: API token lacks permission for this operation