# Return Order

## Get Return Orders

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

Get list of return orders.

#### Query Parameters

| Name                                      | Type   | Description                                              |
| ----------------------------------------- | ------ | -------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETRETURNORDERS”                                        |
| createdatetimeafter                       | String | <p>Created Datetime After …..<br>(yyyy-MM-dd HH:mm)</p>  |
| paymentbefore                             | String | <p>Paid Date Before …..<br>(yyyy-MM-dd)</p>              |
| paymentafter                              | String | <p>Paid Date After …..<br>(yyyy-MM-dd)</p>               |
| updatedbefore                             | String | <p>Updated Date Before …..<br>(yyyy-MM-dd)</p>           |
| updatedafter                              | String | <p>Updated Date After …..<br>(yyyy-MM-dd)</p>            |
| createdbefore                             | String | <p>Created Date Before …..<br>(yyyy-MM-dd)</p>           |
| createdafter                              | String | <p>Created Date After …..<br>(yyyy-MM-dd)</p>            |
| returnorderdatebefore                     | String | <p>Return Order Date Before …..<br>(yyyy-MM-dd)</p>      |
| returnorderdateafter                      | String | <p>Return Order Date After …..<br>(yyyy-MM-dd)</p>       |
| version<mark style="color:red;">\*</mark> | String | 3                                                        |
| format                                    | String | json (Default), xml                                      |
| updatedatetimebefore                      | String | <p>Updated Datetime Before …..<br>(yyyy-MM-dd HH:mm)</p> |
| updatedatetimeafter                       | String | <p>Updated Datetime After …..<br>(yyyy-MM-dd HH:mm)</p>  |
| createdatetimebefore                      | String | <p>Created Datetime Before …..<br>(yyyy-MM-dd HH:mm)</p> |
| topaymentamount                           | Double | Maximum payment amount                                   |
| frompaymentamount                         | Double | Minimum payment amount                                   |
| toamount                                  | Double | Maximum amount                                           |
| fromamount                                | Double | Minimum amount                                           |
| keyword                                   | String | Keyword to search                                        |
| createusername                            | String | Created by (Username)                                    |
| warehousecode                             | String | Warehouse Code                                           |
| limit                                     | Int    | Limit per page (Max = 2000)                              |
| page                                      | Int    | Page (Default = 1)                                       |

#### 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                                                        |
| numberlist                                   | String | <p>List Of Return Order Number <br>Ex. “CN-001,CN-002,CN-003”</p> |
| returnorderidlist                            | String | <p>List Of Return Order ID <br>Ex. “123,124,125”</p>              |

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

{% endtab %}

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

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

```
{
   "number":"CN-0001",
   "customername":"CustomerName",
   "status":"Success",
   "amount":"105",
   "vatamount":"0",
   "returnorderdate":"2021-05-20",
   "paymentmethod":"KBANK",
   "paymentamount":"80",
   "list":[
      {
         "sku":"P0001",
         "name":"Product1",
         "number":"5",
         "pricepernumber":"20",
         "discount":"10%",
         "totalprice":"90"
      },
      {
         "sku":"P0002",
         "name":"Product2",
         "number":"3",
         "pricepernumber":"10",
         "discount":"5",
         "totalprice":"15"
      }
   ],
   "referencenumber":"SO-0001"
}
```

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

