Servers and Environment
Swoove API is available in sandbox and production environments. Use sandbox for development and integration testing, then switch to production for live traffic.
- Sandbox: https://test.swooveapi.com
- Production: https://live.swooveapi.com
- Use environment-specific credentials for each server.
Business Authentication
Business API requests are authenticated with an app key. Include the key in request query parameters as app_key.
- Generate and manage keys in the Business Dashboard settings.
- Use Testing Key for sandbox and Production Key for production.
- Never expose keys in client-side code or public repositories.
- If a key is exposed, revoke and regenerate immediately.
GET /delivery/get-delivery/{delivery_code}?app_key=<your-app-key>
Agency Authentication
Agency API requests require a Bearer token in the Authorization header.
Authorization: Bearer <your-token-here>
- Obtain token from yourAgency Panel in settings/configurations.
- Create token in the App Tokens section/card.
- Treat agency tokens as secrets and rotate if compromised.
Callbacks
Swoove supports callbacks/webhooks for successful request events. Configure callback endpoints in your dashboard and ensure your endpoint is reachable and secure.
- Accept JSON payloads from Swoove systems.
- Return successful HTTP status codes quickly.
- Validate incoming payload and handle retries safely.
Error Model and Status Codes
Swoove uses standard HTTP status codes and a consistent response structure for errors.
- 2xx: request succeeded
- 4xx: missing/invalid parameters or request-level issues
- 5xx: server-side failure
{
"success": false,
"code": 400,
"message": "A certain field was expected but was null or invalid",
"responses": null
}
Operational Best Practices
- Use sandbox for integration tests before going live.
- Log request IDs, status codes, and error messages for tracing.
- Implement retries with exponential backoff for transient failures.
- Validate required parameters before sending API requests.