# 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                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers-v3.zortout.com/api-reference/warehouse.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
