---
title: "Create batch inventory job"
method: POST
path: "/availability/v1/inventory/batch"
tags: ["Batch operations"]
---

# Create batch inventory job

`POST /availability/v1/inventory/batch`

Creates a new batch inventory job and returns a pre-signed URL for uploading the CSV file. The batch will be in `AWAITING_UPLOAD` status until the CSV is uploaded and committed.

>ℹ️ This feature is in early access, which means that we are working to improve it. If you want to use this feature, please contact our [Support Center](https://support.vtex.com/hc/en-us/requests).

This endpoint is part of the Batch operations section for high-throughput [inventory updates](https://help.vtex.com/en/docs/tutorials/updating-the-quantity-of-items-in-inventory). Learn more about [inventory management at VTEX](https://help.vtex.com/en/docs/tutorials/managing-stock-items).

## Permissions

Any user or [API key](https://developers.vtex.com/docs/guides/authentication-overview#api-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise, they will receive a status code `403` error. These are the applicable resources for this endpoint:

| **Product** | **Category** | **Resource** |
| --------------- | ----------------- | ----------------- |
| Logistics | Logistics access | **Logistics - Full access** |

You can [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) with that resource or use one of the following [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy):

| **Role** | **Resource** |
| --------------- | ----------------- |
| Logistics - Full access | Logistics - Full access |
| OMS - Full access | Logistics - Full access |

>❗ Assigning a [predefined role](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) to users or API keys usually grants permission to multiple [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3). If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see [Best practices for using API keys](https://help.vtex.com/en/tutorial/best-practices-api-keys--7b6nD1VMHa49aI5brlOvJm).

To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-authentication).

## Headers

- `Accept` string, required

## Response `201`

Created

- object — Batch inventory job details.
  - `batchId` string, uuid, required — Unique identifier for the batch inventory job. This value must be used as the name of the CSV file.
  - `status` 'AWAITING_UPLOAD', required — Initial status of the batch.
  - `upload` object, required — Pre-signed upload details for uploading the CSV file to S3.
    - `method` 'PUT', required — HTTP method to use for the upload.
    - `url` string, uri, required — Pre-signed S3 URL for uploading the CSV file.
    - `headers` object, required — Required headers for the upload request.
      - `Content-Type` 'text/csv', required — Content type for the upload. Must be `text/csv`.
    - `expiresAt` string, date-time, required — URL expiration timestamp. The pre-signed URL is valid for 30 minutes from the time it is returned.

## Other responses

- `400` — Bad Request Invalid request or missing required path parameter.
- `401` — Unauthorized Missing or invalid authentication.
- `403` — Forbidden Insufficient permissions or feature not enabled for the account.
- `500` — Internal Server Error Unexpected error occurred while creating the batch.

---

[API](https://skmtc.net/vtex/apis/logistics-api.md) · [All operations](https://skmtc.net/vtex/apis/logistics-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vtex/logistics-api/revisions/c08af805d8b3/schema)
