Errors
Error response format, error types, and HTTP status codes used by the WedStay API.
Error Reference
All API errors follow a consistent envelope format. Use the type and code fields for programmatic error handling, and message for display to users.
Error format
| Field | Type | Description |
|---|---|---|
type | string | Error category (see table below) |
code | string | Specific error code for programmatic handling |
message | string | Human-readable description |
request_id | string | Unique request identifier for support |
doc_url | string | Link to relevant documentation |
Error types
| Type | HTTP Status | Description |
|---|---|---|
invalid_request_error | 400 | The request was malformed or missing required fields |
validation_error | 400 | A field has an invalid value or failed validation |
authentication_error | 401 | Invalid, missing, or expired API key |
not_found | 404 | The requested resource does not exist |
rate_limit_exceeded | 429 | Too many requests — slow down |
internal_error | 500 | Something went wrong on our end |
Error codes
invalid_request_error (400)
| Code | Description |
|---|---|
missing_required_field | A required field is missing from the request |
invalid_query_parameter | An unrecognized or malformed query parameter |
body_too_large | Request body exceeds the 10KB limit |
invalid_json | Request body is not valid JSON |
validation_error (400)
| Code | Description |
|---|---|
invalid_field_value | A field has an invalid value (e.g. negative guest count) |
invalid_date_format | Date field is not in ISO 8601 format |
invalid_region | The pricing region is not recognized |
authentication_error (401)
| Code | Description |
|---|---|
missing_api_key | No Authorization header or X-WedStay-Key header provided |
invalid_api_key | The API key is not valid or has been revoked |
not_found (404)
| Code | Description |
|---|---|
venue_not_found | No venue exists with the given slug or ID |
vendor_not_found | No vendor exists with the given slug or ID |
endpoint_not_found | The API endpoint does not exist |
rate_limit_exceeded (429)
| Code | Description |
|---|---|
too_many_requests | You've exceeded the per-minute rate limit |
daily_limit_exceeded | You've exceeded the daily request limit |
internal_error (500)
| Code | Description |
|---|---|
server_error | An unexpected error occurred — contact support if persistent |
service_unavailable | A downstream service is temporarily unavailable |
HTTP status codes
| Status | Meaning |
|---|---|
200 | Success |
201 | Created (inquiry submitted) |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
429 | Rate limited |
500 | Internal server error |