# Product

## Get Products

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

Get list of products.

#### Query Parameters

| Name                                      | Type   | Description                                             |
| ----------------------------------------- | ------ | ------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETPRODUCTS”                                           |
| format                                    | String | json (Default), xml                                     |
| version<mark style="color:red;">\*</mark> | String | 3                                                       |
| warehousecode                             | String | Warehouse Code                                          |
| createdafter                              | String | Created Date After …..                                  |
| createdbefore                             | String | Created Date Before …..                                 |
| updatedafter                              | String | Updated Date After …..                                  |
| updatedbefore                             | String | Updated Date Before …..                                 |
| keyword                                   | String | Keyword to search at least 3 characters                 |
| searchsku                                 | String | Keyword of SKU to search                                |
| variationid                               | Int    | Variation ID                                            |
| categoryid                                | Int    | Category ID                                             |
| activestatus                              | Int    | <p>Active status (Default = All)<br>1 = Active only</p> |
| page                                      | Int    | Page (Default = 1)                                      |
| limit                                     | Int    | Limit per page (Max = 2000)                             |

#### Headers

| Name                                        | Type   | Description                              |
| ------------------------------------------- | ------ | ---------------------------------------- |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret                               |
| storename<mark style="color:red;">\*</mark> | String | Store Name                               |
| apikey<mark style="color:red;">\*</mark>    | String | API Key                                  |
| skulist                                     | String | <p>Sku List <br>Ex. P0001,P0002</p>      |
| productidlist                               | String | <p>Product ID List <br>Ex. 1234,5678</p> |

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

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

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |

| Variant (Array) | Type   | Description/Example |
| --------------- | ------ | ------------------- |
| variantid       | Int    | Variant ID          |
| variantname     | String | Variant Name        |
| name            | String | Attribute Name      |

| Product (Array) | Type             | Description/Example    |
| --------------- | ---------------- | ---------------------- |
| id              | Int              | Product ID             |
| name            | String           | Product Name           |
| description     | String           | Description            |
| sku             | String           | Product Sku            |
| sellprice       | String           | Sell price             |
| purchaseprice   | String           | Purchase price         |
| barcode         | String           | Barcode                |
| stock           | String           | Stock                  |
| availablestock  | String           | Available Stock        |
| unittext        | String           | Unit                   |
| imagepath       | String           | Image Url              |
| weight          | String           | Weight (Gram)          |
| width           | String           | Width (CM)             |
| length          | String           | Length (CM)            |
| height          | String           | Height (CM)            |
| categoryid      | Int              | Category ID            |
| category        | String           | Category Name          |
| variationid     | Int              | Variation ID           |
| variant         | Variant (Array)  | Variant List (Array)   |
| tag             | String (Array)   | Tag List (Array)       |
| active          | Boolean          | Active status          |
| imageList       | String (Array)   | Image Url List         |
| properties      | Property (Array) | Custom Properties List |

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

## Get Product Detail

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

Get product detail.

#### Query Parameters

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

#### Headers

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

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

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

| Property (Array) | Type   | Description/Example |
| ---------------- | ------ | ------------------- |
| id               | Int    | Property ID         |
| name             | String | Property Name       |
| value            | String | Property Value      |

| Variant (Array) | Type   | Description/Example |
| --------------- | ------ | ------------------- |
| variantid       | Int    | Variant ID          |
| variantname     | String | Variant Name        |
| name            | String | Attribute Name      |

| Parameter      | Type             | Description/Example    |
| -------------- | ---------------- | ---------------------- |
| id             | Int              | Product ID             |
| name           | String           | Product Name           |
| description    | String           | Description            |
| sku            | String           | Product Sku            |
| sellprice      | String           | Sell price             |
| purchaseprice  | String           | Purchase price         |
| barcode        | String           | Barcode                |
| stock          | String           | Stock                  |
| availablestock | String           | Available Stock        |
| unittext       | String           | Unit                   |
| imagepath      | String           | Image Url              |
| weight         | String           | Weight (Gram)          |
| width          | String           | Width (CM)             |
| length         | String           | Length (CM)            |
| height         | String           | Height (CM)            |
| categoryid     | Int              | Category ID            |
| category       | String           | Category Name          |
| variationid    | Int              | Variation ID           |
| variant        | Variant (Array)  | Variant List (Array)   |
| tag            | String (Array)   | Tag List (Array)       |
| active         | Boolean          | Active status          |
| imageList      | String (Array)   | Image Url List         |
| properties     | Property (Array) | Custom Properties List |

## Get Bundles

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

Get list of bundle products.

#### Query Parameters

