Fixed id reference in api.js