canonical: https://jentic.com/apis/detrack.com/detrack

# Detrack API

Jentic publishes the only available OpenAPI specification for Detrack API, keeping it validated and agent-ready. Detrack is a delivery management and electronic proof of delivery (ePOD) platform used by last-mile logistics operators and field service teams. The API exposes deliveries, collections, vehicles, and SKU-level items so dispatchers can build job lists, track progress in real time, and handle bulk operations like reattempts. It is suited for warehouse, retail, and 3PL workflows that need programmatic control over field operations.

## For AI agents

Create and track deliveries and collections, manage vehicles, and trigger bulk operations like reattempts in Detrack's last-mile delivery platform.

## Scope

Does not handle carrier rate shopping, label printing, or route optimisation - use for delivery dispatch and proof of delivery only.

## Capabilities

- Create new delivery jobs with addresses, items, and time windows
- Update or cancel a specific delivery by its DO number
- Bulk-create or bulk-delete deliveries in a single request
- Trigger reattempt jobs for failed deliveries without rebuilding them
- Manage collection jobs alongside deliveries for reverse-logistics workflows
- Maintain the vehicle fleet - add, update, and remove vehicles assigned to drivers
- Track SKU-level item inventory used to populate delivery and collection lines

## Use cases

### Same-Day Dispatch Automation

Retail and grocery operators use Detrack to convert orders from their commerce platform into delivery jobs ready for the driver app. The `/dn/deliveries` endpoint accepts the address, time window, and item lines; the bulk variant handles end-of-day batch dispatch in one call. Most teams pair this with a webhook or polling loop to surface status updates back to the storefront.

Example prompt: POST `/dn/deliveries/bulk` with an array of 25 orders pulled from the commerce platform, then store the returned DO numbers against each order.

### Failed Delivery Reattempt Workflow

When a customer is not home or refuses delivery, dispatchers need to schedule a reattempt without rebuilding the job. The `/dn/deliveries/reattempt` endpoint clones the original job into a new attempt with a fresh date, preserving the items and customer details. This shaves manual work off operators handling hundreds of failed deliveries per day.

Example prompt: POST `/dn/deliveries/reattempt` with the original DO number and a new date to schedule a reattempt for the next morning's route.

### Reverse Logistics and Collections

Returns processing teams use the `/dn/collections` endpoints to schedule pickups for refunds, exchanges, or warranty returns. Collections share much of the schema with deliveries but carry their own status flow, letting ops separate outbound and inbound performance.

Example prompt: POST `/dn/collections` with the customer's pickup address and item details, then GET `/dn/collections` to confirm the job is scheduled.

### Fleet and SKU Inventory Sync

Operations teams keep Detrack's vehicles and items aligned with their TMS or WMS by syncing fleet additions and SKU master data through the `/dn/vehicles` and `/dn/items` endpoints. This avoids drivers being assigned to retired vehicles or jobs referencing deprecated SKUs.

Example prompt: Loop through the WMS SKU list and PUT `/dn/items/{sku}` for each SKU to ensure Detrack's item catalogue matches the source-of-truth inventory.

### Agent-Driven Dispatch Assistance

AI agents help dispatchers triage exceptions and schedule reattempts by calling Detrack through Jentic. The Detrack API key stays in your Jentic One instance, and the agent only needs to express intent - for example, 'reattempt all deliveries that failed today' - to get the right endpoint and parameters.

Example prompt: Search Jentic for 'reattempt failed Detrack delivery', load the `/dn/deliveries/reattempt` operation, and execute it for each DO number flagged as failed.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/dn/deliveries` | List all deliveries |
| POST | `/dn/deliveries` | Create a delivery job |
| PUT | `/dn/deliveries/{do_number}` | Update a delivery by DO number |
| POST | `/dn/deliveries/bulk` | Bulk-create deliveries |
| POST | `/dn/deliveries/reattempt` | Reattempt a failed delivery |
| POST | `/dn/collections` | Create a collection job |
| POST | `/dn/vehicles` | Add a vehicle to the fleet |
| PUT | `/dn/items/{sku}` | Update an item by SKU |

## Key resources

- **Deliveries** — Create, update, list, and bulk-process delivery jobs
- **Collections** — Manage pickup and reverse-logistics jobs
- **Vehicles** — Maintain the fleet of vehicles available for dispatch
- **Items** — Maintain the SKU catalogue used on deliveries and collections

## Why Jentic

- **Setup:** Wiring Detrack by hand means learning its X-API-KEY header, building the delivery, collection, vehicle, and item calls, and handling bulk and reattempt payloads yourself. Through Jentic you install once, import the Detrack API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Detrack carries the delivery and collection details in the request body, so you limit the agent to the operations it needs, such as listing deliveries or reattempting a failed one, and bulk creation or vehicle changes are included only if you add those operations.
- **Credential handling:** Your Detrack API key is stored once, encrypted, by your own Jentic One instance and injected into the X-API-KEY header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'reattempt a failed Detrack delivery' or 'create a delivery job', and Jentic returns the matching operation with its input schema so the agent calls the right endpoint without reading Detrack docs.

## Related APIs

- **ShipStation API** — ShipStation focuses on multi-carrier label generation and order workflow, not field-driver ePOD.
- **Routific API** — Routific optimises driver routes; pair with Detrack to dispatch the optimised stops as jobs.
- **Stripe API** — Use Stripe alongside Detrack to capture payment when proof of delivery is recorded.

## FAQ

### Why is there no official OpenAPI spec for Detrack API?

Detrack does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Detrack API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Detrack API use?

Detrack uses an API key sent in a request header (apiKeyHeader scheme). Through Jentic, the key is stored encrypted in the vault and injected on every call so the raw value never enters agent context.

### Can I bulk-create deliveries with the Detrack API?

Yes - POST `/dn/deliveries/bulk` accepts an array of delivery objects and creates them in a single request, which is the recommended approach for end-of-day or scheduled dispatches over more than a handful of jobs.

### How do I reattempt a failed delivery with the Detrack API?

Call POST `/dn/deliveries/reattempt` with the original DO number and the new attempt date. The endpoint clones the original job rather than requiring you to rebuild items and addresses.

### What are the rate limits for the Detrack API?

The OpenAPI spec does not declare specific rate limits. Treat the bulk endpoints (`/dn/deliveries/bulk`, `/dn/collections`) as the safer default for high-volume workloads to reduce request count.

### How do I create a delivery through Jentic?

Search Jentic for 'create a Detrack delivery', load the POST `/dn/deliveries` operation, and execute it with the address and item payload. Jentic injects your API key at execution and returns the new DO number.

### Can I limit what my agent is allowed to do with the Detrack API?

Yes. Because Jentic One is self-hosted, you decide which Detrack operations your agent may call, so you can allow it to list deliveries or reattempt a failed one while withholding everything else. Detrack carries delivery and collection details in the request body, so higher-impact operations like bulk creation via `/dn/deliveries/bulk` or vehicle changes via `/dn/vehicles` are available only if you add them. Your own rules govern which operations and credentials the agent can use at execution time.
