concept path parameter in category c#

appears as: path parameter
Code like a Pro in C#

This is an excerpt from Manning's book Code like a Pro in C#.

The API should return an HTTP code 400 (Bad Request) if an invalid flight number is provided in the path. An invalid flight number could be a negative number or a string that only contains letters. If a requested flight number does not map to a flight in the database, then an HTTP code 404 (Not Found) is returned.

Figure 3.7 The Request-Return lifecycle of the POST /booking/{flightNumber} endpoint. On success, the endpoint returns an HTTP status of 201 along with a booking id, flight information, and customer information. In case the service cannot find the appropriate flight, it returns an HTTP status 404. When there is an internal error, it returns HTTP status 500.