Loading...
Area: Episerver Service API
Applies to versions: 4 and higher
Other versions:

Catalog nodes

Recommendations [hide]

This topic describes how to work with RESTful operations for catalog nodes in the Episerver Service API.

In this topic

Example models

[Serializable]
public class NameValue
  {
    public string Name { get; set; }
    public string Value { get; set; }
  }
[Serializable]
public class ResourceLink
  {
    public string Title { get; set; }
    public string Type { get; set; }
    public string Href { get; set; }
    public List<NameValue> Properties { get; set; }
  }	

[Serializable]
public class SeoInfo
  {
    public string Title { get; set; }
    public string Uri { get; set; }
    public string UriSegment { get; set; }
    public string Description { get; set; }
    public string Keywords { get; set; }
    public string LanguageCode { get; set; }
  }
		
[Serializable]
public class MetaFieldData
  {
    public string Language { get; set; }
    public string Value { get; set; }
  }

[Serializable]
public class MetaFieldProperty
  {
    public string Name { get; set; }
    public string Type { get; set; }
    public List<MetaFieldData> Data { get; set; }
  }

[Serializable]
public class Node
  {
    public Node()
      {
        SeoInformation = new List<SeoInfo>();
        Assets = new List<ResourceLink>();
        MetaFields = new List<MetaFieldProperty>();
        Children = new List<ResourceLink>();
        Entries = new List<ResourceLink>();
      }

    public string Code { get; set; }
    public string ParentNodeCode { get; set; }
    public string Name { get; set; }
    public DateTime StartDate { get; set; }
    public DateTime EndDate { get; set; }
    public bool IsActive { get; set; }
    public string MetaClass { get; set; }
    public string Catalog { get; set; }
    public int SortOrder { get; set; }
    public ResourceLink ParentNode { get; set; }
    public List<MetaFieldProperty> MetaFields { get; set; }
    public List<SeoInfo> SeoInformation { get; set; }
    public List<ResourceLink> Assets { get; set; }
    public List<ResourceLink> Children { get; set; }
    public List<ResourceLink> Entries { get; set; }
  }

Get All Nodes

/episerverapi/commerce/catalog/{catalogName}/nodes

By default this method gets all languages for the nodes and entries. If you want only one specific language, use the Accept-Language header.

Client Code Media Type JSON

Response JSON

Client Code Media Type XML

Response XML

Get Node

/episerverapi/commerce/nodes/{node code}

By default this method gets all languages for the nodes and entries. If you want only one specific language, use the Accept-Language header.

Client Code Media Type JSON

Response JSON

Client Code Media Type XML

Response XML

Post Node

/episerverapi/commerce/nodes

Client Code Media Type JSON

Response JSON

Client Code Media Type XML

Response XML

Put Node

/episerverapi/commerce/nodes/{node code}

Client Code Media Type JSON

Response JSON

Client Code Media Type XML

Response XML

Delete Node

/episerverapi/commerce/nodes/{node code}

Client Code Media Type JSON

Response JSON

Client Code Media Type XML

Response XML

Get common draft node [New in Service API 5.1.0]

By adding new endpoints as listed below, you can get common draft versions, create new common drafts, and update or delete existing drafts.

Post common draft node [New in Service API 5.1.0]

Note: We do not support creating common drafts for non-existing content. You can create a first draft version by using an endpoint for published content (without “commondraft”) and setting IsActive to “false”.

Put common draft node [New in Service API 5.1.0]

Notes: If common draft content is in “Published” state, a new common draft version is created (same behavior as Post common draft). If common draft content is in "DelayedPublish/AwaitingApproval/CheckedIn" state, then updating content is skipped, and a Conflict status code (409) is returned.

Delete common draft node [New in Service API 5.1.0]

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Aug 14, 2017

Recommendations [hide]