How to integrate own API into ghost?

Hello,

I read a lot about the ghost API but is it also possible to get data from another API and integrate this into a custom hbs file on the hosted ghost.org?

Is a command like json_decode() possible?

Best,
Bram