userid_is_available_m Sample Call and Response
This example shows a call to userid_is_available_m, a read-only utility method that determines whether a specified user ID is available for use, as opposed to userid_exists_m, which determines whether a user ID is already in use. This example is based on the plsql_m_r73.yml definition file.
This example covers the full set of fields the method accepts, since userid_is_available_m has only one input field beyond the standard envelope and authentication fields. It does not cover any error scenario.
Sample call
{
"rest_call": "userid_is_available_m",
"output_format": "json",
"client_no": 66123,
"auth_key": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"user_id": "tlin_2026"
}
The rest_call and output_format fields are added by the REST layer and do not appear in the method's own argument list. The user_id field is the only argument defined by userid_is_available_m itself, and it is required (nullable: false). Here, the caller is checking a candidate user ID, tlin_2026, before allowing a new account holder to register with it, which is the opposite check from userid_exists_m.
Sample response
{
"error_code": 0,
"error_msg": "User ID is available for use."
}
The returns block for userid_is_available_m contains only error_code, error_msg, and error_details, with no separate boolean output field for the availability determination. In this example, error_code 0 indicates that the check completed without a system error, and the error_msg field carries the actual determination in plain text, here confirming that tlin_2026 is not already claimed and can be assigned to a new account. The error_details field, which is nullable and used only to supply supplemental error information when an actual system error occurs, is left out of this example because there is no error to detail.