HTTP status codes, error envelope, and the canonical error codes the API returns.
The 3Common API uses standard HTTP status codes and returns a JSON envelope on every error response.
{
"status": 400,
"error": "VALIDATION_FAILED",
"message": "`name` is required",
"details": { /* optional structured info */ }
}
| Field | Type | Description |
|---|---|---|
status | integer | HTTP status code, mirrored in the body for convenience. |
error | string | A stable, machine-readable error code. Safe to switch on. |
message | string | Human-readable summary. Subject to change; do not pattern-match. |
details | object | Optional. Field-level errors or other structured information. |
| Code | Meaning | When you'll see it |
|---|---|---|
| 200 | OK | Successful read. |
| 201 | Created | Successful create. |
| 204 | No Content | Successful delete or no-op update. |
| 400 | Bad Request | The request was malformed or failed validation. |
| 401 | Unauthorized | Missing or invalid Authorization header. |
| 403 | Forbidden | Authenticated, but not allowed to perform this action. |
| 404 | Not Found | The resource does not exist or you cannot access it. |
| 409 | Conflict | The request conflicts with the current resource state. |
| 422 | Unprocessable Entity | Semantically invalid input (e.g., end date before start). |
| 429 | Too Many Requests | You have exceeded your rate limit. See the Retry-After header. |
| 5xx | Server error | Something went wrong on our side. Safe to retry with backoff. |
Each SDK throws a typed error you can switch on. See the error-handling
example in each SDK's examples/ directory.