> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Route4Me

The Route4Me connector lets your AI agent act in each user's Route4Me account. Each user connects their own Route4Me API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 54 tools.

**Authentication:** API Key
**Categories:** Automation, Productivity
**Tools:** 54: 23 read, 21 write, 10 destructive
**Users sign in with:** API key
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=ROUTE4ME)

## Setup

1. ### Install the SDK

   **Node.js**

   ```bash
   npm install @scalekit-sdk/node dotenv
   ```

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Route4Me connection

   In **AgentKit > Connections**, create a Route4Me connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'route4me'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Route4Me:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'route4me_activities_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "route4me"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Route4Me:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="route4me_activities_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Route4Me credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'route4me_activities_list',
  toolInput: {},
  connector: 'route4me',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="route4me_activities_list",
    tool_input={},
    connection_name="route4me",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `route4me_activities_list`

List Activities · Read-only

List activity feed events (stops visited/departed, routes optimized, notes added, members changed, geofence events...), optionally for one route or type. Returns results (activities with activity_id, activity_type, activity_message, route_id, member and timestamp) and total. Use this to audit what happened. Use route4me_activity_log to add a message.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `activity_type` (`string`, optional): Only this type, e.g. mark-destination-visited, mark-destination-departed, route-optimized, note-insert, insert-destination, delete-destination, route-delete, member-created, geofence-entered, user_message. Example: mark-destination-visited.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.
- `route_id` (`string`, optional): Only activities for this route. Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `team` (`boolean`, optional): true for team activities on the route. Example: true.

Example input: `{}`

### `route4me_avoidance_zone_get`

Get Avoidance Zone · Read-only

Get one avoidance zone (an area routes must avoid). Returns its name, color and shape. Use this when you know the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `territory_id` (`string`, required): Avoidance zone ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.

Example input: `{"territory_id":"<territory_id>"}`

### `route4me_avoidance_zones_list`

List Avoidance Zones · Read-only

List avoidance zone areas. Returns items with territory_id, territory_name, territory_color and territory shape. Use this to find IDs. Use route4me_avoidance_zone_get for one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `route4me_geocode`

Geocode Addresses · Read-only

Geocode one or more addresses (separated by new lines) or reverse-geocode a lat,lng pair. Returns geocoding results with address, lat, lng and type. Use this to get coordinates before creating orders or optimizations.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `addresses` (`string`, required): Address(es) or a latitude,longitude pair. Example: Los Angeles International Airport, CA.
- `format` (`string`, optional): Response format. Example: json. One of: `json`, `xml`.

Example input: `{"addresses":"<addresses>"}`

### `route4me_location_group_get`

Get Location Group · Read-only

Get one address book group. Returns the group's name, color and filter. Use this when you know the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `group_id` (`string`, required): Group ID. Example: 4F39929B6A8A9D3E9A6B2B9F6B5C2E11.

Example input: `{"group_id":"<group_id>"}`

### `route4me_location_groups_list`

List Location Groups · Read-only

List address book groups (saved filters of locations). Returns groups with group_id, group_name, group_color and filter. Use this to find a group_id.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.

Example input: `{}`

### `route4me_locations_get`

Get Locations by ID · Read-only

