S
Sheba ISP ERPDOCS
API Reference

API Errors & Throttling

Standardized error responses, HTTP status codes, and rate limiting thresholds.

API Errors & Throttling

IMPLEMENTED

All error payloads conform to standard RFC 7807 / DRF JSON responses.


1. Error Response Format

Validation Error (HTTP 400 Bad Request)

{
  "pppoe_username": [
    "A customer with this PPPoE username already exists under this tenant."
  ],
  "phone": [
    "Invalid Bangladeshi mobile phone format. Must match 01XXXXXXXXX."
  ]
}

Authentication Error (HTTP 401 Unauthorized)

{
  "detail": "Authentication credentials were not provided."
}

Permission Denied (HTTP 403 Forbidden)

{
  "detail": "You do not have permission to perform this action in this tenant."
}

Rate Limited (HTTP 429 Too Many Requests)

{
  "detail": "Request was throttled. Expected available in 42 seconds."
}

2. Throttling Rates

ScopeRateTarget Endpoints
anon100 / minutePublic customer query (/api/v1/customer/query/)
user1000 / minuteStandard authenticated staff API actions
auth30 / minuteLogin attempts (/api/v1/auth/login/)
webhooks300 / minutePayment webhooks (/api/v1/payments/sms/webhook/)
recharge60 / minuteSubscription recharges (/api/v1/recharges/)

On this page