# Order

## Get Orders

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

Get list of orders.

#### Query Parameters

| Name                                 | Type   | Description                                                                                                                                                    |
| ------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| orderdateafter                       | String | <p>Order Date After .....<br>(yyyy-MM-dd)</p>                                                                                                                  |
| orderdatebefore                      | String | <p>Order Date Before .....<br>(yyyy-MM-dd)</p>                                                                                                                 |
| toamount                             | Double | Maximum amount                                                                                                                                                 |
| fromamount                           | Double | Minimum amount                                                                                                                                                 |
| updatedatetimeafter                  | String | <p>Updated Datetime After .....<br>(yyyy-MM-dd HH:mm)</p>                                                                                                      |
| updatedatetimebefore                 | String | <p>Updated Datetime Before .....<br>(yyyy-MM-dd HH:mm)</p>                                                                                                     |
| createdatetimeafter                  | String | <p>Created Datetime After .....<br>(yyyy-MM-dd HH:mm)</p>                                                                                                      |
| createdatetimebefore                 | String | <p>Created Datetime Before .....<br>(yyyy-MM-dd HH:mm)</p>                                                                                                     |
| paymentafter                         | String | <p>Paid Date After .....<br>(yyyy-MM-dd)</p>                                                                                                                   |
| paymentbefore                        | String | <p>Paid Date Before .....<br>(yyyy-MM-dd)</p>                                                                                                                  |
| 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>                                                                                                               |
| serialno                             | Int    | <p>Show serial no status<br>0 - No (Default)<br>1 - Yes</p>                                                                                                    |
| paymentstatus                        | String | <p>Payment status<br>0 - Pending<br>1 - Paid<br>2 - Voided<br>3 - Partial Payment<br>4 - Excess Payment<br>Ex. "0,1,3,4"</p>                                   |
| status                               | String | <p>Status<br>0 - Pending<br>1 - Success<br>2 - Voided<br>3 - Waiting<br>4 - Returned<br>5 - Packed<br>6 - Shipping<br>7 - Failed Shipment<br>Ex. "0,1,3,4"</p> |
| createusername                       | String | Created by (Username)                                                                                                                                          |
| warehousecode                        | String | Warehouse Code                                                                                                                                                 |
| warehouseCodeList                    | String | <p>Warehouse Code List<br>Ex. "W0001,W0002"</p>                                                                                                                |
| topaymentamount                      | Double | Maximum payment amount                                                                                                                                         |
| frompaymentamount                    | Double | Minimum payment amount                                                                                                                                         |
| keyword                              | String | Keyword to search                                                                                                                                              |
| saleschannel                         | String | Sales channel                                                                                                                                                  |
| expirylot                            | Int    | <p>Show expiry lot status<br>0 - No (Default)<br>1 - Yes</p>                                                                                                   |
| sortdirection                        | String | <p>Sorting Type By id<br>DESC - Descending (Default)<br>ASC - Ascending</p>                                                                                    |
| options                              | String | <p>Optional features to include in the response. Use comma-separated values.<br>Available options:                                                             |
| <br>returnorders : Return orders</p> |        |                                                                                                                                                                |
| limit                                | Int    | Limit per page (Max = 500)                                                                                                                                     |
| 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                                                 |
| orderidlist                                 | String | <p>List Of Order ID <br>Ex. “123,124,125”</p>              |
| numberlist                                  | String | <p>List Of Order Number <br>Ex. “SO-001,SO-002,SO-003”</p> |

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

| Parameter          | Type          | Description/Example                   |
| ------------------ | ------------- | ------------------------------------- |
| res                | Response      | <p>Response Code <br>200- Success</p> |
| list               | Order (Array) | Order List (Array)                    |
| count              | Int           | Total order number by filter          |
| totalAmount        | Double        | Total amountby filter                 |
| totalPaymentAmount | Double        | Total payment amountby filter         |