Get address book locations by ID. Returns the locations. Use this when you know the IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address_id` (`string`, required): Location ID, or several separated by commas. Example: 37023651.

Example input: `{"address_id":"<address_id>"}`

### `route4me_locations_list`

List Locations · Read-only

List or search address book locations. Returns results (locations with address_id, address_1, coordinates, alias, contact) and total. Use this to browse or search. Use route4me_locations_get for specific IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `display` (`string`, optional): routed for locations already in routes, unrouted for the rest, all (default). Example: all. One of: `all`, `routed`, `unrouted`.
- `fields` (`string`, optional): Comma-separated fields to return. Example: address_id,address_1,address_alias.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.
- `query` (`string`, optional): Search text. Example: Milford.

Example input: `{}`

### `route4me_optimization_get`

Get Optimization · Read-only

Get one optimization problem. Returns state, parameters, addresses and the routes produced. Use this to check an optimization's state or find its routes.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `optimization_problem_id` (`string`, required): Optimization problem ID (32-character hex). Example: 07372F2CF3814EC6DFFAFE92E22771AA.

Example input: `{"optimization_problem_id":"<optimization_problem_id>"}`

### `route4me_optimizations_list`

List Optimizations · Read-only

List optimization problems, optionally by state or date range. Returns optimizations with optimization_problem_id, state, parameters and route counts. Use this to browse plans. Use route4me_optimization_get for one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `end_date` (`string`, optional): End date (YYYY-MM-DD). Example: 2026-01-31.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.
- `start_date` (`string`, optional): Start date (YYYY-MM-DD). Example: 2026-01-01.
- `state` (`string`, optional): Comma-separated states: 1 initial, 2 matrix processing, 3 optimizing, 4 optimized, 5 error, 6 computing directions. Example: 4.

Example input: `{}`

### `route4me_order_get`

Get Orders by ID · Read-only

Get one or more orders by ID. Returns the orders. Use this when you know the IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `order_id` (`string`, required): Order ID, or several separated by commas. Example: 7205704,7205705.

Example input: `{"order_id":"<order_id>"}`

### `route4me_orders_list`

List Orders · Read-only

List or search orders, optionally by date added or scheduled date. Returns results (orders with order_id, address_1, coordinates, scheduled date, status) and total. Use this to find orders. Use route4me_order_get for specific IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `day_added_yymmdd` (`string`, optional): Date the order was added (YYYY-MM-DD). Example: 2026-01-15.
- `fields` (`string`, optional): Comma-separated fields to return. Example: order_id,address_1,day_scheduled_for_YYMMDD.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.
- `query` (`string`, optional): Text to search in all order fields. Example: Lafayette.
- `scheduled_for_yymmdd` (`string`, optional): Scheduled date (YYYY-MM-DD). Example: 2026-01-20.

Example input: `{}`

### `route4me_route_address_get`

Get Route Address · Read-only

Get one stop of a route, optionally with its notes. Returns the stop with address, coordinates, sequence, visited/departed status, time windows and notes. Use this for one stop's details.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `notes` (`integer`, optional): 1 to include notes. Example: 1.

Example input: `{"route_destination_id":183045808,"route_id":"<route_id>"}`

### `route4me_route_get`

Get Route · Read-only

Get one route with its stops, optionally with directions, path, tracking history and notes. Returns the route with route_id, parameters, addresses (stops with route_destination_id, sequence, ETA), trip distance and duration. Use this to read a route. Use route4me_routes_list to find route IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `compress_path_points` (`boolean`, optional): Compress path points. Example: false.
- `device_tracking_history` (`integer`, optional): 1 to include GPS tracking history. Example: 0.
- `directions` (`integer`, optional): 1 to include turn-by-turn directions. Example: 0.
- `notes` (`integer`, optional): 1 to include stop notes. Example: 1.
- `original` (`integer`, optional): 1 to include the original (pre-change) route. Example: 0.
- `route_path_output` (`string`, optional): Points to include the route path as points. Example: Points.

Example input: `{"route_id":"<route_id>"}`

### `route4me_routes_list`

List Routes · Read-only

List routes, newest first, optionally by date range. Returns routes with route_id, parameters (route_name, route_date), stop counts, distance and duration. Use this to browse routes. Use route4me_routes_search for a text search.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `end_date` (`string`, optional): End date (YYYY-MM-DD). Example: 2026-01-31.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.
- `start_date` (`string`, optional): Start date (YYYY-MM-DD). Example: 2026-01-01.

Example input: `{}`

### `route4me_routes_search`

Search Routes · Read-only

Search routes by text (name, addresses...). Returns matching routes with route_id and parameters. Use this to find a route by name or stop. Use route4me_routes_list to browse.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, required): Text to search for. Example: Milledgeville.
- `limit` (`integer`, optional): Number of records to return. Example: 20.
- `offset` (`integer`, optional): Number of records to skip. Example: 0.

Example input: `{"query":"<query>"}`

### `route4me_settings_list`

List Configuration Settings · Read-only

Get all account configuration keys, or one by key. Returns config keys and values. Use this to read account settings.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `config_key` (`string`, optional): Only this key. Example: destination_icon_uri.

Example input: `{}`

### `route4me_territories_list`

List Territories · Read-only

List territory areas. Returns items with territory_id, territory_name, territory_color and territory shape. Use this to find IDs. Use route4me_territory_get for one.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `route4me_territory_get`

Get Territory · Read-only

Get one territory (an area used to group stops and assign routes). Returns its name, color and shape, and optionally enclosed addresses and orders. Use this when you know the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `territory_id` (`string`, required): Territory ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.
- `addresses` (`integer`, optional): 1 to include enclosed addresses. Example: 1.
- `orders` (`integer`, optional): 1 to include enclosed orders. Example: 1.

Example input: `{"territory_id":"<territory_id>"}`

### `route4me_tracking_status_get`

Get Tracking Status · Read-only

Get the delivery status of a stop by its tracking number. Returns tracking_number, status history, ETA and the stop's location. Use this to answer 'where is my delivery?'.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `tracking` (`string`, required): Tracking number of the stop or order. Example: Q7G9P1L4.

Example input: `{"tracking":"<tracking>"}`

### `route4me_user_get`

Get User · Read-only

Get one user's details. Returns member_id, name, email, phone, member_type and settings. Use this when you know the member ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `member_id` (`integer`, required): Member ID. Example: 1.

Example input: `{"member_id":1}`

### `route4me_user_locations_list`

List User Locations · Read-only

List the last known GPS location of each user (driver), optionally searched by name. Returns users with member_id, name, last position and timestamp. Use this to see where drivers are.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `query` (`string`, optional): Search text for user names. Example: Jane.

Example input: `{}`

### `route4me_users_list`

List Users · Read-only

List the account's sub-users (drivers, dispatchers). Returns users with member_id, member_first_name, member_last_name, member_email and member_type. Use this for driver IDs.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs: none.

Example input: `{}`

### `route4me_activity_log`

Log Activity Message · Write

Post a user message to the activity feed, optionally on a route. Returns status true on success. Use this to leave a note in the activity feed.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `activity_message` (`string`, required): Message text. Example: Driver delayed by traffic.
- `route_id` (`string`, optional): Route the message is about. Example: 5C15E83A4BE005BCD1537955D28D51D7.

Example input: `{"activity_message":"<activity_message>"}`

### `route4me_avoidance_zone_create`

Create Avoidance Zone · Write

Create a avoidance zone (an area routes must avoid) from a circle, polygon or rectangle. Returns the created item with territory_id. Use this to define an area.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `territory` (`object`, required): Shape: type circle (data: ["lat,lng", "radius meters"]), poly (data: ["lat,lng", ...]) or rect (data: ["lat,lng" top-left, "lat,lng" bottom-right]). Example: {"type": "circle", "data": ["37.5697528227865,-77.4783325195313", "5000"]}
- `territory_name` (`string`, required): Name. Example: sk-test avoidance zone.
- `territory_color` (`string`, optional): Hex color without #. Example: ff7700.

Example input: `{"territory":{"type":"circle","data":["37.5697528227865,-77.4783325195313","5000"]},"territory_name":"<territory_name>"}`

### `route4me_avoidance_zone_update`

Update Avoidance Zone · Write

Update a avoidance zone's name, color or shape. Returns the updated item. Use this to change an area.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `territory` (`object`, required): Shape: type circle (data: ["lat,lng", "radius meters"]), poly (data: ["lat,lng", ...]) or rect (data: ["lat,lng" top-left, "lat,lng" bottom-right]). Example: {"type": "circle", "data": ["37.5697528227865,-77.4783325195313", "5000"]}
- `territory_id` (`string`, required): Avoidance zone ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.
- `territory_name` (`string`, required): Name. Example: sk-test avoidance zone.
- `territory_color` (`string`, optional): Hex color without #. Example: ff7700.

Example input: `{"territory":{"type":"circle","data":["37.5697528227865,-77.4783325195313","5000"]},"territory_id":"<territory_id>","territory_name":"<territory_name>"}`

### `route4me_location_create`

Create Location · Write

Add a location (contact) to the address book, optionally with a recurring schedule. Returns the created location with address_id. Use this to save customers for repeated routing.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address_1` (`string`, required): Street address. Example: 17205 RICHMOND TNPK, MILFORD, VA, 22514.
- `cached_lat` (`number`, required): Latitude. Example: 38.024654.
- `cached_lng` (`number`, required): Longitude. Example: -77.338814.
- `address_alias` (`string`, optional): Location name. Example: sk-test location.
- `address_city` (`string`, optional): City. Example: Milford.
- `address_custom_data` (`object`, optional): Custom key-value data. Example: {"account": "A-1001"}
- `address_email` (`string`, optional): Contact email. Example: jane@example.com.
- `address_group` (`string`, optional): Group name. Example: Key accounts.
- `address_phone_number` (`string`, optional): Contact phone. Example: +1 540-555-0100.
- `address_zip` (`string`, optional): Postal code. Example: 22514.
- `first_name` (`string`, optional): Contact first name. Example: Jane.
- `last_name` (`string`, optional): Contact last name. Example: Doe.
- `schedule` (`array`, optional): Recurring schedule objects (e.g. weekly on given days) for scheduled locations. Example: [{"enabled": true, "mode": "weekly", "weekly": {"every": 1, "weekdays": [1, 3]}}]
- `service_time` (`integer`, optional): Service time in seconds. Example: 300.

