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

# GSMTasks Project API

The GSMtasks API is a RESTful service for last-mile delivery, task dispatch, and route optimisation. It exposes 261 endpoints covering accounts, account roles, tasks, orders, routes, route optimisation jobs, drivers (workers), vehicles, customers, documents, payments, webhooks, integrations, and reporting. Authentication is by an Authorization header containing an API token, and the API is the integration surface used by delivery operators, logistics platforms, and fleet managers to wire GSMtasks into their wider stack. Resources are heavily CRUD-shaped, and most collections support filtering, pagination, and PATCH for partial updates.

## For AI agents

Manage delivery tasks, routes, route optimisation jobs, drivers, vehicles, and webhooks in GSMtasks for last-mile and fleet operations.

## Scope

Does not handle long-haul carrier shipping, customs brokerage, or warehouse management - use for GSMtasks last-mile dispatch, route optimisation, and driver operations only.

## Capabilities

- Create, list, retrieve, update, and cancel delivery tasks across the GSMtasks workspace
- Manage drivers (workers), vehicles, and account roles to keep the dispatch pool current
- Trigger route optimisation jobs and read the resulting routes for a fleet on a given day
- Manage account-level Stripe payment methods and setup intents for billing flows
- Subscribe to webhooks so external systems receive task and route events in near real time
- Read order, document, and customer records that back operational tasks
- Drive bulk operations through list endpoints with pagination and filter parameters

## Use cases

### Last-mile delivery dispatch

Create and dispatch last-mile delivery tasks from an e-commerce or warehouse system into GSMtasks, then track them through completion. The integration creates tasks via the tasks endpoints, assigns them to drivers, and optionally triggers route optimisation so a day's tasks are sequenced efficiently. Webhook subscriptions push status events back into the source system so the warehouse always knows which orders are on the road and which are delivered.

Example prompt: When an order is ready, create a GSMtasks task with the delivery address and assignee, then poll the task status until it reaches completed.

### Route optimisation pipeline

Run a daily route optimisation job over the next day's task list so drivers start their shift with sequenced stops rather than ad-hoc routes. The agent pushes the day's tasks into GSMtasks, triggers a route optimisation request, and reads the resulting routes back to display in the driver app. This pattern shaves miles and minutes off each shift, particularly for operators with 10+ drivers.

Example prompt: Trigger a route optimisation job for tomorrow's tasks and then retrieve the resulting routes for each driver.

### Driver and fleet roster sync

Keep the GSMtasks roster of drivers (workers), vehicles, and account roles in sync with an HR or fleet-management system of record. The integration creates and updates GSMtasks account_roles when staff change, and updates vehicle records when registrations or capacities change, so dispatch never assigns work to an off-duty driver or the wrong vehicle. Activate and notify endpoints make onboarding and re-activation explicit operations rather than data hacks.

Example prompt: When the HR system reports a new driver, create the matching GSMtasks account_role and call its activate endpoint.

### AI agent integration through Jentic

Expose GSMtasks operations to a logistics agent through Jentic so dispatchers can ask things like 'show me unassigned tasks for tomorrow' or 'reroute driver 12 around traffic'. The agent searches Jentic for the right intent, loads the operation schema, and executes it against api.gsmtasks.com. Jentic stores the GSMtasks Authorization token in its vault, so the agent only sees a Jentic-mediated session, not the raw token.

Example prompt: Through Jentic, search 'create a GSMtasks task', load the operation, and execute it for the order being dispatched.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/account_roles/` | List drivers and account roles |
| POST | `/account_roles/` | Create a new driver or account role |
| POST | `/account_roles/{id}/activate/` | Activate an inactive account role |
| GET | `/accounts/{id}/` | Retrieve a tenant account |
| PATCH | `/accounts/{id}/` | Partially update a tenant account |
| POST | `/accounts/{id}/stripe_create_setup_intent/` | Create a Stripe setup intent for billing |
| POST | `/accounts/{id}/change_owner/` | Change the owner of an account |

## Key resources

- **tasks** — Create, list, update, and cancel delivery and pickup tasks
- **routes and route optimisation** — Plan, trigger, and read optimised routes for the fleet
- **account_roles and accounts** — Drivers, managers, and tenant-level account configuration
- **vehicles** — Fleet vehicle records associated with drivers
- **webhooks** — Event subscriptions for task and route status changes
- **payments** — Stripe payment methods and setup intents tied to GSMtasks accounts

## Why Jentic

- **Setup:** Wiring the GSMTasks API by hand means handling its Authorization token header and managing pagination and retries across a large last-mile dispatch surface yourself. Through Jentic you install once, import GSMTasks from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** GSMTasks puts the account and account-role id in the URL path (`/accounts/{id}`/, `/account_roles/{id}/...`), so a rule can pin your agent to one account for reads and updates. You choose the operations it may call, so account-owner changes or payment-setup operations are not included unless you add them.
- **Credential handling:** Your GSMTasks token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a delivery task' or 'trigger route optimisation', and Jentic returns the matching GSMTasks operation with its input schema, including the required path and body parameters, so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Routific API** — Route optimisation and delivery planning
- **FedEx API** — Carrier shipping and tracking platform
- **DHL Shipment Tracking API** — Shipment tracking across the DHL carrier network

## FAQ

### What authentication does the GSMTasks API use?

GSMTasks uses an apiKey-style token in the Authorization header (the spec calls the scheme tokenAuth). Tokens are issued in the GSMtasks dashboard. Through Jentic the token is stored encrypted in the vault and the agent only authenticates to Jentic with a scoped agent key (ak_*).

### Can I trigger route optimisation programmatically?

Yes. GSMtasks exposes route and route-optimisation endpoints that accept the day's tasks and return optimised stop sequences. Combined with the tasks list endpoints this is enough to run a fully automated daily routing pipeline without using the GSMtasks web UI.

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

The published spec does not document explicit rate limits. GSMtasks throttles at the platform level per tenant; back off on HTTP 429 responses and prefer webhooks over polling for high-frequency status checks.

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

Install Jentic with pip install jentic, search for 'create a GSMtasks task', load the matching operation, and execute it with the customer, address, and assignee fields. Jentic resolves the call to the GSMtasks tasks create endpoint and returns the new task id for tracking.

### Can I subscribe to task status events?

Yes. GSMtasks exposes webhook endpoints so the platform pushes events to your endpoint when task or route state changes. This avoids polling 261 endpoints for changes and keeps the source system close to real time.

### How do I keep the driver roster in sync with my HR system?

Use the account_roles endpoints. Create roles for new drivers via POST /account_roles/, update them with PATCH `/account_roles/{id}`/, and call POST `/account_roles/{id}/activate`/ when an inactive driver returns to duty. PATCH calls are partial so you only need to send the fields that changed.

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

Yes. Jentic One runs self-hosted, so your own rules decide which GSMTasks operations and credentials the agent may use. Because GSMTasks carries the account and account-role id in the URL path (for example `/accounts/{id}`/ and `/account_roles/{id}`/), you can pin the agent to a single account for reads and updates. You choose the exact operations it may call, so sensitive endpoints like `/accounts/{id}/change_owner`/ or the Stripe setup-intent operations stay off-limits unless you deliberately grant them.
