working post endpoint which accepts json