The API returns standard HTTP status codes. Always check both the HTTP status code and the returncode field in the JSON response.
| HTTP Status | Meaning | Recommended Action |
|---|---|---|
| 200 OK | Success | Parse pricing_results and render to end user |
| 400 Bad Request | Invalid request body | Check required fields and data types; fix before retrying |
| 401 Unauthorized | Bad API key | Verify x-api-key header; do not retry automatically |
| 422 Unprocessable Entity | Invalid field value | Validate enum values and numeric ranges before submission |
| 429 Too Many Requests | Rate limit exceeded | Respect Retry-After header; implement exponential back-off |
| 500 Internal Server Error | Server error | Retry up to 3× with back-off; contact support if persistent |
// 401: { "returncode":401, "message":"Unauthorized: invalid x-api-key" }
// 400: { "returncode":400, "message":"loan_purpose is required" }
// 422: { "returncode":422, "message":"loan_type must be one of: Conventional, fha, VA, USDA, ARM, nonqm" }
// 429: { "returncode":429, "message":"Rate limit exceeded. Retry after 60 seconds." }
// 500: { "returncode":500, "message":"Internal server error. Contact support." }
Comments
0 comments
Please sign in to leave a comment.