v54

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-01594762.7 KB
Inventory

Update inventory quantity by SKU and warehouse

Updates inventory with a SKU count and availability for a given warehouse. You can do it in two ways:

  • Define a quantity: Indicate a specific number of items of a SKU from a warehouse, and it will decrease whenever an item is sold. When the last item is sold, the SKU will run out of stock.

  • Set an unlimited inventory: Always have items of a SKU from a warehouse considered available for sales. When this configuration is active, the SKU never runs out of stock.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources 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:

ProductCategoryResource
LogisticsLogistics accessLogistics full access
LogisticsLogistics accessLogistics inventory full access

You can create a custom role with that resource or use one of the following predefined roles:

RoleResource
Logistics - Full accessLogistics full access
OMS - Full accessLogistics full access
Logistics - Full accessLogistics inventory full access
OMS - Full accessLogistics inventory full access

❗ Assigning a predefined role to users or application keys usually grants permission to multiple License Manager resources. If some of these permissions are not necessary, consider creating a custom role instead. For more information regarding security, see Best practices for using application keys. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication.

patch/api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}/quantity

Path parameters

skuIdstring required
Example:25

Unique identifier of the SKU you wish to update.

warehouseIdstring required
Example:storeWarehouse

Unique identifier of the warehouse of the SKU you wish to update.

Headers

Content-Typestring required
Example:application/json

Type of the content being sent.

Acceptstring required
Example:application/json

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

quantityinteger required

Number of items you wish to update in your inventory for a SKU from a given warehouse.

Note that sending the field unlimitedQuantity as true overrules the quantity.

unlimitedQuantityboolean required

When set as false, every sold unit decreases the item's available quantity. When set as true, the SKU from the warehouse is always available for sale. No matter how many units are sold, the SKU available quantity never decreases, and the SKU is never out of stock.

Note that sending this field as true overrules the quantity.

dateUtcOnBalanceSystemstring

Defines the date and time of the warehouse when the SKU was updated. This can be useful for liberating handling order reservations, for example.

The format is ISO 8601 time zone offset format, as in YYYY-MM-DDThh:mm:ss.ssZ. When the value is null or empty, the default will be the date and time of the when the request being made.

Example request

{
  "quantity": 201,
  "dateUtcOnBalanceSystem": "2024-01-31T19:12:01.025662+00:00"
}

Response

No Content