--- title: "Zeo Route Planner API - Create Route | Fleet Management & Route Optimization API" author: Zeo Route Planner Team description: “Set up a new delivery or pickup route from scratch, including stops and driver assignment. A core tool for automating logistics.” tags: [API documentation, create route, fleet management, route optimization, delivery management, Zeo] url: https://api.zeorouteplanner.com/create-route.html canonical_url: https://api.zeorouteplanner.com/create-route.html layout: page --- # Create Route API Endpoint **API Docs / Store Owner Api's / Create Route** This endpoint creates the route. Add the query parameters stops, route_name, route_date, driver_id, start_address, end_address, start_latitude, end_latitude, start_longitude, and end_longitude to retrieve the route for a given date. It will generate optimized routes in a matter of seconds. **Base URL:** `https://zeorouteplanner.com/` #### HTTP Request **POST** `{{base_url}}/api/v5/routes` #### Query Parameters | Parameter | Default | Description | |-----------|---------|-------------| | `api_key` | `""` | Api Access key | | `driver_id` | `""` | Driver id we get from all driver api's | | `start_address` | `""` | Route Start address | | `start_latitude` | `""` | Start address Latitude | | `start_longitude` | `""` | Start address Longitude | | `end_address` | `""` | Route End address | | `end_latitude` | `""` | End address Latitude | | `end_longitude` | `""` | End address Longitude | | `route_name` | `""` | Name of the Route | | `driver_id` | `""` | Driver Id to assign route | | `orginal` | `""` | Original route flag | | `stops` | `[]` | Stops between routes | | `route_date` | `''` | Route Date | #### Stops Object Parameters | Parameter | Default | Description | |-----------|---------|-------------| | `address` | `""` | Stop address | | `latitude` | `""` | Address Latitude | | `longitude` | `""` | Address Longitude | | `notes` | `""` | Any message to add | | `optimize_status` | `"normal"` | Optimization status | | `stop_duration` | `"Stay at stop"` | Duration to stay at stop | | `arrive_start` | `""` | "now" | | `arrive_end` | `""` | "anytime" | | `earliest` | `""` | Earliest arrival time | | `latest` | `""` | Latest arrival time | | `stop_type` | `""` | (delivery/pickup) | | `customer_name` | `""` | Customer Name | | `customer_mobile_number` | `""` | Customer Contact No | | `parcel_count` | `1` | Parcel Count | | `metadata` | `[{}]` | Custom Field | ## Sample Request **Copy Code** ```bash curl --location -g --request POST '{{base_url}}/api/v5/routes' \ --header 'Content-Type: application/json' \ --data-raw '{ "api_key" : "api_key", "start_address" : "Monroe, NC, USA", "start_latitude" : 0.0, "start_longitude" :0.0, "end_address" : "Monroe, NC, USA", "end_latitude" : 0.0, "end_longitude" :0.0, "route_name" : "July 2020 Roadtrip", "driver_id": "44968", "orginal": true, "route_date": "", "stops" : [ { "address": "Gwalior Madhaya Predesh", "latitude":106.672053, "longitude":0.0, "notes":"dsf", "optimize_status":"normal", "stop_duration":5, "parcel_count": "", "arrive_start":"now", "arrive_end":"anytime", "earliest":0, "latest":0, "stop_type":"delivery", "customer_name":"nishu", "customer_mobile_number":"+911234567890", "metadata": [{}] } ] }' ``` ## Response The above command returns JSON structured like this: **Copy Code** ```json { "code": 200, "status": true, "message": "success", "data": { "route": { "id": 103110, "start_address": "new york", "end_address": "new york", "start_latitude": 40.7128, "start_longitude": 74.006, "end_latitude": 40.7128, "end_longitude": 74.006, "created_at": "2021-07-21T04:07:41.000Z", "route_name": "test", "route_stops": [ { "id": 222472903, "address": "17475 Northwest 27th Avenue, Miami Gardens, FL, USA", "latitude": 25.9330248, "longitude": -80.2445472, "notes": "GOod", "optimize_status": "normal", "stop_duration": 10, "customer_name": "", "customer_mobile_number": "", "street": "17475 NW 27th Ave, Miami Gardens, FL 33056, EE. UU.", "city": "Miami-Dade County", "state": "Florida", "country": "Estados Unidos", "postal_code": "33056", "customer_email": "", "order_number": "", "order_status": "route_created", "h_no": "", "locality": "" } ] } } } ```