Integrations

IntegrationAPIandwebhooks

Connect approved operational systems to Rouptimize with scoped API tokens, versioned endpoints, idempotent writes, external IDs, and signed webhooks.

Goal

Document the public Integration API v1 contract for operations teams connecting ERP, ecommerce, dispatch, analytics, or internal automation systems to Rouptimize.

Who it is for

Company admins, technical operations teams, and external system integrators.

Expected result

Your integration can read or update approved company-scoped resources, retry safely, and receive signed webhook events for operational changes.

Prerequisites

Company admin access
Approved integration workflow
API token created from Settings > Rouptimize API
Technical owner for the external system
Webhook endpoint URL if event delivery is required

API access

Base path

/api/v1

All public integration routes are versioned under the Rouptimize Integration API v1 base path.

OpenAPI reference

/swagger

Use the live backend Swagger reference for schemas, request bodies, and response examples.

Token management

Settings > Rouptimize API

Company admins create scoped API tokens from the web panel. Raw tokens are shown only once.

Webhook management

Settings > Webhooks

Webhook endpoints and delivery history are managed from the web panel with signed JSON payloads.

Token presetIntended use
read_onlyRead branches, drivers, missions, mobile users, routes, vehicle-driver assignments, vehicles, reports, and dashboard data.
full_accessRead and mutate supported operational resources for approved automation workflows.

Authentication

Send API tokens as bearer credentials. Production tokens use the rpt_live_ prefix; non-production tokens use the rpt_test_ prefix.

Token safety

API tokens are company-scoped and never grant superadmin access. Rouptimize stores only hashed token material after the one-time reveal.

Errors

Public API errors return a stable envelope with code, message, details, and requestId. Log the requestId when opening a support case.

Idempotency

Mutating calls support Idempotency-Key. Replaying the same request returns the stored response; reusing a key with a different body returns 409.

External IDs

Create requests may include externalId so ERP, ecommerce, or dispatch systems can map their own records to Rouptimize resources safely.

Public endpoints

These endpoints are company-scoped and write through the same Rouptimize services used by the web panel and mobile app.

Account

Inspect the authenticated integration token and company context.

1 endpoints
MethodPathPurpose
GET/api/v1/meInspect token and company context.

Branches

Create and manage operating branches used by dispatch and reporting.

5 endpoints
MethodPathPurpose
GET/api/v1/branchesList branches.
POST/api/v1/branchesCreate a branch.
GET/api/v1/branches/:idGet a branch.
PATCH/api/v1/branches/:idUpdate a branch.
DELETE/api/v1/branches/:idDelete a branch.

Depots

Create and manage depot locations for route starts, ends, and operating context.

5 endpoints
MethodPathPurpose
GET/api/v1/depotsList depots.
POST/api/v1/depotsCreate a depot.
GET/api/v1/depots/:idGet a depot.
PATCH/api/v1/depots/:idUpdate a depot.
DELETE/api/v1/depots/:idDelete a depot.

Fleet

Manage vehicles, drivers, mobile users, and vehicle-driver assignments.

23 endpoints
MethodPathPurpose
GET/api/v1/vehiclesList vehicles.
POST/api/v1/vehiclesCreate a vehicle.
GET/api/v1/vehicles/:idGet a vehicle.
PATCH/api/v1/vehicles/:idUpdate a vehicle.
DELETE/api/v1/vehicles/:idDelete a vehicle.
GET/api/v1/driversList drivers.
POST/api/v1/driversCreate a driver.
GET/api/v1/drivers/:idGet a driver.
PATCH/api/v1/drivers/:idUpdate a driver.
DELETE/api/v1/drivers/:idDelete a driver.
POST/api/v1/drivers/:id/inviteInvite a driver to the mobile app.
GET/api/v1/drivers/:id/devicesList registered driver devices.
GET/api/v1/mobile-usersList mobile users.
GET/api/v1/mobile-users/:idGet a mobile user.
PATCH/api/v1/mobile-users/:idUpdate a mobile user.
PUT/api/v1/mobile-users/:id/disableDisable a mobile user.
PUT/api/v1/mobile-users/:id/enableEnable a mobile user.
DELETE/api/v1/mobile-users/:idDelete a mobile user.
GET/api/v1/vehicle-driver-assignmentsList vehicle-driver assignments.
POST/api/v1/vehicle-driver-assignmentsCreate a vehicle-driver assignment.
GET/api/v1/vehicle-driver-assignments/:idGet a vehicle-driver assignment.
PATCH/api/v1/vehicle-driver-assignments/:idUpdate a vehicle-driver assignment.
DELETE/api/v1/vehicle-driver-assignments/:idDelete a vehicle-driver assignment.

Missions

Create, import, inspect, update, reassign, verify, and delete delivery missions.

12 endpoints
MethodPathPurpose
GET/api/v1/missionsList missions.
POST/api/v1/missionsCreate a mission.
POST/api/v1/missions/bulkCreate multiple missions.
GET/api/v1/missions/distribution-viewRead distribution-ready mission data.
GET/api/v1/missions/exportRead export-style mission data.
POST/api/v1/missions/plan-routePreview mission route planning where supported.
GET/api/v1/missions/:idGet a mission.
GET/api/v1/missions/:id/history-changesRead mission history changes.
PATCH/api/v1/missions/:idUpdate a mission.
POST/api/v1/missions/:id/reassignReassign a mission.
POST/api/v1/missions/:id/proof-of-delivery/verifyVerify proof of delivery where rules allow it.
DELETE/api/v1/missions/:idDelete a mission.

