Use API_VERSION when call JS API

In future when the API versions change we only need the constant "API_VERSION".