---
title: Puts the node entry relation.
slug: commerce-connect-15/service-api/2mwz-puts-the-node-entry-relation
docTags: 
createdAt: 2026-10-09T17:33:31.916Z
---

{
  "id": "Fvkd-9iCjld88j2_I2SXv",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}",
    "servers": [],
    "name": "Puts the node entry relation.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "entryCode",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "nodeCode",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "entryCode",
          "type": "string",
          "description": "The entry code."
        },
        {
          "kind": "optional",
          "name": "nodeCode",
          "type": "string",
          "description": "The node code."
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "<p>The relation object, note that the entry code and node code from the URL are being used.</p>",
          "customType": "NodeEntryRelation",
          "schema": [
            {
              "name": "sortOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the sort order.",
              "format": "int32"
            },
            {
              "name": "nodeCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the parent node code."
            },
            {
              "name": "entryCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the child node code."
            },
            {
              "name": "isPrimary",
              "kind": "optional",
              "type": "boolean",
              "nullable": true,
              "description": "<p>Gets or sets whether this relation is the primary relation for the entry\r\n(the home category).</p>"
            }
          ],
          "modelRef": "#/components/schemas/NodeEntryRelation",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Success",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "204",
        "description": "The node entry relation is saved.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "If the node entry relation model is not valid.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "<p>If node-entry relation does not exist.</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "DyuBADFro8EDLaw2_WdNZ",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url /episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "JKWUThOZrnz3icA1k6qbP",
          "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: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "CqUaqBjnUy9KC4aOsGlEZ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "nBBgYfxC-ygsFjXNf1bhM",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/episerverapi/commerce/entries/{entryCode}/nodeentryrelations/{nodeCode}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DyuBADFro8EDLaw2_WdNZ"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Success\n"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// The node entry relation is saved.\n"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// If the node entry relation model is not valid.\n"
        },
        {
          "id": "response-3-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// If node-entry relation does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}