@NatGeo , When talk about WebApi, it's related to xrm webservice call(REST).
So, if i understood. I just have to create a webtemplate and in this webtemplate i make liquid fetch query into this code i create script to populate my form. Lilke this:
{%assign opportunityid=request.params["id"]%}
{%fetchxml opportunities%}
<fetch>
<attribute...>
<filter>
<condition attribute="opportunityid" operator="eq" value = "{{opportunityid}}"..>
</filter>
<endfetch>
{%endfetchxml%}
{%for myopportunity in .......%}
<script>
//should i populate lookup here like this??
$("#...").attr("value", {{myopportunity.contact.name}});
</script>
{%endfor%}
Thanks