fix endpoint request for category
add validation