Example input: `{"address_1":"<address_1>","cached_lat":38.024654,"cached_lng":-77.338814}`

### `route4me_location_group_create`

Create Location Group · Write

Create an address book group from a filter. Returns the created group with group_id. Use this to save a location filter.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `group_name` (`string`, required): Group name. Example: sk-test key accounts.
- `filter` (`object`, optional): Filter rules selecting the group's locations (field, operator and value). Example: {"condition": "AND", "rules": [{"id": "address_1", "field": "address_1", "operator": "contains", "value": "Milford"}]}
- `group_color` (`string`, optional): Hex color without #. Example: 92e1c0.

Example input: `{"group_name":"<group_name>"}`

### `route4me_location_group_update`

Update Location Group · Write

Update an address book group. Returns the updated group. Use this to rename or change the filter.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `group_id` (`string`, required): Group ID. Example: 4F39929B6A8A9D3E9A6B2B9F6B5C2E11.
- `filter` (`object`, optional): Filter rules selecting the group's locations (field, operator and value). Example: {"condition": "AND", "rules": [{"id": "address_1", "field": "address_1", "operator": "contains", "value": "Milford"}]}
- `group_color` (`string`, optional): Hex color without #. Example: 92e1c0.
- `group_name` (`string`, optional): Group name. Example: sk-test key accounts.

