---
title: Puts the catalog node relation.
slug: commerce-connect-15/service-api/G1DH-puts-the-catalog-node-relation
docTags: 
createdAt: 2026-10-09T17:33:31.176Z
---

{
  "id": "Btf13yrLUXpRJD2qD5x8s",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "/episerverapi/commerce/nodes/{nodeCode}/noderelations/{childCode}",
    "servers": [],
    "name": "Puts the catalog node relation.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "nodeCode",
          "type": "string",
          "description": ""
        },
        {
          "kind": "required",
          "name": "childCode",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "nodeCode",
          "type": "string",
          "description": "The node code."
        },
        {
          "kind": "optional",
          "name": "childCode",
          "type": "string",
          "description": "The child code."
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "<p>The relation object, note that the parent and child node code from the URL are being used.</p>",
          "customType": "NodeRelation",
          "schema": [
            {
              "name": "sortOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the sort order.",
              "format": "int32"
            },
            {
              "name": "parentNodeCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the parent node code."
            },
            {
              "name": "childNodeCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the child node code."
            }
          ],
          "modelRef": "#/components/schemas/NodeRelation",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Success",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "204",
        "description": "The catalog node relation is saved.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "If the catalog node 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": "If node or node relation does not exist.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "bfmfqw4xyRKqam7jxqgBN",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url /episerverapi/commerce/nodes/{nodeCode}/noderelations/{childCode} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "KPV62e7vYdA2acOLMRDzv",
          "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/nodes/{nodeCode}/noderelations/{childCode}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "TLusv3UUqBpr67Uhe8POT",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/episerverapi/commerce/nodes/{nodeCode}/noderelations/{childCode}\")\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": "R6AvzScClvLIv4TouGIZt",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/episerverapi/commerce/nodes/{nodeCode}/noderelations/{childCode}\"\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": "bfmfqw4xyRKqam7jxqgBN"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Success\n"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// The catalog node relation is saved.\n"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// If the catalog node 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 or node relation does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}