copied code from working api into project folder

This is so I can keep my original working api incase something goes
wrong.