---
title: Creates a new pim batch-import record that contains multiple product templates.
slug: api-documentation/creates-a-new-pim-batch-import-record-that-contains-multiple-product-templates
docTags: 
createdAt: 2026-08-27T16:58:51.938Z
---

{
  "id": "qwXqn_-nuC5lkS8YQtKK9",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/pim/batch/product-template/import",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/batch/product-template/import"
      }
    ],
    "name": "Creates a new pim batch-import record that contains multiple product templates.",
    "description": "<p>Create a new PIM attribute group batch-import</p>",
    "contentType": "multipart/form-data",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "file",
          "kind": "optional",
          "type": "object",
          "description": "",
          "modelRef": "pim-spec-file.yaml#/components/schemas/BinaryImportFile",
          "customType": "BinaryImportFile",
          "schema": []
        }
      ],
      "oAuthParameters": [
        {
          "id": "NoChannelPortalAccess",
          "name": "NoChannelPortalAccess",
          "kind": "optional",
          "type": "http",
          "description": "<p>(DEPRECATED) This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "scheme": "bearer"
        },
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Pim product template batch file added successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string<uuid>",
                "description": "",
                "format": "uuid"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "VqOrEK-2PJBFMbc2u9-pk",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/pim/batch/product-template/import \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'file=\"object\"'"
        },
        {
          "id": "IFk-YPgxfiKbiSo-vwO0N",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"multipart/form-data\");\n\nvar formdata = new FormData();\nformdata.append(\"file\", \"object\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/pim/batch/product-template/import\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "YFc81Z1sdkfcF3D2-ktpy",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/batch/product-template/import\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"multipart/form-data\"\nform_data = [['file', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "eiCxMcsY2S9ZTn9MBzayp",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.upstartcommerce.com/pim/batch/product-template/import\"\n\npayload = {}\nfiles=[\n\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'multipart/form-data'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "VqOrEK-2PJBFMbc2u9-pk"
    },
    "results": {
      "languages": [
        {
          "id": "aQrIF2fJ3Q2PGjV4totPm",
          "language": "201",
          "code": "// Pim product template batch file added successfully.\n{\n  \"id\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "aQrIF2fJ3Q2PGjV4totPm"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}