---
title: Returns an id
slug: api-documentation/c31f-returns-an-id
docTags: 
createdAt: 2026-08-27T16:58:51.938Z
---

{
  "id": "M79m4oCXIcCVlJW_aGpPT",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/pim/batch/product-variant/export",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/pim/batch/product-variant/export"
      }
    ],
    "name": "Returns an id",
    "description": "<p>This endpoint prepares a file containing product/variants based upon given input.</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": "200",
        "description": "Product item batch export id returned.",
        "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": "T2VqZGXVGuAptZYNFWhdl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/pim/batch/product-variant/export \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'file=\"object\"'"
        },
        {
          "id": "PHtqM0xv5TqPC1jeFvbO9",
          "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-variant/export\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "zbR-bDTx42jGQieDeulF7",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/pim/batch/product-variant/export\")\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": "3OQ-WJQEIwYM9VQvNkVrK",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.upstartcommerce.com/pim/batch/product-variant/export\"\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": "T2VqZGXVGuAptZYNFWhdl"
    },
    "results": {
      "languages": [
        {
          "id": "JBQEq-ovwVDlsw2BcgChg",
          "language": "200",
          "code": "// Product item batch export id returned.\n{\n  \"id\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "JBQEq-ovwVDlsw2BcgChg"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}