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

{
  "id": "yWvUQi5qRxtD0q4XdcmI1",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:65349//api/episerver/v2.0/warehouse/{warehouseCode}",
    "servers": [
      {
        "url": "http://localhost:65349//api/episerver/v2.0/warehouse/{warehouseCode}"
      }
    ],
    "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",
            "text/json",
            "application/xml",
            "text/xml"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "WarehouseApiModel",
            "schema": [
              {
                "name": "Name",
                "kind": "optional",
                "type": "string",
                "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",
                "description": "Gets or sets the code value."
              },
              {
                "name": "ContactInformation",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/WarehouseContactInformationModel",
                "customType": "WarehouseContactInformationModel",
                "schema": [
                  {
                    "name": "FirstName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the contacts first name."
                  },
                  {
                    "name": "LastName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the contacts last name."
                  },
                  {
                    "name": "Organization",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the contacts organization name."
                  },
                  {
                    "name": "Line1",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the primary line of the contacts physical address."
                  },
                  {
                    "name": "Line2",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the secondary line of the contacts physical address."
                  },
                  {
                    "name": "City",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the city of the contacts physical address."
                  },
                  {
                    "name": "State",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the state of the contacts physical address."
                  },
                  {
                    "name": "CountryCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the country code of the contacts physical address."
                  },
                  {
                    "name": "CountryName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the country of the contacts physical address."
                  },
                  {
                    "name": "PostalCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the postal code of the contacts physical address."
                  },
                  {
                    "name": "RegionCode",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the region code of the contacts physical address."
                  },
                  {
                    "name": "RegionName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the region name of the contacts physical address."
                  },
                  {
                    "name": "DaytimePhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Gets or sets the phone number at which the contact can be reached during regular work hours."
                  },
                  {
                    "name": "EveningPhoneNumber",
                    "kind": "optional",
                    "type": "string",
                    "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",
                    "description": "Gets or sets the phone number at which the contact can be reached by fax."
                  },
                  {
                    "name": "Email",
                    "kind": "optional",
                    "type": "string",
                    "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/WarehouseApiModel",
            "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": "PWGBqkqnOSGv-ijRTwllf",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:65349//api/episerver/v2.0/warehouse/{warehouseCode} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "bSkS_WwdtHpheLsagmLcO",
          "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(\"http://localhost:65349//api/episerver/v2.0/warehouse/{warehouseCode}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "nTXvh7Ob5t7js3hGSq7jr",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:65349//api/episerver/v2.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": "kQuzj886at1Wkc4We40MX",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:65349//api/episerver/v2.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": "PWGBqkqnOSGv-ijRTwllf"
    },
    "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": ""
    }
  ]
}