Error Handling
PrimoDato uses standard HTTP status codes and a consistent error envelope.
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request - invalid parameters |
| 401 | Unauthorized - missing or invalid API key |
| 402 | Payment Required - insufficient credits |
| 403 | Forbidden - API key lacks required scope |
| 404 | Not Found |
| 422 | Unprocessable Entity - validation error |
| 429 | Too Many Requests - rate limit exceeded |
| 500 | Internal Server Error |
Error Response Format
{
"error": "error_code_snake_case",
"message": "Human-readable description of the error",
"details": {
"field": "industry",
"issue": "Invalid industry slug. Valid values: hospitality, real-estate, healthcare..."
}
}| Error Code | Description |
|---|---|
| invalid_api_key | API key is missing, malformed, or revoked |
| insufficient_credits | Not enough credits for the requested operation |
| rate_limit_exceeded | Too many requests in the current time window |
| invalid_parameter | One or more query parameters are invalid |
| company_not_found | No company found with the given ID |
| already_revealed | Company already revealed for the account |