<table><thead><tr><th width="150">Order (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Order ID</td></tr><tr><td>number</td><td>String</td><td>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, Returned, Packed, Shipping, Success, Partial Transfer, Voided, Failed Shipment)</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>amount_pretax</td><td></td><td>Pretax Amount</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>shippingchannel</td><td>String</td><td>Shipping Channel</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>shippingamount_pretax</td><td>Double</td><td>Pretax Shipping Amount</td></tr><tr><td>shippingamount_vat</td><td>Double</td><td>Shipping Vat 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>shippingdate</td><td>Date</td><td>Shipping Date</td></tr><tr><td>shippingdateString</td><td>String</td><td>Shipping Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>shippingname</td><td>String</td><td>Shipping Name</td></tr><tr><td>shippingaddress</td><td>String</td><td>Shipping Address</td></tr><tr><td>shippingphone</td><td>String</td><td>Shipping Phone</td></tr><tr><td>shippingemail</td><td>String</td><td>Shipping Email</td></tr><tr><td>trackingno</td><td>String</td><td>Tracking No</td></tr><tr><td>trackingList</td><td>TrackingNo (Array)</td><td>Tracking No List</td></tr><tr><td>orderdate</td><td>Date</td><td>Order Date</td></tr><tr><td>orderdateString</td><td>String</td><td>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>Buyer Discount.<br>Discount includes sellerdiscount and platformdiscount.<br>Ex.5.00, 10%</td></tr><tr><td>sellerdiscount</td><td>Double</td><td>Seller Discount</td></tr><tr><td>sellerdiscount_pretax</td><td>Double</td><td>Pretax Seller Discount</td></tr><tr><td>sellerdiscount_vat</td><td>Double</td><td>Seller Discount Vat</td></tr><tr><td>platformdiscount</td><td>Double</td><td>Platform Discount.<br>This discount is subsidized from Marketplace for buyer. (Ex. Lazada, Shopee, Tiktok)</td></tr><tr><td>platformdiscount_pretax</td><td>Double</td><td>Pretax Platform Discount</td></tr><tr><td>platformdiscount_vat</td><td>Double</td><td>Platform Discount Vat</td></tr><tr><td>voucheramount</td><td>Double</td><td>Subsidized Amount from Marketplace for seller.</td></tr><tr><td>voucheramount_pretax</td><td>Double</td><td>Subsidized Pretax amount from Marketplace for seller.</td></tr><tr><td>voucheramount_vat</td><td>Double</td><td>Subsidized Vat amount from Marketplace for seller.</td></tr><tr><td>shippingVoucher</td><td>Double</td><td>Shipping Voucher Amount</td></tr><tr><td>shippingVoucher_pretax</td><td>Double</td><td>Pretax Shipping Voucher Amount</td></tr><tr><td>shippingVoucher_vat</td><td>Double</td><td>Shipping Voucher Vat</td></tr><tr><td>discountamount</td><td>Double</td><td>Total summary of order discount. (Include discount and voucheramount).<br>discountamount = discount - voucheramount<br>discountamount = sellerdiscount + platformdiscount - voucheramount</td></tr><tr><td>discountamount_pretax</td><td>Double</td><td>Total summary of pretax order discount.</td></tr><tr><td>discountamount_vat</td><td>Double</td><td>Total summary of order vat.</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>OrderProduct (Array)</td><td>Product List</td></tr><tr><td>totalproductamount</td><td>Double</td><td>Total Product Price of 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>expiredate</td><td>Date</td><td>Expired Date</td></tr><tr><td>expiredateString</td><td>String</td><td>Expired Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>successDate</td><td>Date</td><td>The date that order was completed.</td></tr><tr><td>successDateString</td><td>String</td><td>The date text that order was completed.<br>(yyyy-MM-dd)</td></tr><tr><td>receivedate</td><td>Date</td><td>The date that buyer receive order from Marketplace. (Only customized merchant)</td></tr><tr><td>receivedateString</td><td>String</td><td>The date text that buyer receive order from Marketplace. (Only customized merchant)<br>(yyyy-MM-dd)</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>isCOD</td><td>Boolean</td><td>COD Status</td></tr><tr><td>integrationName</td><td>String</td><td>Integration Channel Name (Only Order from Integrated Channel.)</td></tr><tr><td>integrationShop</td><td>String</td><td>Integration Shop Name (Only Order from Integrated Channel.)</td></tr><tr><td>integrationCustomerId</td><td>String</td><td>Integration Customer ID (Only Order from Integrated Channel - Shopee and Tiktok only)</td></tr><tr><td>integrationCustomer</td><td>String</td><td>Integration Customer User (Only Order from Integrated Channel - Shopee and Tiktok only)</td></tr><tr><td>agent</td><td>Agent</td><td>Agent Detail</td></tr><tr><td>uniquenumber</td><td>String</td><td>Unique Number</td></tr><tr><td>currency</td><td>String</td><td>Currency</td></tr><tr><td>properties</td><td>Property (Array)</td><td>Custom Properties List</td></tr></tbody></table>

