The question is about the correct way to name variable or identifiers that groups collections of two or more "things". Let me explain a little further with example and question...
I'm not an english native speaker.
In your example you'd name it "appointmentIds", as it's multiple Ids for your appointment type i.e. Ids for many different appointments.
"appointmentsIds" would imply the relationship between an appointment and its Ids i.e. the appointment (singular) has many different Ids, which from your example is not likely! I'd suggest reading up on nouns and the possesive (I appreciate English is not your first language, English is hard!)