Create Service Area
Create a new service area in Last Mile Intelligence.
Operation
Section titled “Operation”createServiceArea
Resource
Section titled “Resource”serviceArea
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Service Area Data | JSON | Yes | - | Service area object with required fields |
Service Area Data Fields
Section titled “Service Area Data Fields”| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Area name |
| description | string | No | Area description |
| terminalId | string | No | Associated terminal ID |
| polygon | object | No | GeoJSON polygon defining the area |
Response
Section titled “Response”Success
Section titled “Success”{ "id": "sa_new123", "name": "West Suburbs", "description": "Western suburban area", "terminalId": "term_chicago", "isActive": true, "createdAt": "2024-06-21T09:00:00Z"}{ "success": false, "error": "Validation failed", "details": { "polygon": "Invalid GeoJSON format" }}Error Handling
Section titled “Error Handling”- Missing API Token: LMI credential is missing API token
- Invalid Polygon: GeoJSON polygon format is invalid
- Terminal Not Found: Terminal ID does not exist
- Permission Denied: API token lacks permission for this operation