| Name                                      | Type   | Description                                             |
| ----------------------------------------- | ------ | ------------------------------------------------------- |
| method<mark style="color:red;">\*</mark>  | String | “GETBUNDLES”                                            |
| format                                    | String | json (Default), xml                                     |
| version<mark style="color:red;">\*</mark> | String | 3                                                       |
| warehousecode                             | String | Warehouse Code                                          |
| keyword                                   | String | Keyword to search at least 3 characters                 |
| activestatus                              | Int    | <p>Active status (Default = All)<br>1 = Active only</p> |
| page                                      | Int    | Page (Default = 1)                                      |
| limit                                     | Int    | Limit per page (Max = 2000)                             |

#### Headers

| Name                                        | Type   | Description                             |
| ------------------------------------------- | ------ | --------------------------------------- |
| apisecret<mark style="color:red;">\*</mark> | String | API Secret                              |
| storename<mark style="color:red;">\*</mark> | String | Store Name                              |
| apikey<mark style="color:red;">\*</mark>    | String | API Key                                 |
| bundleidlist                                | String | <p>Bundle ID List <br>Ex. 1234,5678</p> |

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

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

| Bundle (Array) | Type    | Description/Example |
| -------------- | ------- | ------------------- |
| id             | Int     | Bundle ID           |
| name           | String  | Bundle Name         |
| sku            | String  | Bundle Sku          |
| sellprice      | String  | Sell price          |
| stock          | String  | Stock               |
| availablestock | String  | Available Stock     |
| imagepath      | String  | Image Url           |
| active         | Boolean | Active status       |

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

## Get Bundle Detail

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

Get list of products in bundle.

#### Query Parameters

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

#### Headers

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

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

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

| ProductBundle (Array) | Type   | Description/Example |
| --------------------- | ------ | ------------------- |
| id                    | Int    | Product ID          |
| name                  | String | Product Name        |
| sku                   | String | Product Sku         |
| quantity              | Double | Product Quantity    |

| Parameter      | Type                  | Description/Example |
| -------------- | --------------------- | ------------------- |
| id             | Int                   | Bundle ID           |
| name           | String                | Bundle Name         |
| sku            | String                | Bundle Sku          |
| sellprice      | String                | Sell price          |
| stock          | String                | Stock               |
| availablestock | String                | Available Stock     |
| imagepath      | String                | Image Url           |
| active         | Boolean               | Active status       |
| list           | ProductBundle (Array) | Product List        |
| imageList      | String (Array)        | Image Url List      |

## Get Variations

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

Get list of variation products.

#### Query Parameters

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

#### Headers

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

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

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

| Variant (Array) | Type   | Description/Example |
| --------------- | ------ | ------------------- |
| variantid       | Int    | Variant ID          |
| variantname     | String | Variant Name        |

| Variation (Array) | Type            | Description/Example  |
| ----------------- | --------------- | -------------------- |
| id                | Int             | Variation ID         |
| sku               | String          | Variation Sku        |
| name              | String          | Variation Name       |
| variants          | Variant (Array) | Variant List (Array) |

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

## Add Product

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

Add product.

#### Query Parameters

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

#### Headers

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

#### Request Body

| Name                                   | Type             | Description                                                                        |
| -------------------------------------- | ---------------- | ---------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark> | String           | Product Name                                                                       |
| description                            | String           | Description                                                                        |
| sku<mark style="color:red;">\*</mark>  | String           | Product Sku                                                                        |
| sellprice                              | String           | Sell price                                                                         |
| purchaseprice                          | String           | Purchase price                                                                     |
| barcode                                | String           | Barcode                                                                            |
| stock                                  | String           | Stock                                                                              |
| unittext                               | String           | Unit                                                                               |
| weight                                 | String           | Weight (Gram)                                                                      |
| width                                  | String           | Width (CM)                                                                         |
| length                                 | String           | Length (CM)                                                                        |
| height                                 | String           | Height (CM)                                                                        |
| tag                                    | String(Array)    | Tag List (Array)                                                                   |
| category                               | String           | Category Name                                                                      |
| properties                             | Property (Array) | Custom Properties List                                                             |
| ∟ name                                 | String           | <p>Property Name Require if id = 0 or null</p><p>\*Must have either id or name</p> |
| ∟ id                                   | Int              | <p>Property ID</p><p>\*Must have either id or name</p>                             |
| ∟ value                                | String           | Property Value                                                                     |

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

{% endtab %}

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

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

```
{
  "sku": "P0001",
  "name": "Product1",
  "sellprice": "20.00",
  "purchaseprice": "10.00",
  "unittext": "Piece",
  "weight": "500",
  "barcode": "1234",
  "category": "test category"
}
```

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

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

