---
title: Deletes the entry relation.
slug: commerce-connect-15/service-api/gSI0-deletes-the-entry-relation
docTags: 
createdAt: 2026-10-09T17:33:31.916Z
---

{
  "id": "IQ4fhJzLrgornS_QMqhZf",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}",
    "servers": [
      {
        "url": "http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}"
      },
      {
        "url": "https://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}"
      }
    ],
    "name": "Deletes the entry relation.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "entryCode",
          "type": "string",
          "description": "The entry code."
        },
        {
          "kind": "required",
          "name": "childCode",
          "type": "string",
          "description": "The child code."
        },
        {
          "kind": "required",
          "name": "relationType",
          "type": "string",
          "description": "Type of the relation."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The entry relation is deleted.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "EPiServer.ServiceApi.Commerce.Models.Catalog.EntryRelation",
            "schema": [
              {
                "name": "SortOrder",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Gets or sets the sort order.",
                "format": "int32"
              },
              {
                "name": "Quantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "Gets or sets the quantity.",
                "format": "double"
              },
              {
                "name": "RelationType",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the type of the relation."
              },
              {
                "name": "GroupName",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the name of the group."
              },
              {
                "name": "ParentEntryCode",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the parent entry code."
              },
              {
                "name": "ChildEntryCode",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the child entry code."
              }
            ],
            "modelRef": "#/components/schemas/EPiServer.ServiceApi.Commerce.Models.Catalog.EntryRelation",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "If entry or entry relation does not exist.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "twHd8Er7FCtbMajs2xmj_",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "eNdGNzimdwGd-JiAin-wj",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "lLcPOa9DJVPweD5UtLIgP",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "d9MDQ_Ju0hUUlKp6FjSjI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:64424/episerverapi/commerce/entries/{entryCode}/entryrelations/{childCode}/{relationType}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "twHd8Er7FCtbMajs2xmj_"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The entry relation is deleted.\n{\n  \"SortOrder\": \"\",\n  \"Quantity\": \"\",\n  \"RelationType\": \"\",\n  \"GroupName\": \"\",\n  \"ParentEntryCode\": \"\",\n  \"ChildEntryCode\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-2-404",
          "language": "404",
          "code": "// If entry or entry relation does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}