API Integration for Food Update Button need to be done next 5 hours

Job ID: 37996008

Budget: $10 – $30 USD

i have a view like this i need you to make so when i press on the button it should call a enpoint and update food.

there is a field called "show_food"
And if user press on power icon if is red is should send a request to /food/update/{Food_id}
where it updates "show_food" = 0

else if it green it should do "show_food" = 1
)