## Update Product

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

Edit product info.

#### Query Parameters

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

#### Headers

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

#### Request Body

| Name                                  | Type          | Description      |
| ------------------------------------- | ------------- | ---------------- |
| name                                  | String        | Product Name     |
| description                           | String        | Description      |
| tag                                   | String(Array) | Tag List (Array) |
| height                                | String        | Height (CM)      |
| length                                | String        | Length (CM)      |
| width                                 | String        | Weight (CM)      |
| weight                                | String        | Weight (Gram)    |
| unittext                              | String        | Unit             |
| barcode                               | String        | Barcode          |
| purchaseprice                         | String        | Purchase price   |
| sellprice                             | String        | Sell price       |
| sku<mark style="color:red;">\*</mark> | String        | Product Sku      |
| category                              | String        | Category Name    |

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

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

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

## Update Product Image

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

Edit product image.

#### Query Parameters

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

#### Headers

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

#### Request Body

| Name                                   | Type | Description      |
| -------------------------------------- | ---- | ---------------- |
| file<mark style="color:red;">\*</mark> | File | File Binary Data |

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

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

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

## Update Product Stock List

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

Adjust current inventory of product.

#### Query Parameters

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

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

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

{% endtab %}

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

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

```
{
  "stocks": [
    {
      "sku": "P0001",
      "stock": 10,
      "cost": 100
    }
  ]
}
```

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

| Stock     | Type   | Description/Example |
| --------- | ------ | ------------------- |
| productid | Int    | Product ID          |
| sku       | String | Product Sku         |
| stock     | Double | Stock               |

| StockUpdate   | Type          | Description/Example       |
| ------------- | ------------- | ------------------------- |
| success       | Int           | Total success number      |
| fail          | Int           | Total failure number      |
| notupdate     | Int           | Total not updating number |
| successlist   | Stock (Array) | Stock List (Array)        |
| faillist      | Stock (Array) | Stock List (Array)        |
| notupdatelist | Stock (Array) | Stock List (Array)        |

| Detail      | Type        | Description/Example   |
| ----------- | ----------- | --------------------- |
| stockupdate | StockUpdate | Stock Updating Result |

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

## Increase Product Stock List

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

Increase inventory of product.

#### Query Parameters

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

#### 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                                                                                   |
| ----------------------------------------- | ------------- | --------------------------------------------------------------------------------------------- |
| stocks<mark style="color:red;">\*</mark>  | Stock (Array) | Stock List (Array)                                                                            |
| ∟ 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> |
| ∟ stock<mark style="color:red;">\*</mark> | Double        | Stock to increase                                                                             |
| ∟ cost                                    | Double        | Cost Per Unit                                                                                 |

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

{% endtab %}

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

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

```
{
  "stocks": [
    {
      "sku": "P0001",
      "stock": 10,
      "cost": 100
    }
  ]
}
```

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

| Stock     | Type   | Description/Example |
| --------- | ------ | ------------------- |
| productid | Int    | Product ID          |
| sku       | String | Product Sku         |
| stock     | Double | Stock               |

| StockUpdate   | Type          | Description/Example       |
| ------------- | ------------- | ------------------------- |
| success       | Int           | Total success number      |
| fail          | Int           | Total failure number      |
| notupdate     | Int           | Total not updating number |
| successlist   | Stock (Array) | Stock List (Array)        |
| faillist      | Stock (Array) | Stock List (Array)        |
| notupdatelist | Stock (Array) | Stock List (Array)        |

| Detail      | Type        | Description/Example   |
| ----------- | ----------- | --------------------- |
| stockupdate | StockUpdate | Stock Updating Result |

<table><thead><tr><th width="150">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><tr><td>detail</td><td>Detail</td><td>Detail</td></tr></tbody></table>

## Decrease Product Stock List

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

Decrease inventory of product.

#### Query Parameters

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

#### 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                                                                                   |
| ----------------------------------------- | ------------- | --------------------------------------------------------------------------------------------- |
| stocks<mark style="color:red;">\*</mark>  | Stock (Array) | Stock List (Array)                                                                            |
| ∟ 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> |
| ∟ stock<mark style="color:red;">\*</mark> | Double        | Stock to decrease                                                                             |
| ∟ cost                                    | Double        | Cost Per Unit                                                                                 |

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

{% endtab %}

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

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

```
{
  "stocks": [
    {
      "sku": "P0001",
      "stock": 10,
      "cost": 100
    }
  ]
}
```

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

<table><thead><tr><th width="195">Stock</th><th width="189.33333333333334">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>stock</td><td>Double</td><td>Stock</td></tr></tbody></table>

