> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Search Product

GET https://heimdall.eka.io/apis/external/search/searchProduct/

## Search Product API

This endpoint allows users to search for products based on a query string. It retrieves a list of products that match the specified search criteria.

### Request

* **Method**: `GET`

* **Endpoint**: `{{host}}/apis/external/search/searchProduct/`

* **Query Parameters**:

  * `q` (string): The search term used to find products. In this example, the query is set to `pt1`.

### Response

The response will be in JSON format and will include an array of products that match the search criteria. Each product object contains the following fields:

* `id` (integer): Unique identifier for the product.

* `title` (string): The name of the product.

* `description` (string): A brief description of the product.

* `sku` (string): Stock Keeping Unit identifier for the product.

* `hsn` (string): Harmonized System Nomenclature code.

* `gl` (string): General Ledger code associated with the product.

* `productId` (string): Identifier for the product in the system.

* `service` (string): Service type related to the product.

* `amount` (number): Price of the product.

* `gst` (number): Goods and Services Tax applicable to the product.

* `currency` (string): Currency code for the price.

* `addedAt` (integer): Timestamp of when the product was added.

* `updatedAt` (integer): Timestamp of the last update to the product.

* `active` (boolean): Indicates if the product is currently active.

* `unit` (string): Measurement unit for the product.

* `config` (object): Configuration settings for the product, including:

  * `qcEnabled` (boolean): Indicates if quality control is enabled.

  * `skipFAR` (boolean): Indicates if FAR checks should be skipped.

### Example Response

```json
{
    "products": [
        {
            "id": 37338,
            "title": "pt1",
            "description": " ",
            "sku": " ",
            "hsn": "ert",
            "gl": "34567",
            "productId": "7004",
            "service": "Utilities",
            "amount": 30,
            "gst": 0,
            "currency": "INR",
            "addedAt": 1724782787813,
            "updatedAt": 1737638946379,
            "active": true,
            "unit": "piece",
            "config": {
                "qcEnabled": false,
                "skipFAR": false
            }
        },
        {
            "id": 37339,
            "title": "pt1",
            "description": " ",
            "sku": " ",
            "hsn": "ert",
            "gl": "34567",
            "productId": "7004",
            "service": "Utilities",
            "amount": 10000000,
            "gst": 0,
            "currency": "INR",
            "addedAt": 1724825798856,
            "updatedAt": 1726637568806,
            "active": true,
            "unit": "piece",
            "config": {
                "qcEnabled": false,
                "skipFAR": false
            }
        },
        {
            "id": 37340,
            "title": "pt1",
            "description": " ",
            "sku": " ",
            "hsn": "ert",
            "gl": "34567",
            "productId": "7004",
            "service": "Utilities",
            "amount": 250,
            "gst": 0,
            "currency": "INR",
            "addedAt": 1724826237935,
            "updatedAt": 1738831506967,
            "active": true,
            "unit": "piece",
            "config": {
                "vendorName": "tata motors",
                "lastPurchasePrice": 333,
                "qcEnabled": false,
                "skipFAR": false
            }
        }
    ]
}

```

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/search/search-product

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Query parameters

- `q` (string, optional) — Fetches Product whose names match the given q parameter using a case-insensitive partial match.

### Headers

- `DICE-APP-ID` (string, optional)
- `X-CLIENT-ID` (string, optional)
- `X-CLIENT-SECRET` (string, optional)

## Response

### 200

OK

- `products` (list of object, required)
  - `id` (integer, required)
  - `title` (string, required)
  - `description` (string, required)
  - `sku` (string, required)
  - `hsn` (string, required)
  - `gl` (string, required)
  - `productId` (string, required)
  - `service` (string, required)
  - `amount` (integer, required)
  - `gst` (integer, required)
  - `currency` (string, required)
  - `addedAt` (integer, required)
  - `updatedAt` (integer, required)
  - `active` (boolean, required)
  - `unit` (string, required)
  - `config` (object, required)
    - `qcEnabled` (boolean, required)
    - `skipFAR` (boolean, required)

## Examples

**Response**

```json
{
  "products": [
    {
      "id": 37338,
      "title": "pt1",
      "description": " ",
      "sku": " ",
      "hsn": "ert",
      "gl": "34567",
      "productId": "7004",
      "service": "Utilities",
      "amount": 30,
      "gst": 0,
      "currency": "INR",
      "addedAt": 1724782787813,
      "updatedAt": 1737638946379,
      "active": true,
      "unit": "piece",
      "config": {
        "qcEnabled": false,
        "skipFAR": false
      }
    },
    {
      "id": 37339,
      "title": "pt1",
      "description": " ",
      "sku": " ",
      "hsn": "ert",
      "gl": "34567",
      "productId": "7004",
      "service": "Utilities",
      "amount": 10000000,
      "gst": 0,
      "currency": "INR",
      "addedAt": 1724825798856,
      "updatedAt": 1726637568806,
      "active": true,
      "unit": "piece",
      "config": {
        "qcEnabled": false,
        "skipFAR": false
      }
    },
    {
      "id": 37340,
      "title": "pt1",
      "description": " ",
      "sku": " ",
      "hsn": "ert",
      "gl": "34567",
      "productId": "7004",
      "service": "Utilities",
      "amount": 250,
      "gst": 0,
      "currency": "INR",
      "addedAt": 1724826237935,
      "updatedAt": 1738831506967,
      "active": true,
      "unit": "piece",
      "config": {
        "qcEnabled": false,
        "skipFAR": false,
        "lastPurchasePrice": 333,
        "vendorName": "tata motors"
      }
    }
  ]
}
```

**SDK Code**

```python Search_Search Product_example
import requests

url = "https://heimdall.eka.io/apis/external/search/searchProduct/"

querystring = {"q":"pt1"}

headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Search_Search Product_example
const url = 'https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1';
const options = {
  method: 'GET',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Search_Search Product_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Search_Search Product_example
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'

response = http.request(request)
puts response.read_body
```

```java Search_Search Product_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .asString();
```

```php Search_Search Product_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1', [
  'headers' => [
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

echo $response->getBody();
```

```csharp Search_Search Product_example
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1");
var request = new RestRequest(Method.GET);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
IRestResponse response = client.Execute(request);
```

```swift Search_Search Product_example
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/search/searchProduct/?q=pt1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```