# Detrack — how to use (mcp.ai)

Connect your Detrack account and use 19 tools for internet of things straight from your AI agent. Connect with your own API key. Detrack is a delivery management software that offers real-time vehicle tracking, electronic proof of delivery, and automated customer notifications.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_detrack?ms=1787291220000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `detrack_add_collection`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/detrack`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/detrack/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/detrack/add/collection` — Add a new collection job in Detrack. A collection is a pickup job where items are collected from a location. The Delivery Order (do) number must be unique per date. Include the country name in the add
  - body: { do: string, date: string, zone?: string, items?: object[], phone?: string, address: string, assign_to?: string, notify_url?: string, collect_from?: string, instructions?: string, notify_email?: string, collection_time?: string }
- `POST https://api.mcp.ai/api/detrack/create/bulk/depots` — Tool to create multiple depot locations in one request. Use when you need to create several depots at once. Each depot requires at least a name and an address that can be geocoded. Include country nam
  - body: { data: object[] }
- `POST https://api.mcp.ai/api/detrack/create/depot` — Create a new depot in Detrack. A depot serves as a starting/ending point for delivery routes. Requires at least a name and an address that can be geocoded. The address should be complete and include t
  - body: { data: object }
- `POST https://api.mcp.ai/api/detrack/delete/all/collections` — Tool to delete all collections in the account. Use when you need to purge every collection for a specific date after confirmation.
  - body: { date: string }
- `POST https://api.mcp.ai/api/detrack/delete/all/deliveries` — Tool to delete all deliveries for a specific date. Use when you need to purge deliveries in bulk before scheduling new ones.
  - body: { date: string }
- `POST https://api.mcp.ai/api/detrack/delete/delivery` — Tool to delete one or more deliveries by date and D.O. number. Use after confirming delivery entries to avoid accidental data loss (max 100 items per call).
  - body: { items: object[] }
- `POST https://api.mcp.ai/api/detrack/delete/depots/bulk` — Tool to delete multiple depots in a single request. Use when you need to remove depots that are no longer needed.
  - body: { data: object[] }
- `POST https://api.mcp.ai/api/detrack/delete/job/by/query` — Tool to delete a job by DO number using query parameters. Use when you need to delete a specific job by its DO number. Returns success status indicating whether the job was found and deleted.
  - body: { date?: string, type?: string, do_number: string }
- `POST https://api.mcp.ai/api/detrack/edit/delivery` — Edit one or more existing deliveries by date and D.O. number. Use this tool to update delivery details such as address, recipient, phone, instructions, or vehicle assignment. The delivery must already
  - body: { items: object[] }
- `POST https://api.mcp.ai/api/detrack/get/job/by/do/and/date` — Tool to retrieve a specific job by its DO (Delivery Order) number and date. Use when you need to fetch detailed information about a specific delivery or collection job. Returns comprehensive job detai
  - body: { date: string, type?: string, do_number: string }
- `POST https://api.mcp.ai/api/detrack/get/job/by/query` — Tool to retrieve a single job by DO number using query parameters. Use when you need to fetch detailed information about a specific delivery or collection job.
  - body: { date?: string, type?: string, do_number: string }
- `POST https://api.mcp.ai/api/detrack/list/depots` — Tool to list all depot locations with pagination. Use when you need to retrieve depot information including addresses and coordinates. Supports pagination to handle large numbers of depots.
  - body: { page?: integer, limit?: integer }
- `POST https://api.mcp.ai/api/detrack/list/jobs/v2` — Tool to list jobs with pagination and filtering using Detrack API v2. Use when you need to retrieve jobs with filters by date, type, assign_to, status, DO number, or search query. Supports sorting and
  - body: { date?: string, page?: integer, sort?: string, type?: string, limit?: integer, query?: string, status?: string, assign_to?: string, do_number?: string }
- `POST https://api.mcp.ai/api/detrack/search` — Tool to search for deliveries, collections, or vehicles. Use after defining search criteria to retrieve matching jobs.
  - body: { q: object, page?: integer, limit?: integer, order?: string, offset?: integer }
- `POST https://api.mcp.ai/api/detrack/search/jobs` — Search jobs with advanced filters including date range, DO number, statuses, groups, vehicles, zones, and more. Use this to find specific jobs across multiple criteria using the v2 search API.
  - body: { page?: integer, type?: string, limit?: integer, query?: string, status?: string, date_to?: string, assign_to?: string, date_from?: string }
- `POST https://api.mcp.ai/api/detrack/update/depots/bulk` — Update multiple depot locations in a single request. Use this to modify depot details such as address, contact information, or coordinates. Each depot is identified by its name or ID. This is more eff
  - body: { data: object[] }
- `POST https://api.mcp.ai/api/detrack/view/all/collections` — View all collection jobs scheduled for a specific date in Detrack. Returns collection details including delivery order number, pickup address, status, tracking link, and items. Use this to retrieve al
  - body: { date: string }
- `POST https://api.mcp.ai/api/detrack/view/all/deliveries` — Tool to view all deliveries for a specific date. Use when you need to retrieve all delivery jobs on a given date.
  - body: { date: string }
- `POST https://api.mcp.ai/api/detrack/view/all/vehicles` — Retrieve all vehicles registered in your Detrack account. Returns complete fleet information including real-time location, speed, connection status, and vehicle details. Use this to get an overview of

## Example prompts
- "What can I do in Detrack?"
- "Show me a summary of my Detrack account"

## More
- Page: https://mcp.ai/detrack
- Agent spec (llms.txt): https://mcp.ai/detrack/llms.txt
- Postman collection: https://mcp.ai/detrack/postman.json
