---
title: Sends part of file for the given upload identifier. If no upload identifier is given then it will create a new upload id. Use the offset to tell where the part of the total file starts.
slug: commerce-connect-15/service-api/8nAm-sends-part-of-file-for-the-given-upload-identifier-if-no-upload-identifier-is-given-then-it-will-create-a-new-upload-id-use-the-offset-to-tell-where-the-part-of-the-total-file-starts
docTags: 
createdAt: 2026-10-09T17:33:31.176Z
---

{
  "id": "fhZ2bZrutX0b78kUVTher",
  "type": "api-oas-v2",
  "data": {
    "method": "PUT",
    "url": "/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}",
    "servers": [],
    "name": "Sends part of file for the given upload identifier. If no upload identifier is given then it will create a new upload id. Use the offset to tell where the part of the total file starts.",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "uploadId",
          "type": "string<uuid>",
          "description": "The upload identifier.",
          "format": "uuid"
        },
        {
          "kind": "required",
          "name": "offset",
          "type": "integer<int32>",
          "description": "The offset.",
          "default": 0,
          "format": "int32"
        }
      ],
      "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": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The file is uploaded.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UploadFile",
            "schema": [
              {
                "name": "uploadId",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "Gets or sets the upload used for adding additional parts of the file.",
                "format": "uuid"
              },
              {
                "name": "offSet",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Gets or sets the offset of where the last byte was written to disk.  Add one additional byte to begin the next chunk.",
                "format": "int64"
              },
              {
                "name": "expires",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Gets or sets the time the upload will expire for all parts  The upload must complete with in 24 hours.",
                "format": "date-time"
              }
            ],
            "modelRef": "#/components/schemas/UploadFile",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "If user does not have enough permission for this request.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "l4lv3Bq_2A22iMsRL4nPG",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request PUT \\\n     --url /episerverapi/commerce/import/upload/chunk/{uploadId}/{offset} \\\n     --header 'accept: text/plain'"
        },
        {
          "id": "cEBQCWm0XN33xDxEsYuD6",
          "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: 'PUT',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Jdm6jR_fzhGG1VzTTAshu",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Put.new(url)\nrequest[\"accept\"] = \"text/plain\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "iHSrPDvhIRpbdhB1-OBOs",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/episerverapi/commerce/import/upload/chunk/{uploadId}/{offset}\"\n\npayload = {}\nheaders = {\n   'accept': 'text/plain',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "l4lv3Bq_2A22iMsRL4nPG"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The file is uploaded.\n{\n  \"uploadId\": \"\",\n  \"offSet\": \"\",\n  \"expires\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// If user does not have enough permission for this request.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}