Get an address to upload an import file

​

Makes a slot for one import file, so a large file goes straight to storage and not through the API. The response carries a temporary uploadUrl: send the file there with a PUT and the exact headers returned, then call POST /v1/inventory/bulk/import/uploads/{uploadId}/start.

The address writes one file only, cannot read or list anything, accepts only the declared type and size, and stops working after 15 minutes. Files up to 256 MiB are accepted, compressed or not.

Requires the inventory:write scope.

Body

required
application/json
  • The exact size of the file in bytes, up to 268,435,456 (256 MiB). The upload is refused if the body differs.

  • The type the upload will send: text/csv, application/json or application/gzip.

  • A label for the upload. It does not change how the file is read.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/inventory/bulk/import/uploads
curl https://public-api.cardnexus.com/v1/inventory/bulk/import/uploads \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "contentType": "text/csv",
  "sizeBytes": 1,
  "fileName": ""
}'
{
  "uploadId": "0b6f6f1e-7c3a-4f55-9d0e-2a9c1d8b4e77",
  "uploadUrl": "https://cardnexus-files.s3.eu-west-1.amazonaws.com/inventory-bulk-jobs/665f3a2b1c8d4e9f7a6b5c4d/uploads/0b6f6f1e-7c3a-4f55-9d0e-2a9c1d8b4e77?X-Amz-Expires=900&X-Amz-Signature=3f1c...",
  "method": "PUT",
  "headers": {
    "Content-Type": "text/csv",
    "Content-Length": "4821733"
  },
  "expiresAt": "2026-10-22T10:15:00.000Z",
  "maxBytes": 268435456
}