[HttpGet("/officialId")] //This should be encrypted in a production API public async Task <ActionResult> Get(string officialId) { try { var result = await _customerBusiness.GetCustomerInformation(officialId); var customerInformation = _mapper.Map(result); return(Ok(customerInformation)); } catch (ValidationException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { _logger.LogError(ex, "Something went wrong trying to get customer information."); return(StatusCode(500)); } }