---
title: Gets warehouse by code.
slug: cms-12/api/gets-warehouse-by-code
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "84nNvzR1wkokY4BiCSEtG",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/episerver/v3.0/warehouse/{warehouseCode}",
    "servers": [],
    "name": "Gets warehouse by code.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "warehouseCode",
          "type": "string",
          "description": "The warehouse code."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/problem+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "warehouse",
            "schema": [
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets or sets the warehouse name."
              },
              {
                "name": "modified",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Gets or sets the timestamp at which the warehouse record was most recently updated.",
                "format": "date-time"
              },
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Gets or sets the code value."
              },
              {
                "name": "contactInformation",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/warehouseContactInformation",
                "customType": "warehouseContactInformation",
                "schema": [
                  {
                    "name": "firstName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the contacts first name."
                  },
                  {
                    "name": "lastName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the contacts last name."
                  },
                  {
                    "name": "organization",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the contacts organization name."
                  },
                  {
                    "name": "line1",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the primary line of the contacts physical address."
                  },
                  {
                    "name": "line2",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the secondary line of the contacts physical address."
                  },
                  {
                    "name": "city",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the city of the contacts physical address."
                  },
                  {
                    "name": "state",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the state of the contacts physical address."
                  },
                  {
                    "name": "countryCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the country code of the contacts physical address."
                  },
                  {
                    "name": "countryName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the country of the contacts physical address."
                  },
                  {
                    "name": "postalCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the postal code of the contacts physical address."
                  },
                  {
                    "name": "regionCode",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the region code of the contacts physical address."
                  },
                  {
                    "name": "regionName",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the region name of the contacts physical address."
                  },
                  {
                    "name": "daytimePhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the phone number at which the contact can be reached during regular work hours."
                  },
                  {
                    "name": "eveningPhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the phone number at which the contact can be reached outside of regular work hours."
                  },
                  {
                    "name": "faxNumber",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the phone number at which the contact can be reached by fax."
                  },
                  {
                    "name": "email",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "Gets or sets the contacts email address."
                  }
                ]
              },
              {
                "name": "isFulfillmentCenter",
                "kind": "optional",
                "type": "boolean",
                "description": "Indicates whether the warehouse is a fulfillment center. This means orders can be placed from this warehouse for outgoing shipments."
              },
              {
                "name": "isPickupLocation",
                "kind": "optional",
                "type": "boolean",
                "description": "<p>Indicates whether the warehouse is a pick-up location. This means orders can be placed from this warehouse for in-store pickups.</p>"
              },
              {
                "name": "isDeliveryLocation",
                "kind": "optional",
                "type": "boolean",
                "description": "<p>Indicates whether the warehouse is a delivery location. This means this warehouse can be used as a delivery location (i.e. for future in-store pickups).</p>"
              }
            ],
            "modelRef": "#/components/schemas/warehouse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "DVmC8J0N2wTEL87Vd1ecL",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /api/episerver/v3.0/warehouse/{warehouseCode} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "XfC29h_xz6Xv7fm_JKDax",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/api/episerver/v3.0/warehouse/{warehouseCode}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "PQu_GDuTXXPtEdMLGkY1h",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/episerver/v3.0/warehouse/{warehouseCode}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "RPuWEXClEBstOH4WzDwpk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/episerver/v3.0/warehouse/{warehouseCode}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DVmC8J0N2wTEL87Vd1ecL"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"name\": \"\",\n  \"modified\": \"\",\n  \"code\": \"\",\n  \"contactInformation\": {\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  },\n  \"isFulfillmentCenter\": false,\n  \"isPickupLocation\": false,\n  \"isDeliveryLocation\": false\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not Found\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}