Error Codes
This page documents the error responses returned by the VectorCare Open API.
HTTP Status Codes
Section titled “HTTP Status Codes”| Status | Description |
|---|---|
200 OK | Request successful |
201 Created | Resource created successfully |
400 Bad Request | Invalid request body or parameters |
401 Unauthorized | Missing or invalid authentication |
403 Forbidden | Valid authentication but insufficient permissions |
404 Not Found | Resource not found |
429 Too Many Requests | Rate limit exceeded |
Error Response Format
Section titled “Error Response Format”Error responses include a message and error code:
{ "field_name": [ { "message": "Human readable error message", "code": "namespace:error_code" } ]}For non-field errors:
{ "message": "Human readable error message", "code": "namespace:error_code"}Common Error Codes
Section titled “Common Error Codes”Authentication Errors
Section titled “Authentication Errors”| Code | Message |
|---|---|
members:not_authenticated | Authentication credentials were not provided. |
members:authentication_failed | Authentication failed. |
members:permission_denied | You do not have permission to perform this action. |
Validation Errors
Section titled “Validation Errors”| Code | Message |
|---|---|
common:required | This field is required. |
common:null | This field may not be null. |
common:blank | This field may not be blank. |
common:choice_invalid | ”{input}” is not a valid choice. |
common:max_length | Ensure this field has no more than {max_length} characters. |
common:integer_invalid | A valid integer is required. |
common:number_invalid | A valid number is required. |
common:email_invalid | A valid email address is required. |
common:datetime_invalid_format | Datetime format should be {format}. |
common:date_invalid_format | Date format should be {format}. |
common:list_invalid | Value should be a list. |
common:address_invalid | Address is invalid. |
API Errors
Section titled “API Errors”| Code | Message |
|---|---|
api:bad_request | Bad request. |
api:not_found | Not found. |
api:too_many_requests | Request was throttled. |
api:method_not_allowed | Method not allowed. |
api:unknown_error | Unknown error. |
Open API Specific Errors
Section titled “Open API Specific Errors”| Code | Message |
|---|---|
public_api:public_api_not_enabled | The Open API is not enabled for the service type of this request. |
responder:too_many_locations | Too many locations. (Max 200 per request) |
Example Error Responses
Section titled “Example Error Responses”401 Unauthorized
Section titled “401 Unauthorized”{ "message": "Authentication credentials were not provided.", "code": "members:not_authenticated"}400 Bad Request (Validation Error)
Section titled “400 Bad Request (Validation Error)”{ "name": [ { "message": "\"invalid_state\" is not a valid choice.", "code": "common:choice_invalid" } ]}400 Bad Request (Timestamp Error)
Section titled “400 Bad Request (Timestamp Error)”{ "timestamp": [ { "message": "Timestamp cannot be in the future.", "code": "api:bad_request" } ]}403 Forbidden
Section titled “403 Forbidden”{ "message": "You do not have permission to perform this action.", "code": "members:permission_denied"}429 Too Many Requests
Section titled “429 Too Many Requests”{ "message": "Request was throttled.", "code": "api:too_many_requests"}Rate Limiting
Section titled “Rate Limiting”The API implements rate limiting to ensure service stability. If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.
When rate limited:
- Wait before retrying
- Implement exponential backoff
If you’re consistently hitting rate limits, contact us to discuss your use case.