public async Task <IActionResult> InsertToPosition([Required] string id, [FromBody, Range(1, int.MaxValue)] int position)
        {
            var document = await _documentsService.GetDocumentByIdAsync(id);

            if (document == null)
            {
                return(NotFound());
            }

            if (document.Position == position)
            {
                var errorMessage = $"Document '{id}' already placed in position: '{position}'";
                _logger.LogWarning(errorMessage);
                return(Conflict(errorMessage));
            }

            var documentsCount = _documentsService.GetDocumentsCount();

            if (position > documentsCount)
            {
                var errorMessage = $"Position: '{position}' for document '{id}' is out of the range of awailable (max: {documentsCount})";
                _logger.LogWarning(errorMessage);
                return(BadRequest(errorMessage));
            }

            await _documentsService.InsertDocumentToPositionAsync(document, position);

            return(NoContent());
        }