EgyptLimo

Errors, retries, and support

Handle the Partner API failure contract safely.

Failures use this envelope and include a correlation_id:

{
  "error": {
    "code": "validation_error",
    "message": "Invalid booking request.",
    "details": { "errors": { "passenger.phone": ["…"] } }
  },
  "correlation_id": "cor_…"
}
StatusExamplesClient action
400invalid_request, missing idempotency keyCorrect the request; use a new key only if its body changes.
401invalid_client, unauthorizedRefresh/reconfigure credentials; do not blindly retry.
403forbidden, missing scope, IP/host policyCorrect scopes, host, or allowlist.
404not_foundVerify IDs and ownership; do not create a duplicate.
409nonce replay, changed idempotency payload, invalid stateResolve state; repeat only with the same original request where appropriate.
409partner_reference_conflictThe reference already belongs to a different quote. Investigate the existing booking; use a new reference for a genuinely new booking.
409duplicate_reference for Sandbox links; reused/expired link completion; Sandbox paymentReuse the original Sandbox link or select a new business reference. Never retry payment in Sandbox.
422validation, invalid quote, invalid refund amountCorrect business input and obtain a new quote if needed.
429rate limitHonor Retry-After when supplied; use exponential backoff with jitter.
5xxtransient EgyptLimo failureRetry a write with the same idempotency key; retry reads with backoff.

Persist correlation_id, your request ID, Idempotency-Key, partner_reference, and booking_id for support. Never log bearer tokens, client secrets, signing secrets, or webhook payload PII.