---
search:
  tags:
    - Variants V2
    - POST
seo:
  description: >-
    Bulk-applies a delta on top of the… Reference for the POST
    /api/v2/{team_slug}/{app_slug}/products/variants/stock/diff endpoint in the
    Management API v2.
sidebar:
  label: Diff variants stock
  badge: POST
title: Diff variants stock
type: openapi-operation
---
Bulk-applies a delta on top of the current variant warehouse stock quantity.

`POST /api/v2/{team_slug}/{app_slug}/products/variants/stock/diff`

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

- `stock` (VariantStockDiffItem[], required)

Request body example:

```json
{
  "stock": [
    {
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
      "warehouse_id": "825f5f2b-307c-4cc1-9373-6d0c4692d478",
      "diff": 0
    }
  ]
}
```

**Responses**

- `200` — OK (partial success possible)
- `400` — Request-level failure
- `401` — Request-level failure
- `403` — Request-level failure
- `500` — Request-level failure

Response example, 200:

```json
{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "variant_name": "string",
      "variant_number": "string",
      "status": "string",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "variant_group_id": "165b9130-4dfe-4a17-99a4-9e5031dcac26",
      "validate_stock": true,
      "purchase_price": {
        "currency": "string",
        "value_cents": 0
      },
      "variant_dimensions": {
        "width": 0,
        "height": 0,
        "length": 0,
        "depth": 0,
        "weight": 0,
        "diameter": 0,
        "capacity_milliliter": 0
      },
      "custom_fields": {
        "property1": "string",
        "property2": "string"
      },
      "shipping_attributes": [
        "string"
      ],
      "warehouse_stock": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
          "warehouse_id": "825f5f2b-307c-4cc1-9373-6d0c4692d478",
          "warehouse_name": "string",
          "warehouse_slug": "string",
          "quantity": 0,
          "inventory_date": "2019-08-24T14:15:22Z",
          "available_online": true,
          "created_at": "2019-08-24T14:15:22Z",
          "updated_at": "2019-08-24T14:15:22Z"
        }
      ],
      "images": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "url": "string",
          "title": "string",
          "priority": 0
        }
      ],
      "videos": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "url": "string",
          "title": "string"
        }
      ],
      "attributes": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "key": "string",
          "template_key": "string",
          "template_name": "string",
          "name": "string",
          "description": "string",
          "filterable": true,
          "translatable": true,
          "values": {
            "property1": "string",
            "property2": "string"
          }
        }
      ],
      "prices": [
        {
          "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6",
          "store_group_id": "6c760e36-a704-4b09-93bb-c191a46ca67f",
          "market_id": "6364d859-8e1b-477a-bacc-de8305a9292b",
          "amount_cents_with_tax": 0,
          "sale_price_cents_with_tax": 0,
          "reference_price_cents_with_tax": 0,
          "on_sale": true,
          "status": "active",
          "sale_start_timestamp": "2019-08-24T14:15:22Z",
          "sale_end_timestamp": "2019-08-24T14:15:22Z"
        }
      ],
      "listings": {
        "smart": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "slug": "string"
          }
        ],
        "static": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "slug": "string"
          }
        ]
      },
      "translations": {
        "name": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "locale": "string",
            "value": "string"
          }
        ]
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "errors": [
    {
      "variant_number": "string",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "message": "string"
    }
  ]
}
```
