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

## Example models

```csharp
[Serializable]
public class EntryRelation
  {
    public int SortOrder { get; set; }
    public decimal Quantity { get; set; }
    public string RelationType { get; set; }
    public string GroupName { get; set; }
    public string ParentEntryCode { get; set; }
    public string ChildEntryCode { get; set; }
  }
```

## Get all entry relations

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

### JSON response type

```csharp
ar 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}/entryrelations").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}/entryrelations").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<ArrayOfEntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <EntryRelation>
    <SortOrder>0</SortOrder>
    <Quantity>1.0000</Quantity>
    <RelationType>ProductVariation</RelationType>
    <GroupName>default</GroupName>
    <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
    <ChildEntryCode>Jackets-Peacoats-Hooded-Tan-Large</ChildEntryCode>
  </EntryRelation>
  <EntryRelation>
    <SortOrder>0</SortOrder>
    <Quantity>1.0000</Quantity>
    <RelationType>ProductVariation</RelationType>
    <GroupName>default</GroupName>
    <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
    <ChildEntryCode>Jackets-Peacoats-Asymmetrical-Black-Small</ChildEntryCode>
  </EntryRelation>
  <EntryRelation>
    <SortOrder>0</SortOrder>
    <Quantity>1.0000</Quantity>
    <RelationType>ProductVariation</RelationType>
    <GroupName>default</GroupName>
    <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
    <ChildEntryCode>Jackets-Peacoats-Asymmetrical-Black-Medium</ChildEntryCode>
  </EntryRelation>
</ArrayOfEntryRelation>
```

## Get entry relation

| GET | `get/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}` | Get entry 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}/entryrelations/{childCode}/{relationType}").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}/entryrelations/{childCode}/{relationType}").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<EntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <Quantity>1.0000</Quantity>
  <RelationType>ProductVariation</RelationType>
  <GroupName>default</GroupName>
  <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
  <ChildEntryCode>Jackets-Peacoats-Asymmetrical-Black-Small</ChildEntryCode>
</EntryRelation>
```

## Create entry relation

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

### JSON response type

```csharp
ar model = new EntryRelation()
  {
    ChildEntryCode = "Jackets-Peacoats-Hooded-Tan-Large",
    GroupName = "default",
    ParentEntryCode = "Jackets-Peacoats-Asymmetrical",    
    Quantity = 1,
    RelationType = "ProductVariation",
    SortOrder = 0
  };
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}/entryrelations",
  new StringContent(json, Encoding.UTF8, "application/json")).Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var model = new EntryRelation()
  {
    ChildEntryCode = "Jackets-Peacoats-Hooded-Tan-Large",
    GroupName = "default",
    ParentEntryCode = "Jackets-Peacoats-Asymmetrical",
    Quantity = 1,
    RelationType = "ProductVariation",
    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(EntryRelation));
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}/entryrelations",
  new StringContent(xml, Encoding.UTF8, "text/xml")).Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<EntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <Quantity>1</Quantity>
  <RelationType>ProductVariation</RelationType>
  <GroupName>default</GroupName>
  <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
  <ChildEntryCode>Jackets-Peacoats-Hooded-Tan-Large</ChildEntryCode>
</EntryRelation>
```

## Update entry relation

| PUT | `put/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}` | Update entry relation |
| --- | ----------------------------------------------------------------------------------------- | --------------------- |

### JSON response type

```csharp
var model = new EntryRelation()
  {
    ChildEntryCode = "Jackets-Peacoats-Hooded-Tan-Large",
    GroupName = "default",
    ParentEntryCode = "Jackets-Peacoats-Asymmetrical",
    Quantity = 1,
    RelationType = "ProductVariation",
    SortOrder = 0
  };
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}/entryrelations/{childCode}/{relationType}",
  new StringContent(json, Encoding.UTF8, "application/json")).Result.Content.ReadAsStringAsync().Result
```

### XML response type

```csharp
var model = new EntryRelation()
  {
    ChildEntryCode = "Jackets-Peacoats-Hooded-Tan-Large",
    GroupName = "default",
    ParentEntryCode = "Jackets-Peacoats-Asymmetrical",
    Quantity = 1,
    RelationType = "ProductVariation",
    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(EntryRelation));
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}/entryrelations/{childCode}/{relationType}",
  new StringContent(xml, Encoding.UTF8, "text/xml")).Result.Content.ReadAsStringAsync().Result
```

Response

```xml
204 No Content
```

## Delete entry relation

| DELETE | `delete/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}` | Delete entry 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}/entryrelations/{childCode}/{relationType}").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}/entryrelations/{childCode}/{relationType}").Result.Content.ReadAsStringAsync().Result
```

Response

```xml
<EntryRelation xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SortOrder>0</SortOrder>
  <Quantity>1</Quantity>
  <RelationType>ProductVariation</RelationType>
  <GroupName>default</GroupName>
  <ParentEntryCode>Jackets-Peacoats-Asymmetrical</ParentEntryCode>
  <ChildEntryCode>Jackets-Peacoats-Hooded-Tan-Large</ChildEntryCode>
</EntryRelation>
```

## Special strings

These properties require special values to function properly.

RelationType

- ProductVariation
- PackageEntry
- BundleEntry
