.png)
Onfleet Integration Guide
Connect Onfleet delivery operations with enterprise systems through its REST API, selected webhook events, and secure API-key authentication.
Onfleet integration options at a glance
Onfleet’s primary integration mechanism is its REST API, which supports operational objects such as Tasks, Workers, Teams, Hubs, Recipients, and Administrators. Onfleet also provides webhook-style notifications for selected operational events, including task lifecycle changes, although coverage is event-specific rather than universal. Martini can consume the REST API, receive Onfleet callbacks through an exposed endpoint, and orchestrate validation, mapping, business rules, retries, and downstream updates. API-key authentication is used over HTTPS and should be stored in Martini secrets. For larger synchronizations, Martini can schedule controlled REST retrieval, pagination, checkpointing, and reconciliation without assuming an undocumented bulk API.
Common Onfleet integration patterns
Common Onfleet data objects used in integrations
Authentication and security considerations
API-key authentication
Onfleet API access uses an API key over HTTPS. Current Onfleet documentation should be checked to confirm the exact HTTP authentication formatting before deployment.
Secret handling
- Store API keys in Martini secrets or secure environment configuration.
- Use separate keys for development, testing, and production where appropriate.
- Do not expose authorization headers in logs, errors, or responses.
- Rotate keys according to organizational security policy.
Webhook protection
Validate callbacks according to the current Onfleet webhook security model. The exact signing, shared-secret, or verification mechanism should be confirmed before production use.
Operational considerations for Onfleet integrations
Rate limits and pagination
Confirm current Onfleet limits, response headers, pagination parameters, and page sizes. Use controlled concurrency, bounded backoff, and checkpoints for scheduled synchronization.
Idempotency and ordering
Persist source-order, Task, and event identifiers. Webhook deliveries and retries may be duplicated or arrive out of order, so state checks should protect downstream writes.
Data quality
Validate addresses, coordinates, recipients, delivery windows, time zones, and instructions before creating or updating Tasks. Avoid unnecessary sensitive data in free-text notes.
Schema and testing
Treat status values, nested recipient and destination structures, and completion details as integration contracts. Test validation, authentication failures, rate limits, retries, duplicate callbacks, and reconciliation scenarios.
Observability
Record correlation identifiers, checkpoints, processing outcomes, and exception details without logging secrets. Monitor workflow failures and reconcile source shipments against Onfleet Tasks.
Why use Martini instead of scripts or point-to-point integrations?
Orchestration instead of isolated scripts
Martini provides a maintainable workflow layer for receiving Onfleet events, calling REST endpoints, transforming payloads, applying business rules, and coordinating multiple target systems.
Reusable integration logic
Shared API, mapping, validation, retry, and correlation logic can be reused across commerce, support, ERP, database, and reporting workflows instead of being duplicated in point-to-point scripts.
Operational control
Martini supports scheduled and event-driven execution, controlled retries, checkpointing, exception routing, monitoring, and secure environment configuration. This helps teams combine near-real-time Onfleet events with periodic reconciliation.
API-led flexibility
Martini can consume Onfleet’s REST API and expose controlled APIs to internal applications, allowing consumers to depend on a stable integration contract rather than Onfleet-specific request details.