> For the complete documentation index, see [llms.txt](https://developers-v3.zortout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers-v3.zortout.com/api-reference/warehouse.md).

# Warehouse

## Get Warehouses

<mark style="color:blue;">`GET`</mark> `https://api.zortout.com/api.aspx`

Get list of warehouses/branches.

#### Query Parameters

| Name                                      | Type   | Description                 |
| ----------------------------------------- | ------ | --------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETWAREHOUSES”             |
| format                                    | String | json (Default), xml         |
| version<mark style="color:red;">\*</mark> | String | 3                           |
| page                                      | Int    | Page (Default = 1)          |
| limit                                     | Int    | Limit per page (Max = 2000) |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Warehouse (Array) | Type   | Description/Example |
| ----------------- | ------ | ------------------- |
| id                | Int    | Warehouse ID        |
| name              | String | Warehouse Name      |
| code              | String | Warehouse Code      |
| address           | String | Warehouse Addressr  |

| Parameter | Type              | Description/Example                   |
| --------- | ----------------- | ------------------------------------- |
| res       | Response          | <p>Response Code <br>200- Success</p> |
| list      | Warehouse (Array) | Warehouse List(Array)                 |
| count     | Int               | Total warehouse number by filter      |

## Add Warehouse

<mark style="color:green;">`POST`</mark> `https://api.zortout.com/api.aspx`

Add warehouse/branch.

#### Query Parameters

| Name                                      | Type   | Description         |
| ----------------------------------------- | ------ | ------------------- |
| method<mark style="color:red;">\*</mark>  | String | “ADDWAREHOUSE”      |
| format                                    | String | json (Default), xml |
| version<mark style="color:red;">\*</mark> | String | 3                   |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| storename<mark style="color:red;">\*</mark> | String | Store Name  |
| apikey<mark style="color:red;">\*</mark>    | String | API Key     |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret  |

#### Request Body

| Name                                   | Type   | Description       |
| -------------------------------------- | ------ | ----------------- |
| code<mark style="color:red;">\*</mark> | String | Warehouse Code    |
| name<mark style="color:red;">\*</mark> | String | Warehouse Name    |
| address                                | String | Warehouse Address |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="Response" %}

{% endtab %}

{% tab title="Ex. URL" %}
URL :  <https://api.zortout.com/api.aspx?method=ADDWAREHOUSE&version=3>
{% endtab %}

{% tab title="Ex. Request JSON" %}

```
{
  "code": "W0001",
  "name": "Warehouse1"
}
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

| Parameter | Type   | Description/Example                   |
| --------- | ------ | ------------------------------------- |
| resCode   | String | <p>Response Code <br>200- Success</p> |
| resDesc   | String | Response Description                  |
