I have an application where a user can create several schedules from a list of events. Each item added to a schedule can be updated(or edited).
Assume Schedule 1 contains Event 1 and Event 2
and Schedule 2 contains Event 3 and Event 4
.
The endpoint to update an item in a schedule is /api/{scheduleNumber}/{eventId}
Now if the user sends a PUT request to the endpoint /api/{1}/{3}
, with a properly formed body about the updated event, this is obviously wrong since Schedule 1 does not contain Event 3.
In this situation, is it appropriate to send 400 Bad Request
, assuming that the request has a valid syntax?