2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with VTULab’s servers.
HTTP Status Codes
| Code | Description |
|---|---|
200 - OK | Everything worked as expected. |
400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 - Unauthorized | No valid API key provided. |
403 - Forbidden | The API key doesn’t have permissions for the request or IP is not whitelisted. |
404 - Not Found | The requested resource doesn’t exist. |
422 - Unprocessable Entity | Validation errors (e.g. invalid phone number format). |
429 - Too Many Requests | Too many requests hit the API too quickly. |
500, 502, 503, 504 - Server Errors | Something went wrong on VTULab’s end. |
Error Response Structure
When a request fails, we return a JSON object containing the error details.Field Definitions
Always
false for error responses.A high-level summary of the error.
An object containing field-specific validation messages. The keys represent the field names, and the values are arrays of error strings.
Handling Errors
Validation Errors (422)
These occur when the data you sent doesn’t meet our requirements. Always check theerrors object for specific details.