Example input: `{"group_id":"<group_id>"}`

### `route4me_location_update`

Update Location · Write

Update an address book location. Returns the updated location. Use this to change contact details or the schedule.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `address_id` (`integer`, required): Location ID. Example: 37023651.
- `address_1` (`string`, optional): Street address. Example: 17205 RICHMOND TNPK, MILFORD, VA, 22514.
- `address_alias` (`string`, optional): Location name. Example: sk-test location.
- `address_city` (`string`, optional): City. Example: Milford.
- `address_custom_data` (`object`, optional): Custom key-value data. Example: {"account": "A-1001"}
- `address_email` (`string`, optional): Contact email. Example: jane@example.com.
- `address_group` (`string`, optional): Group name. Example: Key accounts.
- `address_phone_number` (`string`, optional): Contact phone. Example: +1 540-555-0100.
- `address_zip` (`string`, optional): Postal code. Example: 22514.
- `cached_lat` (`number`, optional): Latitude. Example: 38.024654.
- `cached_lng` (`number`, optional): Longitude. Example: -77.338814.
- `first_name` (`string`, optional): Contact first name. Example: Jane.
- `last_name` (`string`, optional): Contact last name. Example: Doe.
- `schedule` (`array`, optional): Recurring schedule objects (e.g. weekly on given days) for scheduled locations. Example: [{"enabled": true, "mode": "weekly", "weekly": {"every": 1, "weekdays": [1, 3]}}]
- `service_time` (`integer`, optional): Service time in seconds. Example: 300.

