Teach me to create API call

Check out this link.

It should help you out.