Add Optional GET Query Parameter

We are introducing an enhancement to our Warehouse Management GET APIs that provides more control and flexibility over how empty query results are returned. Traditionally, if no matching records are found, the API returns a 404 Not Found status.

Supporting reduced unnecessary error handling, you can now choose the HTTP status code returned when a GET request yields no data. An optional GET query parameter empty_response_http_code can be added to your request.

Supported values are: 200, 204, or 404 (default behavior).

QUERY RESULT DETAILS WHEN NO MATCHING RECORDS ARE FOUND

API Query Result Description

empty_response_http_code=200

The API will return an HTTP 200 OK status, along with an empty JSON list (mirroring our usual data structure for GET responses.)

empty_response_http_code=204

The API will return HTTP 204 No Content, with no message body, indicating success with no data. 

Not specified or 404 The current behavior is maintained. The API will return a 404 Not Found when no records match the query.

Steps to Enable and Configure

Review the REST service definition in the REST API guides to leverage (available from the Oracle Help Center > your apps service area of interest > APIs & Schema). If you are new to Oracle's REST services you may want to begin with the Quick Start section.