---
title: Returns the export of the current site as a episerverdata file.
slug: commerce-connect-15/service-api/returns-the-export-of-the-current-site-as-a-episerverdata-file
docTags: 
createdAt: 2026-08-28T14:35:19.222Z
---

{
  "id": "Zx4I3hVZLuPi3qC_Y_ma9",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:64424/episerverapi/commerce/export/site/{siteName}",
    "servers": [
      {
        "url": "http://localhost:64424/episerverapi/commerce/export/site/{siteName}"
      },
      {
        "url": "https://localhost:64424/episerverapi/commerce/export/site/{siteName}"
      }
    ],
    "name": "Returns the export of the current site as a episerverdata file.",
    "description": "Depends on receiving the OAuth security token to validate the session.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "siteName",
          "type": "string",
          "description": "The name of the site to be exported."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The file containing the exported site.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "If error when creating the export file.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "97EF2ocZVcXJITNxOEq-o",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url http://localhost:64424/episerverapi/commerce/export/site/{siteName} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "CM3ABVz3M4JEE_0_zE3TV",
          "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:64424/episerverapi/commerce/export/site/{siteName}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "shS0EmB0tNQQ3HqRFxh7O",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:64424/episerverapi/commerce/export/site/{siteName}\")\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": "Z5YCuXToyjA0te6sp7tzk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:64424/episerverapi/commerce/export/site/{siteName}\"\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": "97EF2ocZVcXJITNxOEq-o"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The file containing the exported site.\n{}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        },
        {
          "id": "response-2-500",
          "language": "500",
          "code": "// If error when creating the export file.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}