HTTP Status Codes
HTTP status codes are standardized numeric codes returned by a server
to indicate the outcome of an API request. They help clients understand
whether a request was successful, failed, or requires further action.
In REST APIs and Oracle Fusion integrations, correct interpretation of
status codes is essential for error handling and debugging.
1. What Are HTTP Status Codes
HTTP status codes are part of the response sent by the server.
Each code represents a specific result of the request execution.
The first digit of the status code defines its category.
By relying on standard status codes, REST APIs maintain consistency
and predictable behavior across different systems.
2. Status Code Categories
2.1 1xx Informational
These codes indicate that the request has been received and is
being processed. They are rarely used in REST APIs.
- 100 Continue
- 102 Processing
2.2 2xx Success
2xx codes indicate that the request was successfully processed.
- 200 OK: Request succeeded
- 201 Created: Resource created successfully
- 204 No Content: Request succeeded with no response body
These codes are commonly returned by Oracle Fusion REST APIs
for successful operations.
2.3 3xx Redirection
3xx codes indicate that the client must take additional steps
to complete the request.
- 301 Moved Permanently
- 302 Found
- 307 Temporary Redirect
Redirection codes are less common in REST APIs but may appear
in authentication flows.
2.4 4xx Client Errors
4xx codes indicate that the request contains an error
from the client side.
- 400 Bad Request: Invalid request payload or parameters
- 401 Unauthorized: Missing or invalid authentication
- 403 Forbidden: Insufficient permissions
- 404 Not Found: Resource does not exist
These errors are common when calling secured Oracle Fusion APIs
with incorrect headers or parameters.
2.5 5xx Server Errors
5xx codes indicate that the server failed to process a valid request.
- 500 Internal Server Error: General server failure
- 502 Bad Gateway: Invalid response from upstream server
- 503 Service Unavailable: Server temporarily unavailable
Server errors usually require backend investigation or retry mechanisms.
3. Common Status Codes in REST APIs
| Status Code | Meaning | Typical Use Case |
|---|---|---|
| 200 | OK | Successful data retrieval |
| 201 | Created | Resource creation via POST |
| 204 | No Content | Successful update or delete |
| 400 | Bad Request | Invalid payload or parameters |
| 401 | Unauthorized | Authentication failure |
| 404 | Not Found | Resource not available |
| 500 | Internal Server Error | Backend processing issue |
4. Error Handling Best Practices
- Always check the HTTP status code before processing the response body
- Log error responses with request details
- Implement retries for transient 5xx errors
- Handle 4xx errors gracefully with user-friendly messages
5. HTTP Status Codes in Oracle Fusion REST APIs
Oracle Fusion REST APIs strictly follow HTTP standards.
Error responses often include additional details in the response body,
such as error codes and descriptive messages.
Understanding these status codes helps in faster debugging and
stable integration design.