Errors and Status Codes

Every error answer looks like this:

{
  "success": false,
  "message": "Your wallet has ₹500.00, but this booking costs ₹661.50. Please top up first.",
  "error": "INSUFFICIENT_BALANCE"
}

Use error in your code. message is written for people and may change. Validation errors also carry errors, keyed by field:

{
  "success": false,
  "message": "Validation failed.",
  "error": "VALIDATION_FAILED",
  "errors": { "passenger.mobile": ["The passenger mobile must be a 10-digit Indian mobile number."] }
}

HTTP status codes

Status Meaning
200 OK
201 Booking created
400 Request missing something required, e.g. the Idempotency-Key
401 No API key, or a wrong, revoked or expired one
402 Not enough money in the wallet
403 The key may not do this
404 Not found
409 Conflicts with the current state, e.g. already cancelled
422 The request can't be done as asked, e.g. validation, an expired quote or a pickup too soon
429 Too many requests. Wait for Retry-After seconds
500 Something failed on EazyGo's side. It's safe to retry with the same Idempotency-Key

Error codes

error HTTP What to do
AUTH_REQUIRED 401 Send a valid key in Authorization: Bearer ...
INVALID_API_KEY 401 The token isn't an agent API key. Create one on the API Access page
IP_NOT_ALLOWED 403 Call from an allowed IP, or change the key's allowed IPs
NOT_AN_AGENT 403 The key's login no longer belongs to an agency
API_DISABLED 403 API access is off for your agency. Contact EazyGo
INSUFFICIENT_PERMISSIONS 403 The key's login doesn't have the permission this needs
RATE_LIMITED 429 Slow down and retry after Retry-After
VALIDATION_FAILED 422 Fix the fields listed in errors
CITY_NOT_SERVICEABLE 422 EazyGo doesn't run local or hourly trips in that city
INVALID_AIRPORT 422 Use an airport from GET /airports, and only on local trips
INVALID_TRIP 422 e.g. a return date before the pickup date
PICKUP_TOO_SOON 422 Choose a later pickup. The message gives the earliest time
NO_VEHICLES 422 No vehicle can do this trip
IDEMPOTENCY_KEY_REQUIRED 400 Send a unique Idempotency-Key with every new booking
IDEMPOTENCY_KEY_REUSED 409 Another login of your agency used this key. Use a new one
IDEMPOTENCY_CONFLICT 409 The same key is being booked by a parallel request. Retry in a moment
QUOTE_EXPIRED 422 Ask for a new quote
VEHICLE_UNAVAILABLE 422 Quote again and pick another vehicle
PICKUP_LOCATION_REQUIRED 422 Send the pickup's latitude and longitude
ADDRESS_TOO_FAR 422 Quote again with the real pickup or drop
INSUFFICIENT_BALANCE 402 Top up the wallet
AGENCY_NOT_ACTIVE 422 Your agency is suspended or not approved. Contact EazyGo
BOOKING_NOT_FOUND 404 Check the reference. Staff keys only see their own bookings
NOT_CANCELLABLE 409 Already cancelled, or the trip has started or finished
CANCEL_FAILED 500 Retry, or contact support
INVOICE_NOT_AVAILABLE 409 The invoice is available once the booking is confirmed
NOT_FOUND 404 No such endpoint. Check the path and the method
Sign in with Mobile
Enter your mobile number to receive OTP