API updated

Find or create period and set availability