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

{
  "id": "SxgSZNA3madrQ91dyEdXg",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://localhost:64424/episerverapi/commerce/warehouses",
    "servers": [
      {
        "url": "http://localhost:64424/episerverapi/commerce/warehouses"
      },
      {
        "url": "https://localhost:64424/episerverapi/commerce/warehouses"
      }
    ],
    "name": "Posts the warehouse.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The warehouse.",
          "customType": "EPiServer.ServiceApi.Commerce.Models.Catalog.Warehouse",
          "schema": [
            {
              "name": "Name",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the name."
            },
            {
              "name": "IsActive",
              "kind": "optional",
              "type": "boolean",
              "description": "Gets or sets a value indicating whether this instance is active."
            },
            {
              "name": "IsPrimary",
              "kind": "optional",
              "type": "boolean",
              "description": "Gets or sets a value indicating whether this instance is primary."
            },
            {
              "name": "SortOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the sort order.",
              "format": "int32"
            },
            {
              "name": "Code",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the code."
            },
            {
              "name": "FulfillmentPriorityOrder",
              "kind": "optional",
              "type": "integer<int32>",
              "description": "Gets or sets the fulfillment priority order.",
              "format": "int32"
            },
            {
              "name": "IsFulfillmentCenter",
              "kind": "optional",
              "type": "boolean",
              "description": "Gets or sets a value indicating whether this instance is fulfillment center."
            },
            {
              "name": "IsPickupLocation",
              "kind": "optional",
              "type": "boolean",
              "description": "Gets or sets a value indicating whether this instance is pickup location."
            },
            {
              "name": "IsDeliveryLocation",
              "kind": "optional",
              "type": "boolean",
              "description": "Gets or sets a value indicating whether this instance is delivery location."
            },
            {
              "name": "FirstName",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the first name."
            },
            {
              "name": "LastName",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the last name."
            },
            {
              "name": "Organization",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the organization."
            },
            {
              "name": "Line1",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the line1."
            },
            {
              "name": "Line2",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the line2."
            },
            {
              "name": "City",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the city."
            },
            {
              "name": "State",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the state."
            },
            {
              "name": "CountryCode",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the country code."
            },
            {
              "name": "CountryName",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the name of the country."
            },
            {
              "name": "PostalCode",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the postal code."
            },
            {
              "name": "RegionCode",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the region code."
            },
            {
              "name": "RegionName",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the name of the region."
            },
            {
              "name": "DaytimePhoneNumber",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the daytime phone number."
            },
            {
              "name": "EveningPhoneNumber",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the evening phone number."
            },
            {
              "name": "FaxNumber",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the fax number."
            },
            {
              "name": "Email",
              "kind": "optional",
              "type": "string",
              "description": "Gets or sets the email."
            }
          ],
          "modelRef": "#/components/schemas/EPiServer.ServiceApi.Commerce.Models.Catalog.Warehouse",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The warehouse is saved.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "EPiServer.ServiceApi.Commerce.Models.Catalog.Warehouse",
            "schema": [
              {
                "name": "Name",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the name."
              },
              {
                "name": "IsActive",
                "kind": "optional",
                "type": "boolean",
                "description": "Gets or sets a value indicating whether this instance is active."
              },
              {
                "name": "IsPrimary",
                "kind": "optional",
                "type": "boolean",
                "description": "Gets or sets a value indicating whether this instance is primary."
              },
              {
                "name": "SortOrder",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Gets or sets the sort order.",
                "format": "int32"
              },
              {
                "name": "Code",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the code."
              },
              {
                "name": "FulfillmentPriorityOrder",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Gets or sets the fulfillment priority order.",
                "format": "int32"
              },
              {
                "name": "IsFulfillmentCenter",
                "kind": "optional",
                "type": "boolean",
                "description": "Gets or sets a value indicating whether this instance is fulfillment center."
              },
              {
                "name": "IsPickupLocation",
                "kind": "optional",
                "type": "boolean",
                "description": "Gets or sets a value indicating whether this instance is pickup location."
              },
              {
                "name": "IsDeliveryLocation",
                "kind": "optional",
                "type": "boolean",
                "description": "Gets or sets a value indicating whether this instance is delivery location."
              },
              {
                "name": "FirstName",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the first name."
              },
              {
                "name": "LastName",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the last name."
              },
              {
                "name": "Organization",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the organization."
              },
              {
                "name": "Line1",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the line1."
              },
              {
                "name": "Line2",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the line2."
              },
              {
                "name": "City",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the city."
              },
              {
                "name": "State",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the state."
              },
              {
                "name": "CountryCode",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the country code."
              },
              {
                "name": "CountryName",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the name of the country."
              },
              {
                "name": "PostalCode",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the postal code."
              },
              {
                "name": "RegionCode",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the region code."
              },
              {
                "name": "RegionName",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the name of the region."
              },
              {
                "name": "DaytimePhoneNumber",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the daytime phone number."
              },
              {
                "name": "EveningPhoneNumber",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the evening phone number."
              },
              {
                "name": "FaxNumber",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the fax number."
              },
              {
                "name": "Email",
                "kind": "optional",
                "type": "string",
                "description": "Gets or sets the email."
              }
            ],
            "modelRef": "#/components/schemas/EPiServer.ServiceApi.Commerce.Models.Catalog.Warehouse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "If the warehouse model is not valid.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "MK1gS52m6uQybY4Xm0TaN",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url http://localhost:64424/episerverapi/commerce/warehouses \\\n     --header 'accept: application/json'"
        },
        {
          "id": "kNSOnlWvjUyzSRk_LNbQZ",
          "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: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:64424/episerverapi/commerce/warehouses\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "NFvyEOAQHKPn-5ZeibopV",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:64424/episerverapi/commerce/warehouses\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "1lnCULhY4RLISUEE4A9FB",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:64424/episerverapi/commerce/warehouses\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "MK1gS52m6uQybY4Xm0TaN"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The warehouse is saved.\n{\n  \"Name\": \"\",\n  \"IsActive\": false,\n  \"IsPrimary\": false,\n  \"SortOrder\": \"\",\n  \"Code\": \"\",\n  \"FulfillmentPriorityOrder\": \"\",\n  \"IsFulfillmentCenter\": false,\n  \"IsPickupLocation\": false,\n  \"IsDeliveryLocation\": false,\n  \"FirstName\": \"\",\n  \"LastName\": \"\",\n  \"Organization\": \"\",\n  \"Line1\": \"\",\n  \"Line2\": \"\",\n  \"City\": \"\",\n  \"State\": \"\",\n  \"CountryCode\": \"\",\n  \"CountryName\": \"\",\n  \"PostalCode\": \"\",\n  \"RegionCode\": \"\",\n  \"RegionName\": \"\",\n  \"DaytimePhoneNumber\": \"\",\n  \"EveningPhoneNumber\": \"\",\n  \"FaxNumber\": \"\",\n  \"Email\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// If the warehouse model is not valid.\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}