---
title: Posts the catalog entry warehouse inventory.
slug: commerce-connect-15/service-api/NV4M-posts-the-catalog-entry-warehouse-inventory
docTags: 
createdAt: 2026-10-09T17:33:32.660Z
---

{
  "id": "y2RxssMcgTJqO0Sh2TXgg",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/episerverapi/commerce/entries/{entryCode}/inventories",
    "servers": [],
    "name": "Posts the catalog entry warehouse inventory.",
    "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 warehouse inventory.",
          "customType": "WarehouseInventory",
          "schema": [
            {
              "name": "catalogEntryCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Gets the catalog entry key."
            },
            {
              "name": "warehouseCode",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Represents the unique warehouse code."
            },
            {
              "name": "warehouseLink",
              "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."
                    }
                  ]
                }
              ]
            },
            {
              "name": "inStockQuantity",
              "kind": "optional",
              "type": "number<double>",
              "description": "<p>Represents the inventory's in-stock quantity.</p>",
              "format": "double"
            },
            {
              "name": "reservedQuantity",
              "kind": "optional",
              "type": "number<double>",
              "description": "Represents the inventory's reserved quantity.",
              "format": "double"
            },
            {
              "name": "reorderMinQuantity",
              "kind": "optional",
              "type": "number<double>",
              "description": "<p>Represents the inventory's minimum re-order quantity.</p>",
              "format": "double"
            },
            {
              "name": "preorderQuantity",
              "kind": "optional",
              "type": "number<double>",
              "description": "<p>Represents the inventory's pre-order quantity.</p>",
              "format": "double"
            },
            {
              "name": "backorderQuantity",
              "kind": "optional",
              "type": "number<double>",
              "description": "Represents the inventory's backorder quantity.",
              "format": "double"
            },
            {
              "name": "allowBackorder",
              "kind": "optional",
              "type": "boolean",
              "description": "Represents whether to allow backorders."
            },
            {
              "name": "allowPreorder",
              "kind": "optional",
              "type": "boolean",
              "description": "<p>Represents whether to allow pre-orders.</p>"
            },
            {
              "name": "inventoryStatus",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Indicates whether or not current inventory amount is used in determining if an order can be completed."
            },
            {
              "name": "preorderAvailabilityDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "<p>Represents the availability date for the inventory's pre-orders.</p>",
              "format": "date-time"
            },
            {
              "name": "backorderAvailabilityDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "Represents the availability date for the inventory's backorders.",
              "format": "date-time"
            },
            {
              "name": "purchaseAvailableDate",
              "kind": "optional",
              "type": "string<date-time>",
              "nullable": true,
              "description": "Represents the availability date for the inventory's purchase.",
              "format": "date-time"
            }
          ],
          "modelRef": "#/components/schemas/WarehouseInventory",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The warehouse inventory is saved.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "WarehouseInventory",
            "schema": [
              {
                "name": "catalogEntryCode",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets the catalog entry key."
              },
              {
                "name": "warehouseCode",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Represents the unique warehouse code."
              },
              {
                "name": "warehouseLink",
                "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."
                      }
                    ]
                  }
                ]
              },
              {
                "name": "inStockQuantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "<p>Represents the inventory's in-stock quantity.</p>",
                "format": "double"
              },
              {
                "name": "reservedQuantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "Represents the inventory's reserved quantity.",
                "format": "double"
              },
              {
                "name": "reorderMinQuantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "<p>Represents the inventory's minimum re-order quantity.</p>",
                "format": "double"
              },
              {
                "name": "preorderQuantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "<p>Represents the inventory's pre-order quantity.</p>",
                "format": "double"
              },
              {
                "name": "backorderQuantity",
                "kind": "optional",
                "type": "number<double>",
                "description": "Represents the inventory's backorder quantity.",
                "format": "double"
              },
              {
                "name": "allowBackorder",
                "kind": "optional",
                "type": "boolean",
                "description": "Represents whether to allow backorders."
              },
              {
                "name": "allowPreorder",
                "kind": "optional",
                "type": "boolean",
                "description": "<p>Represents whether to allow pre-orders.</p>"
              },
              {
                "name": "inventoryStatus",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Indicates whether or not current inventory amount is used in determining if an order can be completed."
              },
              {
                "name": "preorderAvailabilityDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "<p>Represents the availability date for the inventory's pre-orders.</p>",
                "format": "date-time"
              },
              {
                "name": "backorderAvailabilityDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "Represents the availability date for the inventory's backorders.",
                "format": "date-time"
              },
              {
                "name": "purchaseAvailableDate",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "Represents the availability date for the inventory's purchase.",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/WarehouseInventory",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "If the catalog entry warehouse inventory 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": "a9eNk0X56yQ7d1kqaVdBv",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /episerverapi/commerce/entries/{entryCode}/inventories \\\n     --header 'accept: text/plain'"
        },
        {
          "id": "ie555K8hTk6eGBA9so_kX",
          "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}/inventories\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ZA3ZiRc_u9CyjWXVcYc5W",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/episerverapi/commerce/entries/{entryCode}/inventories\")\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": "VtVIEqGHz3gq_c5jhpY4m",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/episerverapi/commerce/entries/{entryCode}/inventories\"\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": "a9eNk0X56yQ7d1kqaVdBv"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The warehouse inventory is saved.\n{\n  \"catalogEntryCode\": \"\",\n  \"warehouseCode\": \"\",\n  \"warehouseLink\": {\n    \"title\": \"\",\n    \"type\": \"\",\n    \"href\": \"\",\n    \"properties\": [\n      {\n        \"name\": \"\",\n        \"value\": \"\"\n      }\n    ]\n  },\n  \"inStockQuantity\": \"\",\n  \"reservedQuantity\": \"\",\n  \"reorderMinQuantity\": \"\",\n  \"preorderQuantity\": \"\",\n  \"backorderQuantity\": \"\",\n  \"allowBackorder\": false,\n  \"allowPreorder\": false,\n  \"inventoryStatus\": \"\",\n  \"preorderAvailabilityDate\": \"\",\n  \"backorderAvailabilityDate\": \"\",\n  \"purchaseAvailableDate\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// If the catalog entry warehouse inventory 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": ""
    }
  ]
}