---
title: Warehouse management
slug: merchant-api/warehouse-management
createdAt: 2021-10-07T14:05:38.000Z
---

# Definition

A `warehouse` is an additional container for stock information per SKU. There are two types of warehouse:

- **Marketplace fulfillment warehouses** : they represent an actual warehouse of a given Marketplace. They are used for offers fulfilled by that Marketplace, to provide read-only information about stock.
  Notable examples are FBA (Fulfilled by Amazon) or ZFS (Zalando fulfillment solution) warehouses.

- **Merchant warehouses:&#x20;**&#x74;hey provide an additional storage for an alternative `item quantity`, which can in turn be associated to a Marketplace publication rule via the Neteven interface. Unlike Marketplace fulfillment warehouses, these are generally only abstract containers that the target Marketplace will never know of, and exist purely to split stock allocation per channel / geographic zone, etc.&#x20;



:::hint{type="info"}
Not every SKU have to be associated to a warehouse. You should only create warehouses and send stock on relevant products.
:::



::Image[]{src="https://api.archbee.com/api/optimize/7xG96uWcwi8JQtnnQcieR/-yiSJqT1XgkorK6PhtTTU_image.png" size="66" width="518" height="534" position="flex-start" showCaption="false"}



:::hint{type="success"}
The standard `item quantity` exists outside of warehouses and has no direct relationship to them. Therefore, there is no need to create warehouses to send quantity updates on any SKU.
:::

# Endpoints

### Create a new warehouse

| `POST`             | `/merchant/warehouses`                                                                                                                                                           |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**    | create a single merchant warehouse, to be used in `PATCH /merchant/items/stocks` and configured as a stock location point for any Marketplace within the Neteven user interface. |
| **Required scope** | `warehouse_manager`                                                                                                                                                              |
| **Returns**        | the `warehouse_id` of the warehouse created, to be stored and used in subsequent stock updates.                                                                                  |

**example:&#x20;**

:::CodeblockTabs
Create a new warehouse

```curl
curl --request POST \
  --url https://api.neteven.com/v1/merchant/warehouses \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer $MYTOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"name": "MyNewWarehouse"}'
```

201 Created response

```javascript
{
  "data": {
    "warehouse": {
      "status": {
        "message": "Created",
        "code": 201,
        "title": "OK"
      },
      "warehouse_id": 589
    }
  },
  "metadata": {
    "api_version": 1,
    "api_version_expiration_date": "2022-12-31",
    "number_of_results": 1
  }
}
```
:::



***

### Get existing warehouses

| `GET`              | `/merchant/warehouses`                                                                                                                                      |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description**    | Displays both Marketplace and Merchant warehouses, depending on what exists on your account and if you are connected to a Marketplace fulfillment solution. |
| **Required scope** | `warehouse_reader`                                                                                                                                          |
| **Returns**        | array of `warehouse` objects.                                                                                                                               |

**example:**

:::CodeblockTabs
Get warehouses

```curl
curl --request GET \
  --url https://api.neteven.com/v1/merchant/warehouses \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer $MYTOKEN' \
  --header 'Content-Type: application/json' \
```

200 Response

```json
{
  "data": {
    "warehouses": [
      {
        "name": "FBA",
        "marketplaces": [7, 20, 22],
        "id": "513"
      },
      {
        "name": "MyNewWarehouse",
        "id": "589"
      }
    ]
  },
  "metadata": {
    "number_of_results": 2,
    "api_version": 1,
    "api_version_expiration_date": "2022-12-31"
  }
}
```
:::



***

# API reference

*more information on parameters, responses and content in the&#x20;*[API Reference](docId\:yWeBKEf7Kqp3agiK6LtoJ)&#x20;