Example input: `{"address_id":37023651}`

### `route4me_optimization_addresses_add`

Add Addresses to Optimization · Write

Insert stops into an existing optimization, optionally re-optimizing it. Returns the updated optimization. Use this to grow a plan. Use route4me_route_addresses_add for a single route.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `addresses` (`array`, required): Stops, each an object with address and lat/lng, plus optional alias, is_depot, time (service seconds), time_window_start/end (seconds), first_name, last_name, email, phone, weight, cube, pieces, revenue and custom_fields. Example: [{"address": "151 Arbor Way Milledgeville GA 31061", "lat": 33.132675, "lng": -83.244743, "is_depot": true, "time": 0}, {"address": "230 Arbor Way Milledgevi...
- `optimization_problem_id` (`string`, required): Optimization problem ID (32-character hex). Example: 07372F2CF3814EC6DFFAFE92E22771AA.
- `reoptimize` (`integer`, optional): 1 to re-optimize after inserting, 0 not to. Example: 1.

Example input: `{"addresses":[],"optimization_problem_id":"<optimization_problem_id>"}`

### `route4me_optimization_create`

Create Optimization · Write

Create and solve a route optimization from a list of stops (the first depot is the start) and route parameters, producing one or more optimized routes. Returns the optimization with optimization_problem_id, state, parameters, addresses in optimized order and routes with route_id. Use this to plan routes from scratch. Use route4me_route_addresses_add to add stops to an existing route.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `addresses` (`array`, required): Stops, each an object with address and lat/lng, plus optional alias, is_depot, time (service seconds), time_window_start/end (seconds), first_name, last_name, email, phone, weight, cube, pieces, revenue and custom_fields. Example: [{"address": "151 Arbor Way Milledgeville GA 31061", "lat": 33.132675, "lng": -83.244743, "is_depot": true, "time": 0}, {"address": "230 Arbor Way Milledgevi...
- `depots` (`array`, optional): Depot objects (same shape as addresses) for multi-depot problems. Example: [{"address": "151 Arbor Way Milledgeville GA 31061", "lat": 33.132675, "lng": -83.244743}]
- `optimized_callback_url` (`string`, optional): URL Route4Me POSTs to when the optimization is solved or fails. Example: https://example.com/route4me/callback.
- `parameters` (`object`, optional): Route parameters: route_name, route_date (Unix date), route_time (seconds after midnight), algorithm_type (1 TSP, 2 VRP, 3 CVRP_TW_SD, 4 CVRP_TW_MD...), optimize (Distance, Time, timeWithTraffic), travel_mode (Driving, Walking, Trucking), distance_unit (mi, km), device_type, vehicle_capacity, route_max_duration and more. Example: {"route_name": "sk-test single driver", "algorithm_type": 1, "optimize": "Distance", "travel_mode": "Driving", "distance_unit": "mi", "route_time": 25200, "d...

Example input: `{"addresses":[]}`

### `route4me_order_create`

Create Order · Write

Create an order (a stop to be scheduled into routes) with address, coordinates, time window and customer details. Returns the created order with order_id. Use this to queue deliveries. Use route4me_optimization_create to route them.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `address_1` (`string`, required): Street address. Example: 318 S 39 St, Lafayette, IN 47909, USA.
- `cached_lat` (`number`, required): Latitude. Example: 40.4141.
- `cached_lng` (`number`, required): Longitude. Example: -86.8501.
- `address_alias` (`string`, optional): Order or stop name. Example: sk-test order 1.
- `address_city` (`string`, optional): City. Example: Lafayette.
- `address_zip` (`string`, optional): Postal code. Example: 47909.
- `day_scheduled_for_yymmdd` (`string`, optional): Scheduled date (YYYY-MM-DD). Example: 2026-01-20.
- `ext_field_custom_data` (`object`, optional): Custom key-value data. Example: {"gate_code": "1234"}
- `ext_field_email` (`string`, optional): Customer email. Example: jane@example.com.
- `ext_field_first_name` (`string`, optional): Customer first name. Example: Jane.
- `ext_field_last_name` (`string`, optional): Customer last name. Example: Doe.
- `ext_field_phone` (`string`, optional): Customer phone. Example: +1 765-555-0100.
- `ext_field_weight` (`number`, optional): Weight. Example: 12.5.
- `local_time_window_end` (`integer`, optional): Time window end in seconds after midnight. Example: 39600.
- `local_time_window_start` (`integer`, optional): Time window start in seconds after midnight. Example: 32400.
- `service_time` (`integer`, optional): Service time in seconds. Example: 300.

Example input: `{"address_1":"<address_1>","cached_lat":40.4141,"cached_lng":-86.8501}`

### `route4me_order_update`

Update Order · Write

Update an order's fields. Returns the updated order. Use this to change an address, schedule or customer details.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `order_id` (`integer`, required): Order ID. Example: 7205704.
- `address_1` (`string`, optional): Street address. Example: 318 S 39 St, Lafayette, IN 47909, USA.
- `address_alias` (`string`, optional): Order or stop name. Example: sk-test order 1.
- `address_city` (`string`, optional): City. Example: Lafayette.
- `address_zip` (`string`, optional): Postal code. Example: 47909.
- `cached_lat` (`number`, optional): Latitude. Example: 40.4141.
- `cached_lng` (`number`, optional): Longitude. Example: -86.8501.
- `day_scheduled_for_yymmdd` (`string`, optional): Scheduled date (YYYY-MM-DD). Example: 2026-01-20.
- `ext_field_custom_data` (`object`, optional): Custom key-value data. Example: {"gate_code": "1234"}
- `ext_field_email` (`string`, optional): Customer email. Example: jane@example.com.
- `ext_field_first_name` (`string`, optional): Customer first name. Example: Jane.
- `ext_field_last_name` (`string`, optional): Customer last name. Example: Doe.
- `ext_field_phone` (`string`, optional): Customer phone. Example: +1 765-555-0100.
- `ext_field_weight` (`number`, optional): Weight. Example: 12.5.
- `local_time_window_end` (`integer`, optional): Time window end in seconds after midnight. Example: 39600.
- `local_time_window_start` (`integer`, optional): Time window start in seconds after midnight. Example: 32400.
- `service_time` (`integer`, optional): Service time in seconds. Example: 300.

Example input: `{"order_id":7205704}`

### `route4me_route_address_mark_departed`

Mark Address Departed · Write

Mark a stop as departed or not departed. Returns the updated stop. Use this to record a departure.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `is_departed` (`boolean`, required): true to mark departed, false to clear. Example: true.
- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.

Example input: `{"is_departed":true,"route_destination_id":183045808,"route_id":"<route_id>"}`

### `route4me_route_address_mark_visited`

Mark Address Visited · Write

Mark a stop as visited or not visited. Returns the updated stop. Use this to record a visit. Use route4me_route_address_mark_departed for departure.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `is_visited` (`boolean`, required): true to mark visited, false to clear. Example: true.
- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.

Example input: `{"is_visited":true,"route_destination_id":183045808,"route_id":"<route_id>"}`

### `route4me_route_address_update`

Update Route Address · Write

Update a stop on a route (alias, contact, address, stop type, sequence, time windows, cargo, custom fields). Returns the updated stop. Use this to edit a stop. Use route4me_route_address_mark_visited for visit status.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `address` (`string`, optional): Street address. Example: 230 Arbor Way Milledgeville GA 31061.
- `address_stop_type` (`string`, optional): PICKUP, DELIVERY, BREAK or MEETUP. Example: DELIVERY. One of: `PICKUP`, `DELIVERY`, `BREAK`, `MEETUP`.
- `alias` (`string`, optional): Stop name. Example: Customer A.
- `custom_fields` (`object`, optional): Custom key-value data. Example: {"gate_code": "1234"}
- `email` (`string`, optional): Recipient email. Example: jane@example.com.
- `first_name` (`string`, optional): Recipient first name. Example: Jane.
- `last_name` (`string`, optional): Recipient last name. Example: Doe.
- `phone` (`string`, optional): Recipient phone. Example: +1 478-555-0100.
- `pieces` (`integer`, optional): Pieces. Example: 2.
- `sequence_no` (`integer`, optional): New position in the route. Example: 2.
- `time` (`integer`, optional): Service time in seconds. Example: 300.
- `time_window_end` (`integer`, optional): Time window end in seconds after midnight. Example: 39600.
- `time_window_start` (`integer`, optional): Time window start in seconds after midnight. Example: 32400.
- `weight` (`number`, optional): Weight. Example: 12.5.

Example input: `{"route_destination_id":183045808,"route_id":"<route_id>"}`

### `route4me_route_addresses_add`

Add Addresses to Route · Write

Add stops to an existing route, either at their sequence position or at the optimal position. Returns the updated route. Use this to add stops. Use route4me_route_address_remove to drop one.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `addresses` (`array`, required): Stops, each an object with address and lat/lng, plus optional alias, is_depot, time (service seconds), time_window_start/end (seconds), first_name, last_name, email, phone, weight, cube, pieces, revenue and custom_fields. Example: [{"address": "151 Arbor Way Milledgeville GA 31061", "lat": 33.132675, "lng": -83.244743, "is_depot": true, "time": 0}, {"address": "230 Arbor Way Milledgevi...
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `optimal_position` (`boolean`, optional): Insert each address at its optimal position. Example: true.

Example input: `{"addresses":[],"route_id":"<route_id>"}`

### `route4me_route_duplicate`

Duplicate Route · Write

Duplicate one or more routes. Returns the new route IDs. Use this to reuse a route as a template.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `duplicate_routes_id` (`array`, required): Route IDs to duplicate. Example: ["5C15E83A4BE005BCD1537955D28D51D7"]

Example input: `{"duplicate_routes_id":["5C15E83A4BE005BCD1537955D28D51D7"]}`

### `route4me_route_update`

Update Route · Write

Update a route's parameters (name, date, time, vehicle, driver...) or unlink it from its optimization. Returns the updated route. Use this to rename or reassign a route.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.
- `parameters` (`object`, optional): Route parameters to change, e.g. route_name, member_id (driver), vehicle_id, route_date, route_time. Example: {"route_name": "sk-test renamed"}
- `unlink_from_master_optimization` (`boolean`, optional): Detach the route from its optimization. Example: false.

Example input: `{"route_id":"<route_id>"}`

### `route4me_setting_set`

Add Configuration Setting · Write

Add a configuration key and value to the account. Returns result true on success. Use route4me_setting_update to change an existing key.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `config_key` (`string`, required): Key. Example: sk_test_key.
- `config_value` (`string`, required): Value. Example: enabled.

Example input: `{"config_key":"<config_key>","config_value":"<config_value>"}`

### `route4me_setting_update`

Update Configuration Setting · Write

Change the value of a configuration key. Returns result true on success. Use this to change a setting.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `config_key` (`string`, required): Key. Example: sk_test_key.
- `config_value` (`string`, required): New value. Example: disabled.

Example input: `{"config_key":"<config_key>","config_value":"<config_value>"}`

### `route4me_territory_create`

Create Territory · Write

Create a territory (an area used to group stops and assign routes) from a circle, polygon or rectangle. Returns the created item with territory_id. Use this to define an area.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `territory` (`object`, required): Shape: type circle (data: ["lat,lng", "radius meters"]), poly (data: ["lat,lng", ...]) or rect (data: ["lat,lng" top-left, "lat,lng" bottom-right]). Example: {"type": "circle", "data": ["37.5697528227865,-77.4783325195313", "5000"]}
- `territory_name` (`string`, required): Name. Example: sk-test territory.
- `territory_color` (`string`, optional): Hex color without #. Example: ff7700.

Example input: `{"territory":{"type":"circle","data":["37.5697528227865,-77.4783325195313","5000"]},"territory_name":"<territory_name>"}`

### `route4me_territory_update`

Update Territory · Write

Update a territory's name, color or shape. Returns the updated item. Use this to change an area.

Read only: no. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `territory` (`object`, required): Shape: type circle (data: ["lat,lng", "radius meters"]), poly (data: ["lat,lng", ...]) or rect (data: ["lat,lng" top-left, "lat,lng" bottom-right]). Example: {"type": "circle", "data": ["37.5697528227865,-77.4783325195313", "5000"]}
- `territory_id` (`string`, required): Territory ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.
- `territory_name` (`string`, required): Name. Example: sk-test territory.
- `territory_color` (`string`, optional): Hex color without #. Example: ff7700.

Example input: `{"territory":{"type":"circle","data":["37.5697528227865,-77.4783325195313","5000"]},"territory_id":"<territory_id>","territory_name":"<territory_name>"}`

### `route4me_avoidance_zone_delete`

Delete Avoidance Zone · Destructive

Delete a avoidance zone. Returns status true on success. Use this to remove an area.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `territory_id` (`string`, required): Avoidance zone ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.

Example input: `{"territory_id":"<territory_id>"}`

### `route4me_location_group_delete`

Delete Location Group · Destructive

Delete an address book group (the locations stay). Returns status true on success. Use this to remove a group.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `group_id` (`string`, required): Group ID. Example: 4F39929B6A8A9D3E9A6B2B9F6B5C2E11.

Example input: `{"group_id":"<group_id>"}`

### `route4me_locations_delete`

Delete Locations · Destructive

Delete address book locations. Returns status true on success. Use this to remove locations.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `address_ids` (`array`, required): Location IDs to delete. Example: ["37023651"]

Example input: `{"address_ids":["37023651"]}`

### `route4me_optimization_address_remove`

Remove Address from Optimization · Destructive

Remove one stop from an optimization. Returns deleted: true and the route_destination_id. Use this to drop a stop from a plan.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `optimization_problem_id` (`string`, required): Optimization problem ID (32-character hex). Example: 07372F2CF3814EC6DFFAFE92E22771AA.
- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.

Example input: `{"optimization_problem_id":"<optimization_problem_id>","route_destination_id":183045808}`

### `route4me_optimization_delete`

Delete Optimizations · Destructive

Delete one or more optimization problems and their routes. Returns status and the removed count. Use this to clean up plans.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `optimization_problem_ids` (`array`, required): Optimization problem IDs to delete. Example: ["07372F2CF3814EC6DFFAFE92E22771AA"]

Example input: `{"optimization_problem_ids":["07372F2CF3814EC6DFFAFE92E22771AA"]}`

### `route4me_order_delete`

Delete Orders · Destructive

Delete one or more orders. Returns status true on success. Use this to remove orders.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `order_ids` (`array`, required): Order IDs to delete. Example: [7205704]

Example input: `{"order_ids":[7205704]}`

### `route4me_route_address_remove`

Remove Route Address · Destructive

Remove one stop from a route. Returns deleted: true and the route_destination_id. Use this to drop a stop.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `route_destination_id` (`integer`, required): Route destination (stop) ID. Example: 183045808.
- `route_id` (`string`, required): Route ID (32-character hex). Example: 5C15E83A4BE005BCD1537955D28D51D7.

Example input: `{"route_destination_id":183045808,"route_id":"<route_id>"}`

### `route4me_route_delete`

Delete Route · Destructive

Delete one or more routes. Returns deleted: true and the route IDs. Use this to remove routes; it cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `route_id` (`string`, required): Route ID, or several separated by commas. Example: 5C15E83A4BE005BCD1537955D28D51D7.

Example input: `{"route_id":"<route_id>"}`

### `route4me_setting_delete`

Delete Configuration Setting · Destructive

Delete a configuration key. Returns result true on success. Use this to remove a setting.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `config_key` (`string`, required): Key to delete. Example: sk_test_key.

Example input: `{"config_key":"<config_key>"}`

### `route4me_territory_delete`

Delete Territory · Destructive

Delete a territory. Returns status true on success. Use this to remove an area.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `territory_id` (`string`, required): Territory ID. Example: 596A2A44FE9FB19EEB9C3C072BF2D0BE.

Example input: `{"territory_id":"<territory_id>"}`

## Related

Other Automation connectors ([all 91](/agentkit/connectors/?category=automation)):

- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twilio](/agentkit/connectors/twilio/): Scalekit connector, Username and password, 61 tools
- [Stripe](/agentkit/connectors/stripe/): Scalekit connector, Access token, 178 tools


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
