# Transfer

## Get Transfers

<mark style="color:blue;">`GET`</mark> `https://open-api.zortout.com/v4/Transfer/GetTransfers`

Get list of transfer.

#### Query Parameters

| Name               | Type   | Description                                                                                                               |
| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| transferdateafter  | String | <p>Transfer Date After .....<br>(yyyy-MM-dd)</p>                                                                          |
| transferdatebefore | String | <p>Transfer Date Before .....<br>(yyyy-MM-dd)</p>                                                                         |
| limit              | Int    | Limit per page (Max = 500)                                                                                                |
| page               | Int    | Page (Default = 1)                                                                                                        |
| transferType       | String | <p>Transfer Type</p><p>- Transfer</p><p>- Initial</p><p>- Adjust</p><p>- Assembly</p><p>- Disassembly</p><p>- Reserve</p> |
| keyword            | String | Keyword to search                                                                                                         |
| warehousecode      | String | Warehouse Code                                                                                                            |
| updatedafter       | String | <p>Updated Date After .....<br>(yyyy-MM-dd)</p>                                                                           |
| updatedbefore      | String | <p>Updated Date Before .....<br>(yyyy-MM-dd)</p>                                                                          |
| createdafter       | String | <p>Created Date After .....<br>(yyyy-MM-dd)</p>                                                                           |
| createdbefore      | String | <p>Created Date Before .....<br>(yyyy-MM-dd)</p>                                                                          |

#### 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                                                    |
| transferidlist                              | String | <p>Transfer ID List <br>Ex. 1234,5678</p>                     |
| numberlist                                  | String | <p>List Of Transfer Number <br>Ex. “TF-001,TF-002,TF-003”</p> |

{% tabs %}
{% tab title="Response" %}

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

| Transfer (Array)     | Type                    | Description/Example                                                       |
| -------------------- | ----------------------- | ------------------------------------------------------------------------- |
| id                   | Int                     | Transfer ID                                                               |
| transferType         | String                  | Transfer Type (Transfer, Initial, Adjust, Assembly, Disassembly, Reserve) |
| number               | String                  | Transfer Number                                                           |
| status               | String                  | Status (Pending, Success, Partial Transfer)                               |
| transferdate         | Date                    | Transfer Date                                                             |
| transferdateString   | String                  | <p>Transfer Date Text <br>(yyyy-MM-dd)</p>                                |
| reference            | String                  | Reference                                                                 |
| description          | String                  | Description                                                               |
| fromwarehousecode    | String                  | From Warehouse (Code)                                                     |
| towarehousecode      | String                  | To Warehouse (Code)                                                       |
| list                 | TransferProduct (Array) | Product List                                                              |
| createdatetime       | Datetime                | Created Datetime                                                          |
| createdatetimeString | String                  | <p>Created Datetime Text <br>(yyyy-MM-dd HH:mm)</p>                       |
| updatedatetime       | Datetime                | Updated Datetime                                                          |
| updatedatetimeString | String                  | <p>Updated Datetime Text <br>(yyyy-MM-dd HH:mm)</p>                       |
| tag                  | String (Array)          | Tag List (Array)                                                          |
| uniquenumber         | String                  | Unique Number                                                             |

