---
title: Creates new attribute against the batch file.
slug: api-documentation/creates-new-attribute-against-the-batch-file
docTags: 
createdAt: 2026-08-27T16:58:51.938Z
---

{
  "id": "h4jzxW5u2xG0eqQBqaWAt",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/pim/batch/attributes/import",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/batch/attributes/import"
      }
    ],
    "name": "Creates new attribute against the batch file.",
    "description": "This endpoint enables administrators to create a new attributes through batch file.",
    "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": "Attribute 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": "ReNtFdMYx67ojnoYg5x6i",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/pim/batch/attributes/import \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'file=\"object\"'"
        },
        {
          "id": "8FpLLZMUmGqOO3u7KcpVs",
          "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/attributes/import\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "uOXK1-tZ1B6iBuqYhkycb",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/batch/attributes/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": "j0mAf60KeTzT0Tn47UIKD",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.upstartcommerce.com/pim/batch/attributes/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": "ReNtFdMYx67ojnoYg5x6i"
    },
    "results": {
      "languages": [
        {
          "id": "-OwBwEP9lzaXBjTgz72Kw",
          "language": "201",
          "code": "// Attribute Batch file added successfully.\n{\n  \"id\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "-OwBwEP9lzaXBjTgz72Kw"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}