diff --git a/src/Umbraco.Cms.Api.Management/Mapping/DocumentType/DocumentTypeMapDefinition.cs b/src/Umbraco.Cms.Api.Management/Mapping/DocumentType/DocumentTypeMapDefinition.cs index 2a5ea3ae7cc9..958dff64e424 100644 --- a/src/Umbraco.Cms.Api.Management/Mapping/DocumentType/DocumentTypeMapDefinition.cs +++ b/src/Umbraco.Cms.Api.Management/Mapping/DocumentType/DocumentTypeMapDefinition.cs @@ -1,4 +1,4 @@ -using Umbraco.Cms.Api.Management.Mapping.ContentType; +using Umbraco.Cms.Api.Management.Mapping.ContentType; using Umbraco.Cms.Api.Management.ViewModels; using Umbraco.Cms.Api.Management.ViewModels.DocumentType; using Umbraco.Cms.Core.Mapping; @@ -39,6 +39,7 @@ private void Map(IContentType source, DocumentTypeResponseModel target, MapperCo target.Properties = MapPropertyTypes(source); target.AllowedDocumentTypes = source.AllowedContentTypes?.Select(ct => new DocumentTypeSort { DocumentType = new ReferenceByIdModel(ct.Key), SortOrder = ct.SortOrder }) + .OrderBy(ct => ct.SortOrder) .ToArray() ?? Enumerable.Empty(); target.Compositions = MapNestedCompositions( source.ContentTypeComposition,