<table><thead><tr><th>Payment (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Payment ID</td></tr><tr><td>name</td><td>String</td><td>Payment Method Name</td></tr><tr><td>amount</td><td>Double</td><td>Payment Amount</td></tr><tr><td>paymentdatetime</td><td>Datetime</td><td>Payment Datetime</td></tr><tr><td>paymentdatetimeString</td><td>String</td><td>Payment Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr></tbody></table>

<table><thead><tr><th width="183.8957761593581">ReturnOrderProduct (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><tr><td>pricepernumber</td><td>Double</td><td>Product Price/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unit</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr></tbody></table>

<table><thead><tr><th width="216.08133086876154">ReturnOrder (Array)</th><th width="150">Type </th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Return Order ID</td></tr><tr><td>number</td><td>String</td><td>Return Order Number</td></tr><tr><td>customerid</td><td>Int</td><td>Customer ID</td></tr><tr><td>customercode</td><td>String</td><td>Customer Code</td></tr><tr><td>customername</td><td>String</td><td>Customer Name</td></tr><tr><td>customeridnumber</td><td>String</td><td>Customer ID Number/Tax ID</td></tr><tr><td>customeremail</td><td>String</td><td>Customer Email</td></tr><tr><td>customerphone</td><td>String</td><td>Customer Phone</td></tr><tr><td>customeraddress</td><td>String</td><td>Customer Address</td></tr><tr><td>customerbranchname</td><td>String</td><td>Customer Branch Name</td></tr><tr><td>customerbranchno</td><td>String</td><td>Customer Branch No</td></tr><tr><td>status</td><td>String</td><td>Status (Pending, Waiting, Shipping, Success, Partial Transfer, Voided)</td></tr><tr><td>paymentstatus</td><td>String</td><td>Payment Status (Pending, Paid, Partial Payment, Excess Payment)</td></tr><tr><td>amount</td><td>Double</td><td>Net Amount</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>shippingvat</td><td>Int</td><td>Shipping Vat Status<br>0 - No Shipping Vat <br>1 - Have Shipping Vat</td></tr><tr><td>returnorderdate</td><td>Date</td><td>Return Order Date</td></tr><tr><td>returnorderdateString</td><td>String</td><td>Return Order Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>paymentamount</td><td>Double</td><td>Payment Amount</td></tr><tr><td>reference</td><td>String</td><td>Reference</td></tr><tr><td>description</td><td>String</td><td>Description</td></tr><tr><td>discount</td><td>String</td><td>Discount <br>Ex.5.00, 10%</td></tr><tr><td>vattype</td><td>Int</td><td>Vat Type <br>1 –No Vat (Default) <br>2 – Exclude Vat<br>3 –Include Vat</td></tr><tr><td>saleschannel</td><td>String</td><td>Sales Channel</td></tr><tr><td>warehousecode</td><td>String</td><td>Warehouse Code</td></tr><tr><td>list</td><td>ReturnOrderProduct (Array)</td><td>Product List</td></tr><tr><td>payments</td><td>Payment (Array)</td><td>Payment List</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>createdatetime</td><td>Datetime</td><td>Created Datetime</td></tr><tr><td>createdatetimeString</td><td>String</td><td>Created Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr><tr><td>updatedatetime</td><td>Datetime</td><td>Updated Datetime</td></tr><tr><td>updatedatetimeString</td><td>String</td><td>Updated Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr><tr><td>createuserid</td><td>Int</td><td>Created User ID</td></tr><tr><td>createusername</td><td>String</td><td>Created User (Username)</td></tr><tr><td>createdby</td><td>String</td><td>Created User (Display name)</td></tr><tr><td>referenceid</td><td>Int</td><td>Reference Order ID</td></tr><tr><td>referencenumber</td><td>String</td><td>Reference Order Number</td></tr></tbody></table>

<table><thead><tr><th width="150">Parameter</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>res</td><td>Response</td><td>Response Code <br>200- Success</td></tr><tr><td>list</td><td>ReturnOrder (Array)</td><td>Return Order List (Array)</td></tr><tr><td>count</td><td>Int</td><td>Total return order number by filter</td></tr></tbody></table>

## Get Return Order Detail

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

Get return order detail

#### Query Parameters

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

#### Headers

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

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

{% endtab %}
{% endtabs %}

{% endtab %}
{% endtabs %}

<table><thead><tr><th width="185.75190839694653">Payment (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Payment ID</td></tr><tr><td>name</td><td>String</td><td>Payment Method Name</td></tr><tr><td>amount</td><td>Double</td><td>Payment Amount</td></tr><tr><td>paymentdatetime</td><td>Datetime</td><td>Payment Datetime</td></tr><tr><td>paymentdatetimeString</td><td>String</td><td>Payment Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr></tbody></table>

<table><thead><tr><th>ReturnOrderProduct (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><tr><td>pricepernumber</td><td>Double</td><td>Product Price/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unittotalprice</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr></tbody></table>

<table><thead><tr><th width="184.11576505780658">Parameter </th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Return Order ID</td></tr><tr><td>number</td><td>String</td><td>Return Order Number</td></tr><tr><td>customerid</td><td>Int</td><td>Customer ID</td></tr><tr><td>customercode</td><td>String</td><td>Customer Code</td></tr><tr><td>customername</td><td>String</td><td>Customer Name</td></tr><tr><td>customeridnumber</td><td>String</td><td>Customer ID Number/Tax ID</td></tr><tr><td>customeremail</td><td>String</td><td>Customer Email</td></tr><tr><td>customerphone</td><td>String</td><td>Customer Phone</td></tr><tr><td>customeraddress</td><td>String</td><td>Customer Address</td></tr><tr><td>customerbranchname</td><td>String</td><td>Customer Branch Name</td></tr><tr><td>customerbranchno</td><td>String</td><td>Customer Branch No</td></tr><tr><td>status</td><td>String</td><td>Status (Pending, Waiting, Shipping, Success, Partial Transfer, Voided)</td></tr><tr><td>paymentstatus</td><td>String</td><td>Payment Status (Pending, Paid, Partial Payment, Excess Payment)</td></tr><tr><td>amount</td><td>Double</td><td>Net Amount</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>shippingvat</td><td>Int</td><td>Shipping Vat Status<br>0 - No Shipping Vat <br>1 - Have Shipping Vat</td></tr><tr><td>returnorderdate</td><td>Date</td><td>Return Order Date</td></tr><tr><td>returnorderdateString</td><td>String</td><td>Return Order Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>paymentamount</td><td>Double</td><td>Payment Amount</td></tr><tr><td>reference</td><td>String</td><td>Reference</td></tr><tr><td>description</td><td>String</td><td>Description</td></tr><tr><td>discount</td><td>String</td><td>Discount <br>Ex.5.00, 10%</td></tr><tr><td>vattype</td><td>Int</td><td>Vat Type <br>1 –No Vat (Default)<br>2 – Exclude Vat <br>3 –Include Vat</td></tr><tr><td>saleschannel</td><td>String</td><td>Sales Channel</td></tr><tr><td>warehousecode</td><td>String</td><td>Warehouse Code</td></tr><tr><td>list</td><td>ReturnOrderProduct (Array)</td><td>Product List</td></tr><tr><td>payments</td><td>Payment (Array)</td><td>Payment List</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>createdatetime</td><td>Datetime</td><td>Created Datetime</td></tr><tr><td>createdatetimeString</td><td>String</td><td>Created Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr><tr><td>updatedatetime</td><td>Datetime</td><td>Updated Datetime</td></tr><tr><td>updatedatetimeString</td><td>String</td><td>Updated Datetime Text <br>(yyyy-MM-dd HH:mm)</td></tr><tr><td>createuserid</td><td>Int</td><td>Created User ID</td></tr><tr><td>createusername</td><td>String</td><td>Created User (Username)</td></tr><tr><td>createdby</td><td>String</td><td>Created User (Display name)</td></tr><tr><td>referenceid</td><td>Int</td><td>Reference Order ID</td></tr><tr><td>referencenumber</td><td>String</td><td>Reference Order Number</td></tr></tbody></table>

## Get Movement Return Order Detail

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

Get movement list of products according to each return order.

#### Query Parameters

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

#### Headers

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

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

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

<table><thead><tr><th>ReturnOrderProduct (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><tr><td>pricepernumber</td><td>Double</td><td>Product Price/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unit</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr></tbody></table>

| MovementReturnOrder (Array) | Type                       | Description/Example                              |
| --------------------------- | -------------------------- | ------------------------------------------------ |
| id                          | Int                        | ID                                               |
| list                        | ReturnOrderProduct (Array) | Movement List                                    |
| actionDate                  | Date (Array)               | List of action date                              |
| actionDateString            | String (Array)             | <p>List of action date text <br>(yyyy-MM-dd)</p> |
| returnorderid               | Int                        | Return Order ID                                  |

## Get Movement Return Orders

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

Get movement list of products for return orders.

#### Query Parameters

| Name                                          | Type   | Description                            |
| --------------------------------------------- | ------ | -------------------------------------- |
| method<mark style="color:red;">\*</mark>      | String | “GETMOVEMENTRETURNORDERS”              |
| limit                                         | Int    | Limit per page (Max = 2000)            |
| page                                          | Int    | Page (Default = 1)                     |
| warehousecode                                 | String | Warehouse Code                         |
| datebefore <mark style="color:red;">\*</mark> | String | <p>Date Before …..<br>(yyyy-MM-dd)</p> |
| dateafter<mark style="color:red;">\*</mark>   | String | <p>Date After …..<br>(yyyy-MM-dd)</p>  |
| version<mark style="color:red;">\*</mark>     | String |                                        |
| format                                        | String | json (Default), xml                    |

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

<table><thead><tr><th>ReturnOrderProduct (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><tr><td>pricepernumber</td><td>Double</td><td>Product Price/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unit</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr></tbody></table>

| MovementReturnOrder (Array) | Type                       | Description/Example                              |
| --------------------------- | -------------------------- | ------------------------------------------------ |
| id                          | Int                        | ID                                               |
| list                        | ReturnOrderProduct (Array) | Movement List                                    |
| actionDate                  | Date (Array)               | List of action date                              |
| actionDateString            | String (Array)             | <p>List of action date text <br>(yyyy-MM-dd)</p> |
| returnorderid               | Int                        | Return Order ID                                  |

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

## Add Return Order

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

Add return order.

#### Query Parameters

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

#### 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                     | Return Order Number                                                                                                                                                                                                                                                              |
| customername                                       | String                     | Customer Name                                                                                                                                                                                                                                                                    |
| customeraddress                                    | String                     | Customer Address                                                                                                                                                                                                                                                                 |
| customerphone                                      | String                     | Customer Phone                                                                                                                                                                                                                                                                   |
| customeremail                                      | String                     | Customer Email                                                                                                                                                                                                                                                                   |
| customeridnumber                                   | String                     | Customer ID Number/Tax ID                                                                                                                                                                                                                                                        |
| paymentmethod                                      | String                     | Payment Method                                                                                                                                                                                                                                                                   |
| returnorderdate                                    | String                     | <p>Return Order Date</p><p>Ex. “2021-09-15”</p>                                                                                                                                                                                                                                  |
| vatamount                                          | Double                     | Vat Amount                                                                                                                                                                                                                                                                       |
| amount <mark style="color:red;">\*</mark>          | Double                     | Net Amount                                                                                                                                                                                                                                                                       |
| status                                             | String                     | <p>Status(Pending,Success) <br>Default – Pending</p>                                                                                                                                                                                                                             |
| reference                                          | String                     | Reference                                                                                                                                                                                                                                                                        |
| paymentamount                                      | Double                     | <p>Payment Amount</p><p>("paymentmethod" must be required.)</p>                                                                                                                                                                                                                  |
| ∟ sku <mark style="color:red;">\*</mark>           | String                     | Product Sku                                                                                                                                                                                                                                                                      |
| list                                               | ReturnOrderProduct (Array) | Product List                                                                                                                                                                                                                                                                     |
| warehousecode                                      | String                     | Warehouse Code                                                                                                                                                                                                                                                                   |
| vattype                                            | Int                        | <p>Vat Type <br>1 – No Vat<br>2 – Exclude Vat<br>3 – Include Vat<br>If vattype is not defined, the system will use vatamount to calculate and define automatically.<br>If vattype = 1, 2 or 3, the system will ignore vatamount and calculate vatamount value automatically.</p> |
| discount                                           | String                     | <p>Discount <br>Ex.5.00, 10%</p>                                                                                                                                                                                                                                                 |
| description                                        | String                     | Description                                                                                                                                                                                                                                                                      |
| ∟ name <mark style="color:red;">\*</mark>          | String                     | Product Name                                                                                                                                                                                                                                                                     |
| ∟ number<mark style="color:red;">\*</mark>         | Double                     | Product Quantity                                                                                                                                                                                                                                                                 |
| ∟ totalprice <mark style="color:red;">\*</mark>    | Double                     | Total Price                                                                                                                                                                                                                                                                      |
| ∟ pricepernumber<mark style="color:red;">\*</mark> | Double                     | Product Price/Quantity                                                                                                                                                                                                                                                           |
| ∟ discount                                         | String                     | Discount Per Unit                                                                                                                                                                                                                                                                |
| referencenumber                                    | String                     | Reference Order Number                                                                                                                                                                                                                                                           |
| referenceid                                        | Int                        | Reference Order ID                                                                                                                                                                                                                                                               |
| customercode                                       | String                     | Customer Code                                                                                                                                                                                                                                                                    |
| customerbranchno                                   | String                     | Customer Branch No                                                                                                                                                                                                                                                               |
| customerbranchname                                 | String                     | Customer Branch Name                                                                                                                                                                                                                                                             |
| shippingvat                                        | Int                        | <p>Shipping Vat Status <br>0 - No Shipping Vat (Default) <br>1 – Have Shipping Vat</p>                                                                                                                                                                                           |
| shippingamount                                     | Double                     | Shipping Amount                                                                                                                                                                                                                                                                  |
| saleschannel                                       | String                     | Sales Channel                                                                                                                                                                                                                                                                    |

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

{% endtab %}
{% endtabs %}

{% endtab %}
{% endtabs %}

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

## Update Return Order Status

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

Update status of return order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| method<mark style="color:red;">\*</mark>  | String | “UPDATERETURNORDERSTATUS”                                                                  |
| warehousecode                             | String | Warehouse Code                                                                             |
| number                                    | String | <p>Return Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Return Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                          |
| format                                    | String | json (Default), xml                                                                        |

#### Headers

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

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

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

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

## Update Return Order Payment

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

Update payment of return order.

#### Query Parameters

| Name                                            | Type   | Description                                                                                |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| method<mark style="color:red;">\*</mark>        | String | “UPDATERETURNORDERPAYMENT”                                                                 |
| paymentdate                                     | String | <p>Payment Datetime <br>Ex. “2021-09-15 21:05”</p>                                         |
| paymentamount<mark style="color:red;">\*</mark> | String | Payment Amount                                                                             |
| paymentmethod<mark style="color:red;">\*</mark> | String | Payment Method                                                                             |
| number                                          | String | <p>Return Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                              | String | <p>Return Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark>       | String | 3                                                                                          |
| format                                          | String | json (Default), xml                                                                        |

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

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

## Void Return Order&#x20;

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

Void return order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| method<mark style="color:red;">\*</mark>  | String | “VOIDRETURNORDER”                                                                          |
| number                                    | String | <p>Return Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Return Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                          |
| format                                    | String | json (Default), xml                                                                        |

#### Headers

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

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

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

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

## Void Return Order Payment

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

Delete payment in return order.

#### Query Parameters

| Name                                        | Type   | Description                                                                                |
| ------------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| method<mark style="color:red;">\*</mark>    | String | “VOIDRETURNORDERPAYMENT”                                                                   |
| number                                      | String | <p>Return Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                          | Int    | <p>Return Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark>   | String | 3                                                                                          |
| format                                      | String | json (Default), xml                                                                        |
| paymentid<mark style="color:red;">\*</mark> | Int    | Payment ID                                                                                 |

#### Headers

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

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

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

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

## Add Return Order Tag

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

Add tag to return order.

#### Query Parameters

| Name                                      | Type   | Description                                                                                |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------------ |
| method<mark style="color:red;">\*</mark>  | String | “ADDRETURNORDERTAG”                                                                        |
| tag<mark style="color:red;">\*</mark>     | String | Tag                                                                                        |
| number                                    | String | <p>Return Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| id                                        | Int    | <p>Return Order ID</p><p>\*Must have either id or number</p>                               |
| version<mark style="color:red;">\*</mark> | String | 3                                                                                          |
| format                                    | String | json (Default), xml                                                                        |

#### Headers

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

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

{% 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/return-order.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.
