> For the complete documentation index, see [llms.txt](https://doc.blowhorn.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.blowhorn.com/api-docs/wms-inventory/sku.md).

# SKU

Stock Keeping Unit or SKU is the product information in the warehouse. Its a template of the product is and how can be linked with location to manifest to an inventory or stock

## Fetch SKUs

<mark style="color:blue;">`GET`</mark> `/wms/skus`

This api returns all or a set of SKUs configured depending on the filter criteria passed or not. **Note** when more than one below parameters are sent the result will be filtered matching all the parameters and not any one. so filter should be applied accordingly or else result would be empty if all conditions are not met.

#### Query Parameters

| Name         | Type   | Description                                                         |
| ------------ | ------ | ------------------------------------------------------------------- |
| name         | String | Partial or full text matching name of the SKU like 'Wires'          |
| client\_name | String | Client name like 'ABC Corp'                                         |
| sku\_number  | String | sku\_number like 'SKU-2294XOV'                                      |
| description  | String | Partial or full text matching the description of the SKU.           |
| id           | String | Blowhorn assigned/supplied integer unique id for the SKU like 12345 |

#### Headers

| Name                                       | Type   | Description                              |
| ------------------------------------------ | ------ | ---------------------------------------- |
| API\_KEY<mark style="color:red;">\*</mark> | String | API key obtained by the Customer/Partner |

{% tabs %}
{% tab title="200: OK Response for no search criteria or matching criteria" %}

```json
{
    "count":2,
    "previous":null,
    "next":0,
    "result":[
        {
            "id":111,
            "supplier_name":"Default Supplier",
            "client_name":"Default Client",
            "pack_config_name":"Box of 25",
            "created_date":"2022-03-09T15:44:02.403935+05:30",
            "modified_date":"2022-03-09T15:44:02.411864+05:30",
            "name":"Wires",
            "sku_number":"SKU-227S9TD",
            "ean":null,
            "upc":null,
            "description":null,
            "each_weight":"5.00",
            "each_volume":"200.00",
            "has_expiry":false,
            "shelf_life":null,
            "shelf_life_uom":null,
            "requires_putaway":true,
            "uom":"KG",
            "file":null,
            "mrp":"95.0",
            "discounts":"0.00",
            "discount_type":"fixed",
            "is_kit_sku":false,
            "requires_shipping":true,
            "created_by":null,
            "modified_by":null,
            "product_group":null,
            "pack_config":4,
            "supplier":4,
            "client":4,
            "each_dimension":null,
            "base_price": "100",
            "cost_price": "100",
            "isbn": null,
            "tax_type_code": null
        },
        {
            "id":111099,
            "supplier_name":"Default Supplier",
            "client_name":"Default Client",
            "pack_config_name":"Box of 25",
            "created_date":"2022-03-09T15:44:02.356697+05:30",
            "modified_date":"2022-03-09T15:44:02.367905+05:30",
            "name":"Wall Fit",
            "sku_number":"SKU-227S9TM",
            "ean":null,
            "upc":null,
            "description":null,
            "each_weight":"10.00",
            "each_volume":"1000.00",
            "has_expiry":false,
            "shelf_life":null,
            "shelf_life_uom":null,
            "requires_putaway":true,
            "uom":"KG",
            "file":null,
            "mrp":"85.0"            ,
            "discounts":"0.00",
            "discount_type":"fixed",
            "is_kit_sku":false,
            "requires_shipping":true,
            "created_by":null,
            "modified_by":null,
            "product_group":null,
            "pack_config":4,
            "supplier":4,
            "client":4,
            "each_dimension":null,
            "base_price": "100",
            "cost_price": "100",
            "isbn": null,
            "tax_type_code": null
        }
}
```

{% endtab %}

{% tab title="200: OK No SKUs found for the search criteria" %}

```javascript
{
    "count": 0,
    "previous": null,
    "next": 0,
    "result": []
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized/Validation Error" %}

```javascript
{
  "status": "FAIL",
  "message": "Unauthorized"
}
```

{% endtab %}
{% endtabs %}

## Create SKUs

<mark style="color:green;">`POST`</mark> `/wms/skus`

This API is for creating new SKUs.

#### Headers

| Name                                       | Type | Description                              |
| ------------------------------------------ | ---- | ---------------------------------------- |
| API\_KEY<mark style="color:red;">\*</mark> |      | API key obtained by the Customer/Partner |

#### Request Body

| Name                                          | Type    | Description                                                                                                                                                                                                                                                                                                                                      |
| --------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name<mark style="color:red;">\*</mark>        |         | Unique text identifier of the SKU for the client                                                                                                                                                                                                                                                                                                 |
| client\_name                                  | String  | <p>Warehouse Client name to which the item belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>client</strong> or <strong>client\_name</strong> or both can be provided for identifying a <strong>client</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>   |
| id                                            | integer | An identifier will be randomly generated by Blowhorn. You can optionally override this ID, but the ID must be unique across all SKUs in your account.                                                                                                                                                                                            |
| description<mark style="color:red;">\*</mark> | String  | SKU description.                                                                                                                                                                                                                                                                                                                                 |
| ean\_code                                     | String  | European Article Number - A barcode for product identification (which helps manufacturers identify how many products have been sold once a sale is made). It is 13 digits long.                                                                                                                                                                  |
| upc                                           | String  | Universal Product Code – Barcode for product identification which is used across the world. It is 12 digits long.                                                                                                                                                                                                                                |
| product\_group                                | String  | <p>Product Group id to which the SKU belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>product\_group</strong> or <strong>product\_group\_name</strong> or both can be provided for identifying a product group to associate this SKU or else both can be left empty if need not to associate with any.</p>   |
| pack\_config                                  | String  | <p>The packaging details id for the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>pack\_config</strong> or <strong>pack\_config\_name</strong> or both can be provided for identifying a package config to associate this SKU or else both can be left empty if need not to associate with any.</p>           |
| supplier                                      | integer | <p>Supplier id of the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>supplier</strong> or <strong>supplier\_name</strong> or both can be provided for identifying a <strong>supplier</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                      |
| client                                        | String  | <p>Warehouse Client id to which the item belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>client</strong> or <strong>client\_name</strong> or both can be provided for identifying a <strong>client</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>     |
| each\_weight                                  | String  | The weight of the SKU in kgs without packaging                                                                                                                                                                                                                                                                                                   |
| each\_dimension                               | String  | Product Dimensions Format: LxBxH, Unit: mm, Eg: 60X40X20                                                                                                                                                                                                                                                                                         |
| each\_volume                                  | String  | The width of the SKU in cubic meters.                                                                                                                                                                                                                                                                                                            |
| has\_expiry                                   | String  | If the SKU has an expiry or not                                                                                                                                                                                                                                                                                                                  |
| shelf\_life                                   | String  | Duration of time that a product may be stored without becoming unfit for use, consumption, or sale                                                                                                                                                                                                                                               |
| shelf\_life\_uom                              | String  | Days, Months, Years etc. Note this is case sensitive and enumerated.                                                                                                                                                                                                                                                                             |
| mrp                                           | String  | Maximum Retail Price. How much is the maximum price at which the product is being sold.                                                                                                                                                                                                                                                          |
| discounts                                     | String  | Mention the discount value that needs to be provided                                                                                                                                                                                                                                                                                             |
| discount\_type                                | String  | Type of discount provided i.e Fixed or Percentage                                                                                                                                                                                                                                                                                                |
| is\_kit\_sku                                  | boolean | A Kit SKU an SKU that either has multiple units of an underlying SKU ( Pack or Multi-Pack) or multiple underlying SKUs (Bundle)                                                                                                                                                                                                                  |
| sku\_number                                   | String  | Unique SKU identifier for the client. This can either provided by the client or Blowhorn generates if not provided.                                                                                                                                                                                                                              |
| product\_group\_name                          | String  | <p>Product Group name to which the SKU belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>product\_group</strong> or <strong>product\_group\_name</strong> or both can be provided for identifying a product group to associate this SKU or else both can be left empty if need not to associate with any.</p> |
| pack\_config\_name                            | String  | <p>The packaging details name for the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>pack\_config</strong> or <strong>pack\_config\_name</strong> or both can be provided for identifying a package config to associate this SKU or else both can be left empty if need not to associate with any.</p>         |
| supplier\_name                                | String  | <p>Supplier name of the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>supplier</strong> or <strong>supplier\_name</strong> or both can be provided for identifying a <strong>supplier</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                    |
| requires\_putaway                             | boolean | Flag to indicate if this SKU does not need to be stored and needs to be putaway for  cross dock shipping.                                                                                                                                                                                                                                        |
| uom                                           | String  | <p>Unit of weight of the inventory items. </p><p>Ex: <strong>KG</strong> or <strong>GM</strong></p>                                                                                                                                                                                                                                              |
| base\_price                                   | Decimal | Base price of the SKU excluding tax and discounts.                                                                                                                                                                                                                                                                                               |
| cost\_price                                   | Decimal | Cost price of the SKU which is excluding all discounts ?                                                                                                                                                                                                                                                                                         |
| isbn                                          | String  | ISBN number of the product                                                                                                                                                                                                                                                                                                                       |
| tax\_type\_code                               | String  | Tax type code                                                                                                                                                                                                                                                                                                                                    |

{% tabs %}
{% tab title="200: OK Successful creation of SKU" %}

```json
{
    "status": "PASS",
    "message": {
        "id": 35257,
        "sku_number": "SKU-2285KMP"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request Bad Request/Validation Error" %}

```json
{
    "status": "FAIL",
    "message": "Failed to create SKU. Reason: {'sku_number': [ErrorDetail(string='wh sku with this SKU Number already exists.', code='unique')]}"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized/Wrong API key" %}

```javascript
{
  "status": "FAIL",
  "message": "Unauthorized"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Unexpected Error" %}

```javascript
{
  "status": "FAIL",
  "message": "Unexpected error"
}
```

{% endtab %}
{% endtabs %}

## Update SKUs

<mark style="color:orange;">`PUT`</mark> `/wms/skus`

This API is for updating an existing SKU. Any or all of the below mentioned attribute of the SKU can be updated using this API.

#### Headers

| Name                                       | Type   | Description                              |
| ------------------------------------------ | ------ | ---------------------------------------- |
| API\_KEY<mark style="color:red;">\*</mark> | String | API key obtained by the Customer/Partner |

#### Request Body

| Name                 | Type    | Description                                                                                                                                                                                                                                                                                                                                                     |
| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                   | integer | <p>Unique identifier either generated by Blowhorn or provided at the time of SKU creation. </p><p><strong>Note</strong>: This is conditionally optional. Either <strong>id</strong>, <strong>sku\_number</strong> or <strong>name</strong> should be provided for identifying the SKU that needs to be updated.</p>                                             |
| name                 | String  | <p>Unique text identifier of the SKU for the client. </p><p><strong>Note</strong>: This is conditionally optional. Either <strong>id</strong>, <strong>sku\_number</strong> or <strong>name</strong> should be provided for identifying the SKU that needs to be updated.</p>                                                                                   |
| description          | String  | SKU description.                                                                                                                                                                                                                                                                                                                                                |
| sku\_number          | String  | <p>Unique SKU identifier for the client. This can either provided by the client or Blowhorn generates if not provided.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>id</strong>, <strong>sku\_number</strong> or <strong>name</strong> should be provided for identifying the <strong>SKU</strong> that needs to be updated.</p> |
| ean\_ code           | String  | European Article Number - A barcode for product identification (which helps manufacturers identify how many products have been sold once a sale is made). It is 13 digits long.                                                                                                                                                                                 |
| upc                  | String  | Universal Product Code - Barcode for product identification which is used across the world. It is 12 digits long.                                                                                                                                                                                                                                               |
| product\_group       | String  | <p>Product Group id to which the SKU belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>product\_group</strong> or <strong>product\_group\_name</strong> or both can be provided for identifying a product group to associate this SKU or else both can be left empty if need not to associate with any.</p>                  |
| product\_group\_name | String  | <p>Product Group name to which the SKU belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>product\_group</strong> or <strong>product\_group\_name</strong> or both can be provided for identifying a product group to associate this SKU or else both can be left empty if need not to associate with any.</p>                |
| pack\_config         | String  | <p>The packaging details id for the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>pack\_config</strong> or <strong>pack\_config\_name</strong> or both can be provided for identifying a package config to associate this SKU or else both can be left empty if need not to associate with any.</p>                          |
| pack\_config\_name   | String  | <p>The packaging details name for the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>pack\_config</strong> or <strong>pack\_config\_name</strong> or both can be provided for identifying a package config to associate this SKU or else both can be left empty if need not to associate with any.</p>                        |
| supplier             | String  | <p>Supplier id of the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>supplier</strong> or <strong>supplier\_name</strong> or both can be provided for identifying a <strong>supplier</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                                     |
| supplier\_name       | String  | <p>Supplier name of the SKU.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>supplier</strong> or <strong>supplier\_name</strong> or both can be provided for identifying a <strong>supplier</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                                   |
| client               | String  | <p>Warehouse Client id to which the item belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>client</strong> or <strong>client\_name</strong> or both can be provided for identifying a <strong>client</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                    |
| client name          | String  | <p>Warehouse Client name to which the item belongs.</p><p><strong>Note</strong>: This is conditionally optional. Either <strong>client</strong> or <strong>client\_name</strong> or both can be provided for identifying a <strong>client</strong> to associate this SKU or else both can be left empty if need not to associate with any.</p>                  |
| each\_weight         | String  | The weight of the SKU in kgs without packaging                                                                                                                                                                                                                                                                                                                  |
| each volume          | String  | The width of the SKU in cubic meters.                                                                                                                                                                                                                                                                                                                           |
| each\_dimension      | String  | Product Dimensions Format: LxBxH. Unit: mm, Eg: 60X40X20                                                                                                                                                                                                                                                                                                        |
| has\_expiry          | String  | If the SKU has an expiry or not                                                                                                                                                                                                                                                                                                                                 |
| shelf life           | String  | Duration of time that a product may be stored without becoming unfit for use, consumption, or sale                                                                                                                                                                                                                                                              |
| shelf life uom       | String  | Days, Months, Years etc. Note this is case sensitive and enumerated.                                                                                                                                                                                                                                                                                            |
| mrp                  | String  | Maximum Retail Price. How much is the maximum price at which the product is being sold.                                                                                                                                                                                                                                                                         |
| discounts            | String  | Mention the discount value that needs to be provided                                                                                                                                                                                                                                                                                                            |
| is\_kit\_sku         | String  | A Kit SKU an SKU that either has multiple units of an underlying SKU (Pack or Multi-Pack) or multiple underlying SKUs (Bundle)                                                                                                                                                                                                                                  |
| requires\_putaway    | String  | Flag to indicate if this SKU does not need to be stored and needs to be putaway for cross dock shipping                                                                                                                                                                                                                                                         |
| uom                  | String  | <p>Unit of weight of the inventory items. </p><p>Ex: <strong>KG</strong> or <strong>GM</strong></p>                                                                                                                                                                                                                                                             |

{% tabs %}
{% tab title="200: OK Successful update of SKU" %}

```javascript
{
    "status": "PASS",
    "message": "Updated the SKU details"
}
```

{% endtab %}

{% tab title="400: Bad Request Bad Request/Validation Error" %}

```javascript
{
    "status": "FAIL",
    "message": "SKU ID does not exist"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized/Wrong API key" %}

```javascript
{
  "status": "FAIL",
  "message": "Unauthorized"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Unexpected Error" %}

```javascript
{
  "status": "FAIL",
  "message": "Enexpected Error"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Create SKU | Schema " %}

```json
{
 "id": 3,
 "name": "EOS 5D Mark IV Kit",
 "description": "30.4 megapixel full-frame CMOS sensor",
 "sku_number": "SKU-2294XOV",
 "ean_code": 4712345967072,
 "upc": 036000291452,
 "product_group": 3,
 "product_group_name": "Luggage & Travel",
 "pack_config" : 1
 "pack_config_name": "each",
 "supplier": 5
 "supplier_name": "Boston Photo lab",
 "client": 100
 "client_name": "Canon",
 "each_weight": 1,
 "each_volume": 131312,
 "each_dimension": "150.7 x 116.4 x 75.9",
 "uom": "KG"
 "has_expiry": true,
 "shelf_life": 45,
 "shelf_life_uom": "Days",
 "mrp": 23000,
 "discounts": 3,
 "discount_type": "percentage",
 "is_kit_sku": false,
 "requires_putaway": true
 }
```

{% endtab %}

{% tab title="Example Create Kit SKU | Schema" %}

```json
{
 "id": 3,
 "name": "EOS 5D Mark IV Kit",
 "description": "30.4 megapixel full-frame CMOS sensor",
 "sku_number": "SKU-2294XOX",
 "ean_code": 4712345967076,
 "upc": 036000291457,
 "product_group": 3,
 "product_group_name": "Luggage & Travel",
 "pack_config": 1,
 "pack_config_name": "each",
 "supplier": 4,
 "supplier": "Boston Photo lab",
 "client": 3,
 "client_name": "Canon",
 "each_weight": 1,
 "each_volume": 131312,
 "each_dimension": "150.7 x 116.4 x 75.9",
 "has_expiry": true,
 "shelf_life": 45,
 "shelf_life_uom": "Days",
 "mrp": 23000,
 "discounts": 3,
 "discount_type": "percentage",
 "is_kit_sku": true,
 "requires_putaway": true
}
```

{% endtab %}
{% endtabs %}
