---
title: Search products
slug: import-test-pdf/search-products
createdAt: 2025-10-28T16:28:35.363Z
---

{
  "id": "fUKUkZsmpzmiTCAXFTi7N",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/api/v1/products",
    "servers": [],
    "name": "Search products",
    "description": "Search products",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "filter[search]",
          "type": "string",
          "description": "Searching by product name"
        },
        {
          "kind": "optional",
          "name": "filter[service_package_id]",
          "type": "integer",
          "description": ""
        },
        {
          "kind": "optional",
          "name": "filter[categories]",
          "type": "array",
          "description": "Categories Ids",
          "schema": [],
          "itemType": "integer",
          "customType": "integer[]"
        },
        {
          "kind": "optional",
          "name": "filter[producer_ids]",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "integer",
          "customType": "integer[]"
        },
        {
          "kind": "optional",
          "name": "filter[aaha_codes]",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "filter[status]",
          "type": "string",
          "description": "<p>Status: active, inactive</p>",
          "default": "active"
        },
        {
          "kind": "optional",
          "name": "filter[only_in_stock]",
          "type": "boolean",
          "description": "",
          "default": "false"
        },
        {
          "kind": "optional",
          "name": "filter[subset]",
          "type": "string",
          "description": "<p>Only products in specified category group (supports: 'vaccination')</p>"
        },
        {
          "kind": "optional",
          "name": "sort",
          "type": "array",
          "description": "Order by field(s) (name,aaha_code,vat) Use a minus before for descending order. Default: name",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "include",
          "type": "string",
          "description": "<p>Additional info to include:  productCategory,stock,nirProducts,aahaCategory,producer</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful operation",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 670
                  },
                  {
                    "name": "name",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "Product Prof. Peter Dach"
                  },
                  {
                    "name": "unit",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "package"
                  },
                  {
                    "name": "units",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": [
                      {
                        "name": "0",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "tablets"
                      },
                      {
                        "name": "1",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "example": "package"
                      }
                    ]
                  },
                  {
                    "name": "sub_unit",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "tablets"
                  },
                  {
                    "name": "recommended_unit_price",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "11.853"
                  },
                  {
                    "name": "recommended_subunit_price",
                    "kind": "optional",
                    "type": "number",
                    "description": "",
                    "example": 1.6932857142857143
                  },
                  {
                    "name": "formula",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 7
                  },
                  {
                    "name": "active_substances",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "administration",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "recommendations",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "fixed_fee",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "0.000"
                  },
                  {
                    "name": "barcode",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "99425161"
                  },
                  {
                    "name": "producer_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "670"
                  },
                  {
                    "name": "clinic_id",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": "3876"
                  },
                  {
                    "name": "vat",
                    "kind": "optional",
                    "type": "integer",
                    "description": "",
                    "example": 0
                  },
                  {
                    "name": "is_controlled",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": false
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": true
                  }
                ]
              },
              {
                "name": "links",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/get/responses/200/content/application~1json/schema/properties/links",
                "customType": "links",
                "schema": []
              },
              {
                "name": "meta",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/paths/~1api~1v1~1pets/get/responses/200/content/application~1json/schema/properties/meta",
                "customType": "meta",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url '/api/v1/products?filter[status]=active&filter[only_in_stock]=false' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/api/v1/products?filter[status]=active&filter[only_in_stock]=false\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/api/v1/products?filter[status]=active&filter[only_in_stock]=false\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/api/v1/products?filter[status]=active&filter[only_in_stock]=false\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Successful operation\n{\n  \"data\": [\n    {\n      \"id\": 670,\n      \"name\": \"Product Prof. Peter Dach\",\n      \"unit\": \"package\",\n      \"units\": {\n        \"0\": \"tablets\",\n        \"1\": \"package\"\n      },\n      \"sub_unit\": \"tablets\",\n      \"recommended_unit_price\": \"11.853\",\n      \"recommended_subunit_price\": 1.6932857142857143,\n      \"formula\": 7,\n      \"active_substances\": \"\",\n      \"administration\": \"\",\n      \"recommendations\": \"\",\n      \"fixed_fee\": \"0.000\",\n      \"barcode\": \"99425161\",\n      \"producer_id\": \"670\",\n      \"clinic_id\": \"3876\",\n      \"vat\": 0,\n      \"is_controlled\": false,\n      \"status\": true\n    }\n  ],\n  \"links\": {},\n  \"meta\": {}\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": ""
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}