---
title: Catalog entry node relations
slug: commerce-connect-15/service-api/catalog-entry-node-relations
docTags: 
createdAt: 2026-07-22T14:38:27.000Z
---

## Example models

```csharp
[Serializable]
public class NodeEntryRelation
  {
    public int SortOrder { get; set; }
    public string NodeCode { get; set; }
    public string EntryCode { get; set; }
    public bool? IsPrimary { get; set; } //Optinal, if missing will be treated as False
  }
```

## Get all entry node relations

| GET | `get/episerverapi/commerce/entries/{entryCode}/nodeentryrelations` | Get all entry node relations |
| --- | ------------------------------------------------------------------ | ---------------------------- |

### JSON response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.GetAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations").Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/xml"));		
var result = client.GetAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<ArrayOfNodeEntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <NodeEntryRelation>
    <SortOrder>0</SortOrder>
    <NodeCode>Tops-Tunics</NodeCode>
    <EntryCode>Tops-Tunics-LongSleeve</EntryCode>
    <IsPrimary>True</IsPrimary>
</NodeEntryRelation> </ArrayOfNodeEntryRelation>
```

## Get a specific entry node relation

| GET | `get/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/\{nodeCode}` | Get a specific entry node relation |
| --- | ------------------------------------------------------------------------------ | ---------------------------------- |

### JSON response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.GetAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}").Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/xml"));		
var result = client.GetAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<NodeEntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <NodeCode>Tops-Tunics</NodeCode>
  <EntryCode>Tops-Tunics-LongSleeve</EntryCode>
</NodeEntryRelation>
```

## Create entry node relation

:::hint{type="info"}
**Note**
Setting a NodeEntryRelation with IsPrimary = true makes the *current* primary relation for that entry *non-primary*.
:::

| POST | `post/episerverapi/commerce/entries/{entryCode}/nodeentryrelations` | Create entry node relation |
| ---- | ------------------------------------------------------------------- | -------------------------- |

### JSON response type

```csharp
var model = new NodeEntryRelation()
  {
    EntryCode = "Tops-Tunics-LongSleeve",
    NodeCode = "Tops-Sweaters",
    SortOrder = 0,
    IsPrimary = true
  };
var json = JsonConvert.SerializeObject(model);
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.PostAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations", 
  new StringContent(json, Encoding.UTF8, "application/json")).Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var model = new NodeEntryRelation()
  {
    EntryCode = "Tops-Tunics-LongSleeve",
    NodeCode = "Tops-Sweaters",
    SortOrder = 0
  };
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
var serializer = new XmlSerializer(typeof(NodeEntryRelation));
var xml = String.Empty;
using (var ms = new MemoryStream())
  {
    serializer.Serialize(ms, model);
    xml = Encoding.Default.GetString(ms.ToArray());
  } 
var result = client.PostAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations", 
  new StringContent(xml, Encoding.UTF8, "text/xml")).Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<NodeEntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <NodeCode>Tops-Sweaters</NodeCode>
  <EntryCode>Tops-Tunics-LongSleeve</EntryCode>
  <IsPrimary>True</IsPrimary>
</NodeEntryRelation>
```

## Update entry node relation

:::hint{type="info"}
**Note**
Setting a `NodeEntryRelation` with `IsPrimary = true `makes the *current* primary relation for that entry *non-primary*.
:::

| PUT | `put/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}` | Update entry node relation |
| --- | ----------------------------------------------------------------------------- | -------------------------- |

### JSON response type

```csharp
var model = new NodeEntryRelation()
  {
    EntryCode = "Tops-Tunics-LongSleeve",
    NodeCode = "Tops-Sweaters",
    SortOrder = 0,
    IsPrimary = true
  };
var json = JsonConvert.SerializeObject(model);
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.PutAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}",
  new StringContent(json, Encoding.UTF8, "application/json")).Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var model = new NodeEntryRelation()
  {
    EntryCode = "Tops-Tunics-LongSleeve",
    NodeCode = "Tops-Sweaters",
    SortOrder = 0,
    IsPrimary = true
  };
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
var serializer = new XmlSerializer(typeof(NodeEntryRelation));
var xml = String.Empty;
using (var ms = new MemoryStream())
  {
    serializer.Serialize(ms, model);
    xml = Encoding.Default.GetString(ms.ToArray());
  } 	
var result = client.PutAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}",
  new StringContent(xml, Encoding.UTF8, "text/xml")).Result.Content.ReadAsStringAsync().Result
```

Response

```xml
200 No Content
```

## Delete entry node relation

| DELETE | `delete/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}` | Delete entry node relation |
| ------ | -------------------------------------------------------------------------------- | -------------------------- |

### JSON response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.DeleteAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}").Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/xml"));	
var result = client.DeleteAsync("/episerverapi/commerce/entries/{entry code}/nodeentryrelations/{node code}").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<NodeEntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <NodeCode>Tops-Sweaters</NodeCode>
  <EntryCode>Tops-Tunics-LongSleeve</EntryCode>
  <IsPrimary>True</IsPrimary>
</NodeEntryRelation>
```
