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

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

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

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

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

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

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

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

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

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

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

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

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

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