fix optional fields affiliate API issues