public async Task <IActionResult> GetAll(string certificateId) { var response = await _service.GetCertificateNotificationsAsync(new GetCertificateNotificationsRequest { CertificateId = certificateId }); if (response.BusinessMessages != null && response.BusinessMessages.Length > 0) { return(BadRequest(response.BusinessMessages)); } var mappedModels = _mapper.Map <ThabNotification>(response.Value?.CertificateNotifications); return(Ok(mappedModels)); }