API Overview
High-level overview of Safaribid's REST APIs and developer tools.
API Overview
The Safaribid API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Base URLs
| Environment | URL |
|---|---|
| Sandbox | https://sandbox.api.safaribid.com/v1 |
| Live | https://api.safaribid.com/v1 |
Authentication
Authentication is handled via Bearer Tokens. You can generate your API keys in the Developer Settings section of your dashboard.
Authorization: Bearer YOUR_API_KEYRequest Lifecycle
- Authentication: Client sends a request with a valid API key.
- Validation: Safaribid validates the request payload and permissions.
- Processing: The internal engine (Logistics, Commerce, or Mobility) processes the request.
- Fulfillment: If applicable (e.g., a delivery), a rider is dispatched.
- Response: A JSON response is returned with the status and resource data.
Core API Collections
- Logistics API: Delivery quotes, requests, and tracking.
- Merchant API: Product, inventory, and order management.
- Mobility API: Ride hailing and fleet management.
- Wallet API: Balance checks and payouts.
Webhooks
We use webhooks to notify your application when an event happens in your account. Webhooks are particularly useful for asynchronous events like:
delivery.rider_assigneddelivery.completedorder.paid
Learn more about Webhooks.