---
search:
  tags:
    - Variants
    - PUT
seo:
  description: >-
    Creates or updates the… Reference for the PUT
    /api/v1/{team_slug}/{app_slug}/products/{product_id}/variants/{variant_id}/stock
    endpoint in the Management API.
sidebar:
  label: Set variant warehouse stock
  badge: PUT
title: Set variant warehouse stock
type: openapi-operation
---
Creates or updates the stock quantity for a variant in a specific warehouse. If the stock record exists, it will be updated; otherwise, a new record will be created.

`PUT /api/v1/{team_slug}/{app_slug}/products/{product_id}/variants/{variant_id}/stock`

**Request body** (`application/json`, required)

Variant stock data

- `inventory_date` (string) — ISO 8601 date format with time zone e.g. 2024-12-12T09:13:31.039Z.
- `quantity` (integer)
- `warehouse_slug` (string, required)

Request body example:

```json
{
  "inventory_date": "string",
  "quantity": 0,
  "warehouse_slug": "string"
}
```

**Responses**

- `200` — Warehouse stock for variant created or updated successfully
- `400` — Invalid request (e.g. bad UUID, validation error)
- `401` — Unauthorized access
- `500` — Internal server error

Response example, 200:

```json
{
  "data": {
    "available_online": true,
    "created_at": "string",
    "id": "string",
    "inventory_date": "string",
    "quantity": 0,
    "updated_at": "string",
    "warehouse_name": "string",
    "warehouse_slug": "string"
  },
  "details": [
    "string"
  ],
  "success": true
}
```
