Creating Bezier/Nurbs Surface via script

Hey guys,
I am trying to write a script to import a bezier patch. I have the order known, in my case U and V have the same order and the control points coordinates. I want to know how to set the pntsv of the curve > 1 so that the SurfNurb object is created.
that link says u can access the surfNurb object via the Curve…Can anyone explain me how to? And if I’m to append the points linearly, how would be points be stored along the U and V? will it be taken care of ?
Thank you

API doc :