<table><thead><tr><th>TransferProduct (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>productid</td><td>Int</td><td>Product ID</td></tr><tr><td>sku</td><td>String</td><td>Product Sku</td></tr><tr><td>name</td><td>String</td><td>Product Name</td></tr><tr><td>number</td><td>Double</td><td>Product Quantity</td></tr><tr><td>unittext</td><td>String</td><td>Unit</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Get Transfer Detail

<mark style="color:blue;">`GET`</mark> `https://open-api.zortout.com/v4/Transfer/GetTransferDetail`

Get transfer detail

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Transfer ID |

#### 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="Response" %}

| Parameter            | Type                    | Description/Example                                                       |
| -------------------- | ----------------------- | ------------------------------------------------------------------------- |
| id                   | Int                     | Transfer ID                                                               |
| transferType         | String                  | Transfer Type (Transfer, Initial, Adjust, Assembly, Disassembly, Reserve) |
| number               | String                  | Transfer Number                                                           |
| status               | String                  | Status (Pending, Success, Partial Transfer)                               |
| transferdate         | Date                    | Transfer Date                                                             |
| transferdateString   | String                  | <p>Transfer Date Text <br>(yyyy-MM-dd)</p>                                |
| reference            | String                  | Reference                                                                 |
| description          | String                  | Description                                                               |
| fromwarehousecode    | String                  | From Warehouse (Code)                                                     |
| towarehousecode      | String                  | To Warehouse (Code)                                                       |
| list                 | TransferProduct (Array) | Product List                                                              |
| createdatetime       | Datetime                | Created Datetime                                                          |
| createdatetimeString | String                  | <p>Created Datetime Text <br>(yyyy-MM-dd HH:mm)</p>                       |
| updatedatetime       | Datetime                | Updated Datetime                                                          |
| updatedatetimeString | String                  | <p>Updated Datetime Text <br>(yyyy-MM-dd HH:mm)</p>                       |
| tag                  | String (Array)          | Tag List (Array)                                                          |
| uniquenumber         | String                  | Unique Number                                                             |

| TransferProduct (Array) | Type   | Description/Example |
| ----------------------- | ------ | ------------------- |
| productid               | Int    | Product ID          |
| sku                     | String | Product Sku         |
| name                    | String | Product Name        |
| number                  | Double | Product Quantity    |
| unittext                | String | Unit                |
| {% endtab %}            |        |                     |
| {% endtabs %}           |        |                     |

## Get Movement Transfer Detail

<mark style="color:blue;">`GET`</mark> `https://open-api.zortout.com/v4/Transfer/GetMovementTransferDetail`

Get movement list of products according to each transfer.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Transfer ID |

#### 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="Response" %}

| MovementTransfer (Array) | Type                    | Description/Example                              |
| ------------------------ | ----------------------- | ------------------------------------------------ |
| id                       | Int                     | ID                                               |
| list                     | TransferProduct (Array) | Movement List                                    |
| actionDate               | Date (Array)            | List of action date                              |
| actionDateString         | String (Array)          | <p>List of action date text <br>(yyyy-MM-dd)</p> |
| transferid               | Int                     | Transfer ID                                      |

| TransferProduct (Array) | Type   | Description/Example |
| ----------------------- | ------ | ------------------- |
| productid               | Int    | Product ID          |
| sku                     | String | Product Sku         |
| name                    | String | Product Name        |
| number                  | Double | Product Quantity    |
| unittext                | String | Unit                |
| {% endtab %}            |        |                     |
| {% endtabs %}           |        |                     |

## Get Movement Transfers

<mark style="color:blue;">`GET`</mark> `https://open-api.zortout.com/v4/Transfer/GetMovementTransfers`

Get movement list of products for transfers.

#### Query Parameters

| Name                                         | Type   | Description                              |
| -------------------------------------------- | ------ | ---------------------------------------- |
| dateafter<mark style="color:red;">\*</mark>  | String | <p>Date After .....<br>(yyyy-MM-dd)</p>  |
| limit                                        | Int    | Limit per page (Max = 500)               |
| page                                         | Int    | Page (Default = 1)                       |
| warehousecode                                | String | Warehouse Code                           |
| datebefore<mark style="color:red;">\*</mark> | String | <p>Date Before .....<br>(yyyy-MM-dd)</p> |

#### 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="Response" %}

| Parameter | Type                     | Description/Example                   |
| --------- | ------------------------ | ------------------------------------- |
| res       | Response                 | <p>Response Code <br>200- Success</p> |
| list      | MovementTransfer (Array) | Movement Transfer List (Array)        |
| count     | Int                      | Total movement order number by filter |

| MovementTransfer (Array) | Type                    | Description/Example                              |
| ------------------------ | ----------------------- | ------------------------------------------------ |
| id                       | Int                     | ID                                               |
| list                     | TransferProduct (Array) | Movement List                                    |
| actionDate               | Date (Array)            | List of action date                              |
| actionDateString         | String (Array)          | <p>List of action date text <br>(yyyy-MM-dd)</p> |
| transferid               | Int                     | Transfer ID                                      |

| TransferProduct (Array) | Type   | Description/Example |
| ----------------------- | ------ | ------------------- |
| productid               | Int    | Product ID          |
| sku                     | String | Product Sku         |
| name                    | String | Product Name        |
| number                  | Double | Product Quantity    |
| unittext                | String | Unit                |
| {% endtab %}            |        |                     |
| {% endtabs %}           |        |                     |

## Add Transfer

<mark style="color:green;">`POST`</mark> `https://open-api.zortout.com/v4/Transfer/AddTransfer`

Add transfer.

#### Query Parameters

| Name         | Type   | Description                                                                                 |
| ------------ | ------ | ------------------------------------------------------------------------------------------- |
| uniquenumber | String | <p>Unique Number.</p><p>This value is unique and used to prevent duplicate transaction.</p> |

#### 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                                           |
| --------------------------------------------------- | ----------------------- | ----------------------------------------------------- |
| number<mark style="color:red;">\*</mark>            | String                  | Transfer Number                                       |
| towarehousecode<mark style="color:red;">\*</mark>   | String                  | To Warehouse (Code)                                   |
| fromwarehousecode<mark style="color:red;">\*</mark> | String                  | From Warehouse (Code)                                 |
| description                                         | String                  | Description                                           |
| transferdate                                        | String                  | <p>Transfer Date</p><p>Ex. “2021-09-15”</p>           |
| status                                              | String                  | <p>Status (Pending,Success) <br>Default - Pending</p> |
| list                                                | TransferProduct (Array) | Product List                                          |
| ∟ number                                            | Double                  | Product Quantity                                      |
| ∟ name                                              | String                  | Product Name                                          |
| ∟ sku                                               | String                  | Product Sku                                           |
| tag                                                 | String (Array)          | Tag List (Array)                                      |
| reference                                           | String                  | Reference                                             |

{% tabs %}
{% tab title="Response" %}

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

| Detail       | Type | Description/Example |
| ------------ | ---- | ------------------- |
| id           | Int  | Transfer ID         |
| {% endtab %} |      |                     |

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

```json
{
  "number": "TF-0001",
  "status": "Success",
  "transferdate": "2021-01- 25",
  "fromwarehousecode": "W0001",
  "towarehousecode": "W0002",
  "list": [
    {
      "sku": "P0001",
      "name": "Product1",
      "number": "5"
    },
    {
      "sku": "P0002",
      "name": "Product2",
      "number": "3"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Update Transfer Status

<mark style="color:green;">`POST`</mark> `https://open-api.zortout.com/v4/Transfer/UpdateTransferStatus`

Update status of transfer.

#### Query Parameters

| Name       | Type   | Description                                                                            |
| ---------- | ------ | -------------------------------------------------------------------------------------- |
| id         | Int    | <p>Transfer ID</p><p>\*Must have either id or number</p>                               |
| number     | String | <p>Transfer Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| actionDate | String | <p>Date of product transfer.<br>(yyyy-MM-dd)</p>                                       |

#### 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="Response" %}

| Parameter     | Type   | Description/Example                   |
| ------------- | ------ | ------------------------------------- |
| resCode       | String | <p>Response Code <br>200- Success</p> |
| resDesc       | String | Response Description                  |
| {% endtab %}  |        |                                       |
| {% endtabs %} |        |                                       |

## Update Partial Transfer

<mark style="color:green;">`POST`</mark> `https://open-api.zortout.com/v4/Transfer/UpdatePartialTransfer`

Update partial product of transfer

#### Query Parameters

| Name       | Type   | Description                                                                            |
| ---------- | ------ | -------------------------------------------------------------------------------------- |
| id         | Int    | <p>Transfer ID</p><p>\*Must have either id or number</p>                               |
| number     | String | <p>Transfer Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| actiondate | String | <p>Date of product transfer.<br>(yyyy-MM-dd)</p>                                       |

#### 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                                                                                   |
| ------------------------------------------ | ----------------------- | --------------------------------------------------------------------------------------------- |
|                                            | TransferProduct (Array) | Product List                                                                                  |
| ∟ productid                                | Int                     | <p>Product ID</p><p>\*Must have either productid or sku</p>                                   |
| ∟ sku                                      | String                  | <p>Product Sku Require if productid = 0 or null</p><p>\*Must have either productid or sku</p> |
| ∟ number<mark style="color:red;">\*</mark> | Double                  | Product Quantity                                                                              |

{% tabs %}
{% tab title="Response" %}

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

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

```json
[
    {
      "sku": "P0001",
      "number": 24
    },
    {
      "productid": 1234,
      "number": 25
    }
]
```

{% endtab %}
{% endtabs %}

## Edit Transfer

<mark style="color:green;">`POST`</mark> `https://open-api.zortout.com/v4/Transfer/EditTransfer`

Edit transfer.

#### Query Parameters

| Name   | Type   | Description                                                                            |
| ------ | ------ | -------------------------------------------------------------------------------------- |
| id     | Int    | <p>Transfer ID</p><p>\*Must have either id or number</p>                               |
| number | String | <p>Transfer Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |

#### 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                                 |
| ------------ | ----------------------- | ------------------------------------------- |
| number       | String                  | Transfer Number                             |
| ∟ number     | String                  | Product Quantity                            |
| ∟ name       | String                  | Product Name                                |
| ∟ sku        | String                  | Product Sku                                 |
| list         | TransferProduct (Array) | Product List                                |
| description  | String                  | Description                                 |
| transferdate | String                  | <p>Transfer Date</p><p>Ex. “2021-09-15”</p> |

{% tabs %}
{% tab title="Response" %}

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

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

```json
{
  "number": "TF-0001",
  "transferdate": "2021-01- 25",
  "list": [
    {
      "sku": "P0001",
      "name": "Product1",
      "number": "5"
    },
    {
      "sku": "P0002",
      "name": "Product2",
      "number": "3"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Void Transfer&#x20;

<mark style="color:green;">`POST`</mark> `https://open-api.zortout.com/v4/Transfer/VoidTransfer`

Void transfer.

#### Query Parameters

| Name   | Type   | Description                                                                            |
| ------ | ------ | -------------------------------------------------------------------------------------- |
| id     | Int    | <p>Transfer ID</p><p>\*Must have either id or number</p>                               |
| number | String | <p>Transfer Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |

#### 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="Response" %}

| Parameter     | Type   | Description/Example                   |
| ------------- | ------ | ------------------------------------- |
| resCode       | String | <p>Response Code <br>200- Success</p> |
| resDesc       | String | Response Description                  |
| {% endtab %}  |        |                                       |
| {% endtabs %} |        |                                       |
