---
title: Posts the catalog entry association.
slug: commerce-connect-15/service-api/BBo8-posts-the-catalog-entry-association
docTags: 
createdAt: 2026-10-09T17:33:29.599Z
---

{
  "id": "TE7-WWRA0jJgdNLahmSdO",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/episerverapi/commerce/entries/{entryCode}/associations",
    "servers": [],
    "name": "Posts the catalog entry association.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "entryCode",
          "type": "string",
          "description": ""
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "text/plain",
            "application/json",
            "text/json"
          ],
          "default": "text/plain"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "entryCode",
          "type": "string",
          "description": "The entry code."
        }
      ],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "The association.",
          "customType": "Association",
          "schema": [
            {
              "name": "sortOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the sort order.",
              "format": "int32"
            },
            {
              "name": "name",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the name of the association."
            },
            {
              "name": "catalogEntryCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the catalog entry code."
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets or sets the description."
            },
            {
              "name": "entryAssociations",
              "kind": "optional",
              "type": "array",
              "nullable": true,
              "description": "Gets or sets the entry associations.",
              "modelRef": "#/components/schemas/EntryAssociation",
              "customType": "EntryAssociation[]",
              "schema": [
                {
                  "name": "sortOrder",
                  "kind": "optional",
                  "type": "integer<int32>",
                  "description": "Gets or sets the sort order.",
                  "format": "int32"
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "Gets or sets the type of the association."
                },
                {
                  "name": "catalogEntryCode",
                  "kind": "optional",
                  "type": "string",
                  "nullable": true,
                  "description": "Gets or sets the catalog entry code."
                },
                {
                  "name": "entry",
                  "kind": "optional",
                  "type": "object",
                  "description": "Class that represents linkage and more information about models.",
                  "modelRef": "#/components/schemas/ResourceLink",
                  "customType": "ResourceLink",
                  "schema": [
                    {
                      "name": "title",
                      "kind": "optional",
                      "type": "string",
                      "nullable": true,
                      "description": "Gets or sets the title."
                    },
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "nullable": true,
                      "description": "Gets or sets the type."
                    },
                    {
                      "name": "href",
                      "kind": "optional",
                      "type": "string",
                      "nullable": true,
                      "description": "Gets or sets the uri."
                    },
                    {
                      "name": "properties",
                      "kind": "optional",
                      "type": "array",
                      "nullable": true,
                      "description": "Gets or sets the properties.",
                      "modelRef": "#/components/schemas/NameValue",
                      "customType": "NameValue[]",
                      "schema": [
                        {
                          "name": "name",
                          "kind": "optional",
                          "type": "string",
                          "nullable": true,
                          "description": "Gets or sets the name."
                        },
                        {
                          "name": "value",
                          "kind": "optional",
                          "type": "string",
                          "nullable": true,
                          "description": "Gets or sets the type."
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/Association",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The catalog association is saved.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "Association[]",
            "schema": [
              {
                "name": "sortOrder",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Gets or sets the sort order.",
                "format": "int32"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets or sets the name of the association."
              },
              {
                "name": "catalogEntryCode",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets or sets the catalog entry code."
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets or sets the description."
              },
              {
                "name": "entryAssociations",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "Gets or sets the entry associations.",
                "modelRef": "#/components/schemas/EntryAssociation",
                "customType": "EntryAssociation[]",
                "schema": [
                  {
                    "name": "sortOrder",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "Gets or sets the sort order.",
                    "format": "int32"
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the type of the association."
                  },
                  {
                    "name": "catalogEntryCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the catalog entry code."
                  },
                  {
                    "name": "entry",
                    "kind": "optional",
                    "type": "object",
                    "description": "Class that represents linkage and more information about models.",
                    "modelRef": "#/components/schemas/ResourceLink",
                    "customType": "ResourceLink",
                    "schema": [
                      {
                        "name": "title",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Gets or sets the title."
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Gets or sets the type."
                      },
                      {
                        "name": "href",
                        "kind": "optional",
                        "type": "string",
                        "nullable": true,
                        "description": "Gets or sets the uri."
                      },
                      {
                        "name": "properties",
                        "kind": "optional",
                        "type": "array",
                        "nullable": true,
                        "description": "Gets or sets the properties.",
                        "modelRef": "#/components/schemas/NameValue",
                        "customType": "NameValue[]",
                        "schema": [
                          {
                            "name": "name",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": "Gets or sets the name."
                          },
                          {
                            "name": "value",
                            "kind": "optional",
                            "type": "string",
                            "nullable": true,
                            "description": "Gets or sets the type."
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Association",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "If the catalog association 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 entry does not exist.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "OvAUPfCDZYV4jGERqCBWu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /episerverapi/commerce/entries/{entryCode}/associations \\\n     --header 'accept: text/plain'"
        },
        {
          "id": "WshjgCmavbj3peXj6YUzb",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"text/plain\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/episerverapi/commerce/entries/{entryCode}/associations\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "jxZFcQhwL55LK_ToK7aiP",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/episerverapi/commerce/entries/{entryCode}/associations\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"text/plain\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "CyUYOPDQCKlG3oCt0twNg",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/episerverapi/commerce/entries/{entryCode}/associations\"\n\npayload = {}\nheaders = {\n   'accept': 'text/plain',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "OvAUPfCDZYV4jGERqCBWu"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The catalog association is saved.\n[\n  {\n    \"sortOrder\": \"\",\n    \"name\": \"\",\n    \"catalogEntryCode\": \"\",\n    \"description\": \"\",\n    \"entryAssociations\": [\n      {\n        \"sortOrder\": \"\",\n        \"type\": \"\",\n        \"catalogEntryCode\": \"\",\n        \"entry\": {\n          \"title\": \"\",\n          \"type\": \"\",\n          \"href\": \"\",\n          \"properties\": [\n            {\n              \"name\": \"\",\n              \"value\": \"\"\n            }\n          ]\n        }\n      }\n    ]\n  }\n]"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// If the catalog association model is not valid.\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// If entry does not exist.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}