public async Task <IActionResult> SendSessionReplyAsync( [FromRoute] string id, [FromQuery] SessionReplyMessage.SessionReplyMessageCode code) { if (string.IsNullOrWhiteSpace(id)) { return(ValidationProblem( new ValidationProblemDetails( new Dictionary <string, string[]> { { nameof(id), new [] { $"{nameof(id)} is required" } } }))); } try { await _transactionsManager.SendSessionReplyAsync(id, code); } catch (NullReferenceException) { return(NotFound()); } var transaction = await _transactionsManager.GetAsync(id); return(Ok(_mapper.Map <TransactionDetailsModel>(transaction))); }