Routes

Plan, optimize, assign, reorder, inspect, and delete delivery routes.

12 endpoints
MethodPathPurpose
POST/api/v1/routes/planPreview route planning.
POST/api/v1/routes/auto-optimizeAuto-optimize routes and consume credits according to existing rules.
POST/api/v1/routesCreate a route.
GET/api/v1/routesList routes.
GET/api/v1/routes/:idGet a route.
GET/api/v1/routes/:id/timelineRead route execution timeline from mission executions.
GET/api/v1/routes/:id/navigation-geometryRead route navigation geometry.
PUT/api/v1/routes/:id/assign-driverAssign a driver.
PUT/api/v1/routes/:id/assign-vehicleAssign a vehicle.
PUT/api/v1/routes/:id/add-missionsAdd missions to a route.
PUT/api/v1/routes/:id/missions/orderReorder missions on a route.
DELETE/api/v1/routes/:idDelete a route.

Reports and dashboard

Read reporting and dashboard data for approved operational analytics use cases.

5 endpoints
MethodPathPurpose
GET/api/v1/reports/overviewRead report overview data.
GET/api/v1/reports/details/:sectionRead report details for a supported section.
GET/api/v1/dashboard/statsRead dashboard statistics.
GET/api/v1/dashboard/recent-activityRead recent dashboard activity.
GET/api/v1/dashboard/chartsRead dashboard chart data.

Settings endpoints

These authenticated company-admin endpoints support token management, webhook endpoint management, and delivery review inside Rouptimize settings.

Company settings

8 endpoints
MethodPathPurpose
GET/companies/me/api-tokensList API tokens for the current company.
POST/companies/me/api-tokensCreate a scoped API token.
DELETE/companies/me/api-tokens/:idDelete an API token.
GET/companies/me/webhook-endpointsList webhook endpoints.
POST/companies/me/webhook-endpointsCreate a webhook endpoint.
PATCH/companies/me/webhook-endpoints/:idUpdate a webhook endpoint.
DELETE/companies/me/webhook-endpoints/:idDelete a webhook endpoint.
GET/companies/me/webhook-endpoints/:id/deliveriesReview recent webhook deliveries.

Webhooks

Rouptimize sends signed JSON payloads with event id, event type, timestamp, company id, resource type, resource id, and event data.

Signature header

X-Rouptimize-Signature: t=...,v1=...

mission.created

A mission was created.

mission.updated

A mission was updated.

mission.deleted

A mission was deleted.

mission.status_changed

A mission status changed.

route.created

A route was created.

route.optimized

A route was optimized.

route.assigned

A route was assigned.

route.reordered

A route stop order changed.

route.deleted

A route was deleted.

route.completed

A route was completed.

driver.created

A driver was created.

driver.updated

A driver was updated.

driver.deleted

A driver was deleted.

vehicle.created

A vehicle was created.

vehicle.updated

A vehicle was updated.

vehicle.deleted

A vehicle was deleted.

vehicle_driver_assignment.created

A vehicle-driver assignment was created.

vehicle_driver_assignment.updated

A vehicle-driver assignment was updated.

vehicle_driver_assignment.deleted

A vehicle-driver assignment was deleted.

Operational notes

Tenant isolation is enforced through the existing Rouptimize company context and database access policies.

Public controllers write through existing Rouptimize domain services instead of duplicating mission, route, assignment, credit, or proof-of-delivery logic.

Records created or changed through /api/v1 are the same records used by the web app and mobile app.

Internal-only surfaces such as login, refresh, billing, Stripe, support tickets, backoffice, in-app notifications, and company registration are excluded from the public API.

Production environments must have token hashing and webhook signing configured before creating API tokens or enabling webhook delivery.

Steps

01

Create a scoped API token

Company admins create tokens from Settings > Rouptimize API. Use read_only for reporting or synchronization and full_access only for approved workflows that mutate operational resources.

02

Authenticate requests

Send tokens as bearer credentials in the Authorization header. Production tokens use the rpt_live_ prefix and non-production tokens use the rpt_test_ prefix.

03

Use the versioned endpoint surface

Public integration endpoints are versioned under /api/v1 and write through the same Rouptimize services used by the web and mobile apps.

04

Retry mutating calls safely

Send Idempotency-Key on create, update, assignment, optimization, and reorder calls that may be retried by the external system.

05

Map external records

Create requests may include externalId so source systems can map orders, jobs, vehicles, drivers, and route work back to their own records.

06

Subscribe to signed webhook events

Create webhook endpoints from Settings > Webhooks, verify the X-Rouptimize-Signature header, and review recent deliveries from the web panel.

Field definitions

Authorization header
API token preset
Idempotency-Key
External ID
Request ID
Webhook signature
Webhook delivery history

Troubleshooting

401 or 403 responses usually mean the token is missing, expired, scoped incorrectly, or belongs to a different company.

409 idempotency responses mean the same key was reused with a different request body.

Webhook verification failures usually mean the receiver is not validating the timestamped signature with the configured endpoint secret.

Missing imported records usually mean the externalId, branch, date, or required operational fields do not match the expected workflow.

Need to try it with your own route data?

Start with the full dispatch workflow and 200 scheduled order credits.