<table><thead><tr><th width="199.33333333333334">StockUpdate</th><th width="187">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>success</td><td>Int</td><td>Total success number</td></tr><tr><td>fail</td><td>Int</td><td>Total failure number</td></tr><tr><td>notupdate</td><td>Int</td><td>Total not updating number</td></tr><tr><td>successlist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr><tr><td>faillist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr><tr><td>notupdatelist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr></tbody></table>

<table><thead><tr><th width="196">Detail</th><th width="186.33333333333334">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>stockupdate</td><td>StockUpdate</td><td>Stock Updating Result</td></tr></tbody></table>

<table><thead><tr><th width="159.16618017145717">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><tr><td>detail</td><td>Detail</td><td>Detail</td></tr></tbody></table>

## Update Product Available Stock List

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

Adjust available/sellable inventory of product.

#### Query Parameters

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

#### 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                                                                                   |
| ----------------------------------------- | ------------- | --------------------------------------------------------------------------------------------- |
| stocks<mark style="color:red;">\*</mark>  | Stock (Array) | Stock List (Array)                                                                            |
| ∟ productid                               | Int           | <p>Product ID</p><p>\*Must have either productid or sku</p>                                   |
| ∟ stock<mark style="color:red;">\*</mark> | Double        | Available Stock                                                                               |
| ∟ cost                                    | Double        | Cost Per Unit                                                                                 |
| ∟ sku                                     | String        | <p>Product Sku Require if productid = 0 or null</p><p>\*Must have either productid or sku</p> |

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

{% endtab %}

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

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

```
{
  "stocks": [
    {
      "sku": "P0001",
      "stock": 10,
      "cost": 100
    }
  ]
}
```

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

<table><thead><tr><th>Stock</th><th width="203.33333333333334">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>stock</td><td>Double</td><td>Stock</td></tr></tbody></table>

<table><thead><tr><th>StockUpdate</th><th width="195.33333333333334">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>success</td><td>Int</td><td>Total success number</td></tr><tr><td>fail</td><td>Int</td><td>Total failure number</td></tr><tr><td>notupdate</td><td>Int</td><td>Total not updating number</td></tr><tr><td>successlist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr><tr><td>faillist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr><tr><td>notupdatelist</td><td>Stock (Array)</td><td>Stock List (Array)</td></tr></tbody></table>

<table><thead><tr><th>Detail</th><th width="195.33333333333334">Type</th><th>Description/Example</th></tr></thead><tbody><tr><td>stockupdate</td><td>StockUpdate</td><td>Stock Updating Result</td></tr></tbody></table>

<table><thead><tr><th>Parameter</th><th width="177.33333333333334">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><tr><td>detail</td><td>Detail</td><td>Detail</td></tr></tbody></table>

## Delete Product

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

Delete product.

#### Query Parameters

| Name    | Type   | Description         |
| ------- | ------ | ------------------- |
| method  | String | “DELETEPRODUCT”     |
| format  | String | json (Default), xml |
| version | String | 3                   |

#### Headers

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

#### Request Body

| Name                                  | Type   | Description |
| ------------------------------------- | ------ | ----------- |
| sku<mark style="color:red;">\*</mark> | String | Product SKU |

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

{% endtab %}

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

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

```
{
  "sku": "P0001"
}
```

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

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

## Add Bundle

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

Add bundle.

#### Query Parameters

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

#### Headers

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

#### Request Body

| Name                                         | Type                  | Description                                                                     |
| -------------------------------------------- | --------------------- | ------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>       | String                | Bundle Name                                                                     |
| sku<mark style="color:red;">\*</mark>        | String                | Bundle Sku                                                                      |
| sellprice<mark style="color:red;">\*</mark>  | String                | Sell price                                                                      |
| list<mark style="color:red;">\*</mark>       | ProductBundle (Array) | Product List                                                                    |
| ∟ id                                         | Int                   | <p>Product ID</p><p>\*Must have either id or sku</p>                            |
| ∟ sku                                        | String                | <p>Product Sku Require if id = 0 or null</p><p>\*Must have either id or sku</p> |
| ∟ quantity<mark style="color:red;">\*</mark> | Double                | Product Quantity                                                                |

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

{% endtab %}

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

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

```
{
    "sku": "SET0001",
    "name": "Bundle 001",
    "sellprice": 100,
    "list":    
    [
        {
            "sku": "P0001",
            "quantity": 2
        },
        {
            "id": 1234,
            "quantity": 3
        }
    ]
}
```

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

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


---

# Agent Instructions: Querying This Documentation

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

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

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

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

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