customerKey to apiKey refactoring