Fixed route URI generation in API resource.