Thanks , i figured it out,
it was not getting response because of some programming errors in the code , once i commented some parts and tested it , it worked fine ,
it seems if there are any errors in calling a document from within api method it does not compile or get called and gives invalid method error , so should be sure to clear those .
but now i got some other queries regarding the updating a child table , but better to open another thread for that ,
thanks , you can close this thread.