<table><thead><tr><th width="151">OrderProduct (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>pricepernumber_pretax</td><td>Double</td><td>Pretax Product Price/Quantity</td></tr><tr><td>pricepernumber_vat</td><td>Double</td><td>Product Vat/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unit</td></tr><tr><td>discountamount</td><td>Double</td><td>Total discount of product line.</td></tr><tr><td>discountamount_pretax</td><td>Double</td><td>Total pretax discount of product line.</td></tr><tr><td>discountamount_vat</td><td>Double</td><td>Total discount vat of product line.</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr><tr><td>totalprice_pretax</td><td>Double</td><td>Pretax Total Price</td></tr><tr><td>totalprice_vat</td><td>Double</td><td>Total Vat</td></tr><tr><td>producttype</td><td>Int</td><td>Product Type<br>0 - Product (Default)<br>1 - Service</td></tr><tr><td>bundleid</td><td>Int (Nullable)</td><td>Bundle ID</td></tr><tr><td>bundleitemid</td><td>Int (Nullable)</td><td>ID of bundle group in product line.</td></tr><tr><td>bundlenumber</td><td>Double (Nullable)</td><td>Bundle Quantity</td></tr><tr><td>bundleCode</td><td>String</td><td>Bundle Code/Sku</td></tr><tr><td>bundleName</td><td>String</td><td>Bundle Name</td></tr><tr><td>integrationItemId</td><td>String</td><td>Item Id of Integration.</td></tr><tr><td>integrationVariantId</td><td>String</td><td>Variant Id of Integration.</td></tr><tr><td>vat_status</td><td>Int</td><td>Sell vat status<br>0 - Follow Vat Type in Order<br>1 - No Vat<br>2- Have Vat<br>3 - Vat 0%</td></tr><tr><td>serialnolist</td><td>SerialNo (Array)</td><td>Serial no List</td></tr><tr><td>expirylotlist</td><td>ExpiryLot (Array)</td><td>Expiry lot List</td></tr></tbody></table>

<table><thead><tr><th width="160.43423319931074">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>

| SerialNo (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Serial no ID        |
| name             | String | Serial no Name      |

| ExpiryLot (Array) | Type   | Description/Example |
| ----------------- | ------ | ------------------- |
| id                | Int    | Expiry lot ID       |
| name              | String | Expiry lot Name     |
| number            | Double | Expiry lot Quantity |
| expiryDate        | Date   | Expired Date        |

| Agent   | Type   | Description/Example |
| ------- | ------ | ------------------- |
| id      | Int    | Agent ID            |
| name    | String | Agent Name          |
| phone   | String | Agent Phone         |
| email   | String | Agent Email         |
| address | String | Agent Address       |

| TrackingNo (Array) | Type   | Description/Example                 |
| ------------------ | ------ | ----------------------------------- |
| id                 | Int    | Tracking No ID                      |
| trackingno         | String | Tracking No                         |
| trackingurl        | String | Tracking No Url                     |
| shippingdate       | Date   | Shipping Date                       |
| shippingchannel    | String | Shipping Channel                    |
| status             | String | Tracking No Status (Normal, Voided) |

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |
| {% endtab %}     |        |                     |
| {% endtabs %}    |        |                     |

## Get Order Detail

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

Get order detail.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Order 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" %}

<table><thead><tr><th width="150">Parameter</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Order ID</td></tr><tr><td>number</td><td>String</td><td>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, Returned, Packed, Shipping, Success, Partial Transfer, Voided, Failed Shipment)</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>amount_pretax</td><td></td><td>Pretax Amount</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>shippingchannel</td><td>String</td><td>Shipping Channel</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>shippingamount_pretax</td><td>Double</td><td>Pretax Shipping Amount</td></tr><tr><td>shippingamount_vat</td><td>Double</td><td>Shipping Vat 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>shippingdate</td><td>Date</td><td>Shipping Date</td></tr><tr><td>shippingdateString</td><td>String</td><td>Shipping Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>shippingname</td><td>String</td><td>Shipping Name</td></tr><tr><td>shippingaddress</td><td>String</td><td>Shipping Address</td></tr><tr><td>shippingphone</td><td>String</td><td>Shipping Phone</td></tr><tr><td>shippingemail</td><td>String</td><td>Shipping Email</td></tr><tr><td>trackingno</td><td>String</td><td>Tracking No</td></tr><tr><td>trackingList</td><td>TrackingNo (Array)</td><td>Tracking No List</td></tr><tr><td>orderdate</td><td>Date</td><td>Order Date</td></tr><tr><td>orderdateString</td><td>String</td><td>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>Buyer Discount.<br>Discount includes sellerdiscount and platformdiscount.<br>Ex.5.00, 10%</td></tr><tr><td>sellerdiscount</td><td>Double</td><td>Seller Discount</td></tr><tr><td>sellerdiscount_pretax</td><td>Double</td><td>Pretax Seller Discount</td></tr><tr><td>sellerdiscount_vat</td><td>Double</td><td>Seller Discount Vat</td></tr><tr><td>platformdiscount</td><td>Double</td><td>Platform Discount.<br>This discount is subsidized from Marketplace for buyer. (Ex. Lazada, Shopee, Tiktok)</td></tr><tr><td>platformdiscount_pretax</td><td>Double</td><td>Pretax Platform Discount</td></tr><tr><td>platformdiscount_vat</td><td>Double</td><td>Platform Discount Vat</td></tr><tr><td>voucheramount</td><td>Double</td><td>Subsidized Amount from Marketplace for seller.</td></tr><tr><td>voucheramount_pretax</td><td>Double</td><td>Subsidized Pretax amount from Marketplace for seller.</td></tr><tr><td>voucheramount_vat</td><td>Double</td><td>Subsidized Vat amount from Marketplace for seller.</td></tr><tr><td>shippingVoucher</td><td>Double</td><td>Shipping Voucher Amount</td></tr><tr><td>shippingVoucher_pretax</td><td>Double</td><td>Pretax Shipping Voucher Amount</td></tr><tr><td>shippingVoucher_vat</td><td>Double</td><td>Shipping Voucher Vat</td></tr><tr><td>discountamount</td><td>Double</td><td>Total summary of order discount. (Include discount and voucheramount).<br>discountamount = discount - voucheramount<br>discountamount = sellerdiscount + platformdiscount - voucheramount</td></tr><tr><td>discountamount_pretax</td><td>Double</td><td>Total summary of pretax order discount.</td></tr><tr><td>discountamount_vat</td><td>Double</td><td>Total summary of order vat.</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>OrderProduct (Array)</td><td>Product List</td></tr><tr><td>totalproductamount</td><td>Double</td><td>Total Product Price of 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>expiredate</td><td>Date</td><td>Expired Date</td></tr><tr><td>expiredateString</td><td>String</td><td>Expired Date Text <br>(yyyy-MM-dd)</td></tr><tr><td>successDate</td><td>Date</td><td>The date that order was completed.</td></tr><tr><td>successDateString</td><td>String</td><td>The date text that order was completed.<br>(yyyy-MM-dd)</td></tr><tr><td>receivedate</td><td>Date</td><td>The date that buyer receive order from Marketplace. (Only customized merchant)</td></tr><tr><td>receivedateString</td><td>String</td><td>The date text that buyer receive order from Marketplace. (Only customized merchant)<br>(yyyy-MM-dd)</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>isCOD</td><td>Boolean</td><td>COD Status</td></tr><tr><td>integrationName</td><td>String</td><td>Integration Channel Name (Only Order from Integrated Channel.)</td></tr><tr><td>integrationShop</td><td>String</td><td>Integration Shop Name (Only Order from Integrated Channel.)</td></tr><tr><td>integrationCustomerId</td><td>String</td><td>Integration Customer ID (Only Order from Integrated Channel - Shopee and Tiktok only)</td></tr><tr><td>integrationCustomer</td><td>String</td><td>Integration Custome User (Only Order from Integrated Channel - Shopee and Tiktok only)</td></tr><tr><td>agent</td><td>Agent</td><td>Agent Detail</td></tr><tr><td>uniquenumber</td><td>String</td><td>Unique Number</td></tr><tr><td>currency</td><td>String</td><td>Currency</td></tr><tr><td>properties</td><td>Property (Array)</td><td>Custom Properties List</td></tr></tbody></table>

<table><thead><tr><th width="163">OrderProduct (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>pricepernumber_pretax</td><td>Double</td><td>Pretax Product Price/Quantity</td></tr><tr><td>pricepernumber_vat</td><td>Double</td><td>Product Vat/Quantity</td></tr><tr><td>discount</td><td>String</td><td>Discount Per Unit</td></tr><tr><td>discountamount</td><td>Double</td><td>Total discount of product line.</td></tr><tr><td>discountamount_pretax</td><td>Double</td><td>Total pretax discount of product line.</td></tr><tr><td>discountamount_vat</td><td>Double</td><td>Total discount vat of product line.</td></tr><tr><td>totalprice</td><td>Double</td><td>Total Price</td></tr><tr><td>totalprice_pretax</td><td>Double</td><td>Pretax Total Price</td></tr><tr><td>totalprice_vat</td><td>Double</td><td>Total Vat</td></tr><tr><td>producttype</td><td>Int</td><td>Product Type<br>0 - Product (Default)<br>1 - Service</td></tr><tr><td>bundleid</td><td>Int (Nullable)</td><td>Bundle ID</td></tr><tr><td>bundleitemid</td><td>Int (Nullable)</td><td>ID of bundle group in product line.</td></tr><tr><td>bundlenumber</td><td>Double (Nullable)</td><td>Bundle Quantity</td></tr><tr><td>bundleCode</td><td>String</td><td>Bundle Code/Sku</td></tr><tr><td>bundleName</td><td>String</td><td>Bundle Name</td></tr><tr><td>integrationItemId</td><td>String</td><td>Item Id of Integration.</td></tr><tr><td>integrationVariantId</td><td>String</td><td>Variant Id of Integration.</td></tr><tr><td>vat_status</td><td>Int</td><td>Sell vat status<br>0 - Follow Vat Type in Order<br>1 - No Vat<br>2- Have Vat<br>3 - Vat 0%</td></tr><tr><td>serialnolist</td><td>SerialNo (Array)</td><td>Serial no List</td></tr><tr><td>expirylotlist</td><td>ExpiryLot (Array)</td><td>Expiry lot List</td></tr></tbody></table>

<table><thead><tr><th width="175.35455543358947">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="150">SerialNo (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Serial no ID</td></tr><tr><td>name</td><td>String</td><td>Serial no Name</td></tr></tbody></table>

<table><thead><tr><th width="155.33333333333331">ExpiryLot (Array)</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Expiry lot ID</td></tr><tr><td>name</td><td>String</td><td>Expiry lot Name</td></tr><tr><td>number</td><td>Double</td><td>Expiry lot Quantity</td></tr><tr><td>expiryDate</td><td>Date</td><td>Expired Date</td></tr></tbody></table>

<table><thead><tr><th width="191">Agent</th><th>Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>id</td><td>Int</td><td>Agent ID</td></tr><tr><td>name</td><td>String</td><td>Agent Name</td></tr><tr><td>phone</td><td>String</td><td>Agent Phone</td></tr><tr><td>email</td><td>String</td><td>Agent Email</td></tr><tr><td>address</td><td>String</td><td>Agent Address</td></tr></tbody></table>

| TrackingNo (Array) | Type   | Description/Example                 |
| ------------------ | ------ | ----------------------------------- |
| id                 | Int    | Tracking No ID                      |
| trackingno         | String | Tracking No                         |
| trackingurl        | String | Tracking No Url                     |
| shippingdate       | Date   | Shipping Date                       |
| shippingchannel    | String | Shipping Channel                    |
| status             | String | Tracking No Status (Normal, Voided) |

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |
| {% endtab %}     |        |                     |
| {% endtabs %}    |        |                     |

## Get Voucher Detail

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

Get list of voucher subsidized by Marketplace.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Order 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" %}

| Voucher (Array) | Type   | Description/Example |
| --------------- | ------ | ------------------- |
| id              | Int    | ID                  |
| name            | String | Voucher Name        |
| amount          | Double | Amount              |
| {% endtab %}    |        |                     |
| {% endtabs %}   |        |                     |

## Get Expense Order Detail

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

Get list of expenses of order.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Order 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" %}

| Expense (Array)       | Type     | Description/Example                                      |
| --------------------- | -------- | -------------------------------------------------------- |
| id                    | Int      | ID                                                       |
| name                  | String   | Expense Name                                             |
| amount                | Double   | Amount                                                   |
| paymentname           | String   | Payment Method Name                                      |
| paymentdatetime       | Datetime | Payment Datetime                                         |
| paymentdatetimeString | String   | <p>Payment Datetime Text <br>(yyyy-MM-dd HH:mm)</p>      |
| isvat                 | Int      | <p>Vat Status</p><p>0 - No Vat</p><p>1 - Include Vat</p> |
| {% endtab %}          |          |                                                          |
| {% endtabs %}         |          |                                                          |

## Get Movement Order Detail

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

Get movement list of products according to each order.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Order 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" %}

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

| OrderProduct (Array) | Type   | Description/Example    |
| -------------------- | ------ | ---------------------- |
| productid            | Int    | Product ID             |
| sku                  | String | Product Sku            |
| name                 | String | Product Name           |
| number               | Double | Product Quantity       |
| unittext             | String | Unit                   |
| pricepernumber       | Double | Product Price/Quantity |
| discount             | String | Discount Per Unit      |
| totalprice           | Double | Total Price            |
| {% endtab %}         |        |                        |
| {% endtabs %}        |        |                        |

## Get Movement Orders

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

Get movement list of products for orders.

#### 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      | MovementOrder (Array) | Movement Order List (Array)           |
| count     | Int                   | Total movement order number by filter |

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

| OrderProduct (Array) | Type   | Description/Example    |
| -------------------- | ------ | ---------------------- |
| productid            | Int    | Product ID             |
| sku                  | String | Product Sku            |
| name                 | String | Product Name           |
| number               | Double | Product Quantity       |
| unittext             | String | Unit                   |
| pricepernumber       | Double | Product Price/Quantity |
| discount             | String | Discount Per Unit      |
| totalprice           | Double | Total Price            |
| {% endtab %}         |        |                        |
| {% endtabs %}        |        |                        |

## Get Shipment Labels

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

Get shipment label list of orders.

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

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

| ShipmentLabel (Array) | Type        | Description/Example                                                                                                               |
| --------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
| linkurl               | String      | Url of Shipment Label                                                                                                             |
| type                  | String      | <p>Type of Shipment Label.<br>Ex. "general, lazada, shopee, jdcentral, tiktok, flashexpress, jtexpress, kerry, shopeeexpress"</p> |
| Format                | String      | Pdf, Html, Url                                                                                                                    |
| Data                  | String      | Shipment Label Data (Follow on Format)                                                                                            |
| list                  | Int (Array) | List Of Order ID                                                                                                                  |
| {% endtab %}          |             |                                                                                                                                   |
| {% endtabs %}         |             |                                                                                                                                   |

## Add Order

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

Add order.

#### Query Parameters

| Name         | Type   | Description                                                                                 |
| ------------ | ------ | ------------------------------------------------------------------------------------------- |
| uniquenumber | String | <p>Unique Number.</p><p>This value is unique and used to prevent duplicate transaction.</p> |
| link         | Int    | <p>Link to generate.</p><p>0 – None (Default)<br>1 – Share link</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

<table><thead><tr><th width="289">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>number<mark style="color:red;">*</mark></td><td>String</td><td>Order Number</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>Double</td><td>Net Amount</td></tr><tr><td>status</td><td>String</td><td>Status (Pending, Success) <br>Default - Pending</td></tr><tr><td>reference</td><td>String</td><td>Reference</td></tr><tr><td>customeraddress</td><td>String</td><td>Customer Address</td></tr><tr><td>customerphone</td><td>String</td><td>Customer Phone</td></tr><tr><td>customeremail</td><td>String</td><td>Customer Email</td></tr><tr><td>customeridnumber</td><td>String</td><td>Customer ID Number/Tax ID</td></tr><tr><td>customername</td><td>String</td><td>Customer Name</td></tr><tr><td>shippingaddress</td><td>String</td><td>Shipping Address</td></tr><tr><td>shippingname</td><td>String</td><td>Shipping Name</td></tr><tr><td>shippingdate</td><td>String</td><td><p>Shipping Date</p><p>Ex. “2021-09-15”</p></td></tr><tr><td>shippingvat</td><td>Int</td><td>Shipping Vat Status <br>0 - No Shipping Vat (Default) <br>1 – Have Shipping Vat</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>shippingchannel</td><td>String</td><td>Shipping Channel</td></tr><tr><td>trackingno</td><td>String</td><td>Tracking No</td></tr><tr><td>shippingemail</td><td>String</td><td>Shipping Email</td></tr><tr><td>shippingphone</td><td>String</td><td>Shipping Phone</td></tr><tr><td>paymentamount</td><td>Double</td><td><p>Payment Amount</p><p>("paymentmethod" must be required.)</p></td></tr><tr><td>paymentmethod</td><td>String</td><td>Payment Method</td></tr><tr><td>orderdate</td><td>String</td><td>Order Date<br>Ex. "2021-09-15"</td></tr><tr><td>warehousecode</td><td>String</td><td>Warehouse Code</td></tr><tr><td>saleschannel</td><td>String</td><td>Sales Channel</td></tr><tr><td>discount</td><td>String</td><td>Discount <br>Ex. 5.00, 10%</td></tr><tr><td>description</td><td>String</td><td>Description</td></tr><tr><td>paymentdate</td><td>String</td><td>Payment Datetime <br>Ex. “2021-09-15 21:05”</td></tr><tr><td>list</td><td>OrderProduct (Array)</td><td>Product List</td></tr><tr><td>  ∟ sku<mark style="color:red;">*</mark></td><td>String</td><td>Product Sku</td></tr><tr><td>  ∟ name<mark style="color:red;">*</mark></td><td>String</td><td>Product Name</td></tr><tr><td>  ∟ number<mark style="color:red;">*</mark></td><td>Double</td><td>Product Quantity</td></tr><tr><td>  ∟ pricepernumber<mark style="color:red;">*</mark></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>  ∟ vat_status</td><td>Int</td><td>Sell vat status<br>0 - Follow Vat Type in Order (Default)<br>1 - No Vat<br>2- Have Vat<br>3 - Vat 0%<br>Remark: Only Merchant With Addon "Advance Vat".</td></tr><tr><td>  ∟ totalprice<mark style="color:red;">*</mark></td><td>Double</td><td>Total Price</td></tr><tr><td>  ∟ producttype</td><td>Int</td><td>Product Type<br>0 - Product (Default)<br>1 - Service</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>vattype</td><td>Int</td><td>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.</td></tr><tr><td>isCOD</td><td>Boolean</td><td>COD Status</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>customercode</td><td>String</td><td>Customer Code</td></tr><tr><td>agent</td><td>Agent</td><td>Agent Detail</td></tr><tr><td>  ∟ name</td><td>String</td><td>Agent Name</td></tr><tr><td>  ∟ phone</td><td>String</td><td>Agent Phone</td></tr><tr><td>  ∟ email</td><td>String</td><td>Agent Email</td></tr><tr><td>  ∟ address</td><td>String</td><td>Agent Address</td></tr><tr><td>expiredate</td><td>String</td><td>Expired Date<br>Ex. "2021-09-15"</td></tr><tr><td>properties</td><td>Property (Array)</td><td>Custom Properties List</td></tr><tr><td>  ∟ id</td><td>Int</td><td><p>Property ID</p><p>*Must have either id or name</p></td></tr><tr><td>  ∟ value</td><td>String</td><td>Property Value</td></tr><tr><td>  ∟ name</td><td>String</td><td><p>Property Name Require if id = 0 or null</p><p>*Must have either id or name</p></td></tr></tbody></table>

{% 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  | Order ID            |
| {% endtab %} |      |                     |

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

```json
{
  "number": "SO-0001",
  "orderdate": "2021-05-31",
  "amount": 68,
  "shippingamount": 10,
  "vatamount": 0,
  "paymentmethod": "Cash",
  "paymentamount": 50,
  "list": [
    {
      "sku": "P0001",
      "name": "Product1",
      "number": 24,
      "pricepernumber": 2,
      "discount": "0",
      "totalprice": 48
    },
    {
      "sku": "P0002",
      "name": "Product2",
      "number": 1,
      "pricepernumber": 10,
      "discount": "0",
      "totalprice": 10
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Update Order Status

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

Update status of order.

#### Query Parameters

| Name          | Type   | Description                                                                                 |
| ------------- | ------ | ------------------------------------------------------------------------------------------- |
| id            | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                                       |
| status        | int    | <p>1 = Success (Default) <br>3 = Waiting<br>4 = Returned<br>5 = Packed <br>6 = Shipping</p> |
| warehousecode | String | Warehouse Code                                                                              |
| number        | String | <p>Order 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 Order Payment

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

Update payment of order.

#### Query Parameters

| Name                                            | Type   | Description                                                                         |
| ----------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| id                                              | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| verifyslipid                                    | Int    | Verify Slip ID                                                                      |
| paymentdate                                     | String | <p>Payment Datetime <br>Ex. “2021-09-15 21:05”</p>                                  |
| paymentamount<mark style="color:red;">\*</mark> | Double | Payment Amount                                                                      |
| paymentmethod<mark style="color:red;">\*</mark> | String | Payment Method                                                                      |
| number                                          | String | <p>Order 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 %} |        |                                       |

## Verify Slip

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

Verify slip of order.

#### Query Parameters

| Name                                       | Type   | Description                                                                         |
| ------------------------------------------ | ------ | ----------------------------------------------------------------------------------- |
| id                                         | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| filename<mark style="color:red;">\*</mark> | String | File Name                                                                           |
| number                                     | String | <p>Order 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      |
| -------------------------------------- | ---- | ---------------- |
| file<mark style="color:red;">\*</mark> | File | File Binary Data |

{% 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 Order

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

Update partial product of order.

#### Query Parameters

| Name          | Type   | Description                                                                         |
| ------------- | ------ | ----------------------------------------------------------------------------------- |
| id            | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| warehousecode | String | Warehouse Code                                                                      |
| number        | String | <p>Order 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                                                                                   |
| ------------------------------------------ | -------------------- | --------------------------------------------------------------------------------------------- |
|                                            | OrderProduct (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 Order Info

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

Edit order info.

#### Query Parameters

| Name   | Type   | Description                                                                         |
| ------ | ------ | ----------------------------------------------------------------------------------- |
| id     | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| number | String | <p>Order 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         | Order Number                                |
| trackingno         | String         | Tracking No                                 |
| shippingemail      | String         | Shipping Email                              |
| shippingphone      | String         | Shipping Phone                              |
| shippingaddress    | String         | Shipping Address                            |
| shippingname       | String         | Shipping Name                               |
| shippingdate       | String         | <p>Shipping Date</p><p>Ex. “2021-09-15”</p> |
| shippingchannel    | String         | Shipping Channel                            |
| customeraddress    | String         | Customer Address                            |
| customerphone      | String         | Customer Phone                              |
| customeremail      | String         | Customer Email                              |
| customeridnumber   | String         | Customer ID Number/Tax ID                   |
| customername       | String         | Customer Name                               |
| orderdate          | String         | <p>Order Date<br>Ex. “2021-09-15”</p>       |
| tag                | String (Array) | Tag List (Array)                            |
| saleschannel       | String         | Sales Channel                               |
| description        | String         | Description                                 |
| customercode       | String         | Customer Code                               |
| customerbranchno   | String         | Customer Branch No                          |
| customerbranchname | String         | Customer Branch Name                        |
| agent              | Agent          | Agent Detail                                |
| ∟ name             | String         | Agent Name                                  |
| ∟ phone            | String         | Agent Phone                                 |
| ∟ email            | String         | Agent Email                                 |
| ∟ address          | String         | Agent Address                               |
| expiredate         | String         | <p>Expired Date<br>Ex. “2021-09-15”</p>     |
| reference          | String         | Reference                                   |

{% 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": "SO-0001",
  "orderdate": "2021-05-31"
}
```

{% endtab %}
{% endtabs %}

## Edit Order

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

Edit order.

#### Query Parameters

| Name   | Type   | Description                                                                         |
| ------ | ------ | ----------------------------------------------------------------------------------- |
| id     | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| number | String | <p>Order 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

<table><thead><tr><th width="299">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>number</td><td>String</td><td>Order Number</td></tr><tr><td>customerbranchno</td><td>String</td><td>Customer Branch No</td></tr><tr><td>customerbranchname</td><td>String</td><td>Customer Branch Name</td></tr><tr><td>customeraddress</td><td>String</td><td>Customer Address</td></tr><tr><td>customerphone</td><td>String</td><td>Customer Phone</td></tr><tr><td>customeremail</td><td>String</td><td>Customer Email</td></tr><tr><td>customeridnumber</td><td>String</td><td>Customer ID Number/Tax ID</td></tr><tr><td>customername</td><td>String</td><td>Customer Name</td></tr><tr><td>customercode</td><td>String</td><td>Customer Code</td></tr><tr><td>shippingphone</td><td>String</td><td>Shipping Phone</td></tr><tr><td>shippingaddress</td><td>String</td><td>Shipping Address</td></tr><tr><td>shippingname</td><td>String</td><td>Shipping Name</td></tr><tr><td>shippingdate</td><td>String</td><td><p>Shipping Date</p><p>Ex. “2021-09-15”</p></td></tr><tr><td>shippingchannel</td><td>String</td><td>Shipping Channel</td></tr><tr><td>expiredate</td><td>String</td><td>Expired Date<br>Ex. “2021-09-15”</td></tr><tr><td>orderdate</td><td>String</td><td>Order Date<br>Ex. “2021-09-15”</td></tr><tr><td>trackingno</td><td>String</td><td>Tracking No</td></tr><tr><td>shippingemail</td><td>String</td><td>Shipping Email</td></tr><tr><td>saleschannel</td><td>String</td><td>Sales Channel</td></tr><tr><td>description</td><td>String</td><td>Description</td></tr><tr><td>reference</td><td>String</td><td>Reference</td></tr><tr><td>tag</td><td>String (Array)</td><td>Tag List (Array)</td></tr><tr><td>amount<mark style="color:red;">*</mark></td><td>Double</td><td>Net Amount</td></tr><tr><td>agent</td><td>Agent</td><td>Agent Detail</td></tr><tr><td>  ∟ name</td><td>String</td><td>Agent Name</td></tr><tr><td>  ∟ phone</td><td>String</td><td>Agent Phone</td></tr><tr><td>  ∟ email</td><td>String</td><td>Agent Email</td></tr><tr><td>  ∟ address</td><td>String</td><td>Agent Address</td></tr><tr><td>shippingamount</td><td>Double</td><td>Shipping Amount</td></tr><tr><td>vattype</td><td>Int</td><td>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.</td></tr><tr><td>vatamount</td><td>Double</td><td>Vat Amount</td></tr><tr><td>shippingvat</td><td>Int</td><td>Shipping Vat Status <br>0 - No Shipping Vat (Default) <br>1 – Have Shipping Vat</td></tr><tr><td>discount</td><td>String</td><td>Discount <br>Ex. 5.00, 10%</td></tr><tr><td>list</td><td>OrderProduct (Array)</td><td>Product List</td></tr><tr><td>  ∟ sku<mark style="color:red;">*</mark></td><td>String</td><td>Product Sku</td></tr><tr><td>  ∟ name<mark style="color:red;">*</mark></td><td>String</td><td>Product Name</td></tr><tr><td>  ∟ number<mark style="color:red;">*</mark></td><td>Double</td><td>Product Quantity</td></tr><tr><td>  ∟ pricepernumber<mark style="color:red;">*</mark></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>  ∟ vat_status</td><td>Int</td><td>Sell vat status<br>0 - Follow Vat Type in Order (Default)<br>1 - No Vat<br>2- Have Vat<br>3 - Vat 0%<br>Remark: Only Merchant With Addon "Advance Vat".</td></tr><tr><td>  ∟ totalprice<mark style="color:red;">*</mark></td><td>Double</td><td>Total Price</td></tr></tbody></table>

{% 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": "SO-0001",
  "orderdate": "2021-05-31",
  "amount": 68,
  "shippingamount": 10,
  "vatamount": 0,
  "list": [
    {
      "sku": "P0001",
      "name": "Product1",
      "number": 24,
      "pricepernumber": 2,
      "discount": "0",
      "totalprice": 48
    },
    {
      "sku": "P0002",
      "name": "Product2",
      "number": 1,
      "pricepernumber": 10,
      "discount": "0",
      "totalprice": 10
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Void Order

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

Void order.

#### Query Parameters

| Name   | Type   | Description                                                                         |
| ------ | ------ | ----------------------------------------------------------------------------------- |
| id     | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| number | String | <p>Order 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 %} |        |                                       |

## Void Order Payment

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

Delete payment in order.

#### Query Parameters

| Name                                        | Type   | Description                                                                         |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| id                                          | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| paymentid<mark style="color:red;">\*</mark> | Int    | Payment ID                                                                          |
| number                                      | String | <p>Order 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" %}

<table><thead><tr><th width="161.4">Parameter</th><th width="150">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>resCode</td><td>String</td><td>Response Code <br>200- Success</td></tr><tr><td>resDesc</td><td>String</td><td>Response Description</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Ready To Ship

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

Ready to ship. The status will be changed to “Waiting”. If the order is from marketplace, the system will try to update order in marketplace to “Ready to ship”.

#### Query Parameters

| Name                                       | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                                         | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                                                                                                                                                                                                                                                                                                                                                                           |
| booking                                    | Int    | <p>Booking Request Status</p><p>0 - None (Default)</p><p>1 - Call shipment provider. The available shipment is “flashexpress” (Flash Express), “jtexpress” (J\&T) and “kerry” (Kerry). Support only non-marketplace order.</p>                                                                                                                                                                                                  |
| pickuptime                                 | String | <p>Shopee pickup datetime keyword for pickup.<br>Not Required for Shopee Pickup.</p><p>If this is blank, the system will choose earliest time. <br>Ex. "2026-01-31 14:00"</p>                                                                                                                                                                                                                                                   |
| address                                    | String | <p>Pickup location keyword for pickup.<br>Required if the shipment is Shopee Pickup.<br>Ex. "10420" - Postcode of pickup location.</p>                                                                                                                                                                                                                                                                                          |
| trackingno                                 | String | <p>Tracking No.</p><p>Not require if shipment by marketplace.</p>                                                                                                                                                                                                                                                                                                                                                               |
| shipment<mark style="color:red;">\*</mark> | String | <p>Shipment provider.<br><br>This is shipping channel, if the order is non-marketplace.<br>If this order is from marketplace, please specify marketplace shipment.<br>Ex.<br><strong>Shopee</strong> - "pickup" or "dropoff"<br><strong>Lazada</strong> - "lex" or default shipping channel of order.<br>If in order doesn't have shipping channel please use "lex".<br><strong>Tiktok Shop</strong>- "pickup" or "dropoff"</p> |
| warehousecode                              | String | Warehouse Code                                                                                                                                                                                                                                                                                                                                                                                                                  |
| number                                     | String | <p>Order 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                  |
| detail    | Detail | Response detail                       |

| Parameter (Detail) | Type   | Description/Example |
| ------------------ | ------ | ------------------- |
| id                 | Int    | Order ID            |
| number             | String | Order Number        |
| shippingchannel    | String | Shipping Channel    |
| trackingno         | String | Tracking No         |
| link               | String | Shipping Label Link |
| {% endtab %}       |        |                     |
| {% endtabs %}      |        |                     |

## Book Order Shipment

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

Call shipment provider. The available shipment is “flashexpress” (Flash Express), “jtexpress” (J\&T) and “kerry” (Kerry). The status will be changed to “Waiting”. Support only non- marketplace order.

#### Query Parameters

| Name                                       | Type    | Description                                                                                                                                                                                                                                                      |
| ------------------------------------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                                         | Int     | <p>Order ID</p><p>\*Must have either id or number</p>                                                                                                                                                                                                            |
| shipment<mark style="color:red;">\*</mark> | String  | <p>Shipment provider. <br>thailandpost - Thailand Post<br>flashexpress – Flash Express <br>kerry – Kerry</p><p>shopeeexpress – Shopee Express<br>dhl - DHL</p>                                                                                                   |
| number                                     | String  | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p>                                                                                                                                                                              |
| useShippingPoint                           | Boolean | <p>Define this shipment uses shipping point.<br>True : Shipping Point<br>False : Direct Payment (Default when shipment is valid.)</p><p><br><strong>Remark:</strong> Shipping Point is supported only Thailand Post, Flash Express, Shopee Exporess and DHL.</p> |
| isPickup                                   | Boolean | <p>Define this shipment is pickup.<br>True : Pickup (Default when Shipping Point of shipment is valid.)<br>False : Drop off</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 (Not Required)

if no request body, this order will use address of merchant profile and shipping/customer address in this order.

| Name              | Type                    | Description                                                              |
| ----------------- | ----------------------- | ------------------------------------------------------------------------ |
| senderName        | String                  | Sender Name                                                              |
| senderPhone       | String                  | Sender Phone                                                             |
| senderEmail       | String                  | Sender Email                                                             |
| senderAddress     | String                  | Sender Address                                                           |
| senderDistrict    | String                  | Sender District                                                          |
| senderCity        | String                  | Sender City                                                              |
| senderProvince    | String                  | Sender Province                                                          |
| senderPostcode    | String                  | Sender Postcode                                                          |
| recipientName     | String                  | Recipient Name                                                           |
| recipientPhone    | String                  | Recipient Phone                                                          |
| recipientEmail    | String                  | Recipient Email                                                          |
| recipientAddress  | String                  | Recipient Address                                                        |
| recipientDistrict | String                  | Recipient District                                                       |
| recipientCity     | String                  | Recipient City                                                           |
| recipientProvince | String                  | Recipient Province                                                       |
| recipientPostcode | String                  | Recipient Postcode                                                       |
| codAmount         | Double                  | <p>COD Amount <br>(Assign this value = 0, if this order is not COD.)</p> |
| parcelWeight      | Decimal (Not Required)  | Parcel Weight (Gram)                                                     |
| parcelWidth       | Decimall (Not Required) | Parcel Width (cm)                                                        |
| parcelLength      | Decimall (Not Required) | Parcel Length (cm)                                                       |
| parcelHeight      | Decimall (Not Required) | Parcel Height (cm)                                                       |

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

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

| Parameter (Detail) | Type   | Description/Example |
| ------------------ | ------ | ------------------- |
| id                 | Int    | Order ID            |
| number             | String | Order Number        |
| shippingchannel    | String | Shipping Channel    |
| trackingno         | String | Tracking No         |
| link               | String | Shipping Label Link |
| {% endtab %}       |        |                     |
| {% endtabs %}      |        |                     |

## Update Order Serial No

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

Update serial number of order.

#### Query Parameters

| Name                                       | Type   | Description                                                                                   |
| ------------------------------------------ | ------ | --------------------------------------------------------------------------------------------- |
| id                                         | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                                         |
| serialno<mark style="color:red;">\*</mark> | String | Serial Number                                                                                 |
| sku                                        | String | <p>Product Sku Require if productid = 0 or null</p><p>\*Must have either productid or sku</p> |
| productid                                  | Int    | <p>Product ID</p><p>\*Must have either productid or sku</p>                                   |
| number                                     | String | <p>Order 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 %} |        |                                       |

## Update Order Expiry/Lot

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

Update expiry/lot of order.

#### Query Parameters

| Name                                        | Type   | Description                                                                                   |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| id                                          | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                                         |
| lotnumber<mark style="color:red;">\*</mark> | Double | Lot Number                                                                                    |
| lot<mark style="color:red;">\*</mark>       | String | Lot Name                                                                                      |
| sku                                         | String | <p>Product Sku Require if productid = 0 or null</p><p>\*Must have either productid or sku</p> |
| productid                                   | Int    | <p>Product ID</p><p>\*Must have either productid or sku</p>                                   |
| number                                      | String | <p>Order 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 %} |        |                                       |

## Add Expense Order

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

Add expense to order.

#### Query Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | Int  | Order 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  |

#### Request Body

| Name                                          | Type   | Description                                                     |
| --------------------------------------------- | ------ | --------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>        | String | Expense Name                                                    |
| paymentname<mark style="color:red;">\*</mark> | String | Payment Method                                                  |
| amount<mark style="color:red;">\*</mark>      | Double | Amount                                                          |
| isvat                                         | Int    | <p>Vat Status<br>0 - No Vat (Default)</p><p>1 - Include Vat</p> |

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

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

## Add Order Tag

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

Add tag to order.

#### Query Parameters

| Name                                  | Type   | Description                                                                         |
| ------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| id                                    | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| tag<mark style="color:red;">\*</mark> | String | Tag                                                                                 |
| number                                | String | <p>Order 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 %} |        |                                       |

## Delete Order Tag

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

Delete tag of order.

#### Query Parameters

| Name                                  | Type   | Description                                                                         |
| ------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| id                                    | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| tag<mark style="color:red;">\*</mark> | String | Tag                                                                                 |
| number                                | String | <p>Order 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 %} |        |                                       |

## Add Voucher Order

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

Add voucher to order.

#### Query Parameters

| Name         | Type   | Description                                                                                 |
| ------------ | ------ | ------------------------------------------------------------------------------------------- |
| id           | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                                       |
| number       | String | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p>         |
| 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                                            |
| ------ | ------ | ------------------------------------------------------ |
| name   | String | <p>Voucher Name<br>- Voucher<br>- Coin<br>- Rebate</p> |
| amount | Double | Voucher Amount-                                        |

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

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

## Delete Voucher Order

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

Delete voucher of order.

#### Query Parameters

| Name                                        | Type   | Description                                                                         |
| ------------------------------------------- | ------ | ----------------------------------------------------------------------------------- |
| id                                          | Int    | <p>Order ID</p><p>\*Must have either id or number</p>                               |
| number                                      | String | <p>Order Number Require if id = 0 or null</p><p>\*Must have either id or number</p> |
| voucherid<mark style="color:red;">\*</mark> | Int    | Voucher Order 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                   |
| ------------- | ------ | ------------------------------------- |
| resCode       | String | <p>Response Code <br>200- Success</p> |
| resDesc       | String | Response Description                  |
| {% endtab %}  |        |                                       |
| {% endtabs %} |        |                                       |
