public async Task <CustomerProfileResponse> GetByPhoneAsync([FromBody] GetByPhoneRequestModel model) { if (string.IsNullOrWhiteSpace(model.Phone)) { throw new BadRequestException($"{nameof(model.Phone)} can't be empty"); } var result = await _customerProfileService.GetByPhoneAsync(model.Phone, model.IncludeNotVerified, model.IncludeNotActive); if (!string.IsNullOrEmpty(result?.Profile?.CustomerId)) { _log.Info(GetApiKeyName(), new { customerId = result.Profile.CustomerId }); } return(_mapper.Map <CustomerProfileResponse>(result)); }