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

{
  "id": "dSCRt8EBTjktZSVKfCZVM",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/pim/batch/attribute-group/import",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/batch/attribute-group/import"
      }
    ],
    "name": "Creates a new pim batch-import record that contains multiple attribute groups.",
    "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 attribute group 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": "cJEXKN98QdWMZCGJnzGq4",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/pim/batch/attribute-group/import \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'file=\"object\"'"
        },
        {
          "id": "2QwJIVuCK-Li5FgtJRg8b",
          "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/attribute-group/import\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "R2p4Ig1CxQzUW3Xg_Bph7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/batch/attribute-group/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": "NMzQp8kHVqIVRTK7-S7Su",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.upstartcommerce.com/pim/batch/attribute-group/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": "cJEXKN98QdWMZCGJnzGq4"
    },
    "results": {
      "languages": [
        {
          "id": "WrjHXXNovDfcUk8WArlm3",
          "language": "201",
          "code": "// Pim attribute group batch file added successfully.\n{\n  \"id\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "WrjHXXNovDfcUk8WArlm3"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}