# İlaç Arama

### Uç-nokta: /products

[api-url](https://doc.vapi.co/tr/api-klavuzu/api-url "mention")

### İstek Metodu: <mark style="color:green;">GET</mark>

### Header Parametreleri

<table><thead><tr><th width="154">parametre</th><th width="114">tipi</th><th>açıklama</th></tr></thead><tbody><tr><td>Authorization</td><td>string</td><td>Bearer &#x3C;API Anahtarı><a data-mention href="#curl-istek-oernegi">#curl-istek-oernegi</a> <a data-mention href="../kimlik-dogrulama">kimlik-dogrulama</a></td></tr></tbody></table>

### İstek Parametreleri

<table><thead><tr><th width="153">parametre</th><th width="140">tipi</th><th width="367">açıklama</th><th>zorunlu</th></tr></thead><tbody><tr><td>name</td><td>string</td><td>Aratılmak istenen isim ilacın ismi. Girilen değer ilaç isminin başlangıcından itibaren aranır</td><td>hayır</td></tr><tr><td>barcode</td><td>string</td><td>Aratılmak istenen barcode</td><td>hayır</td></tr><tr><td>page</td><td>integer</td><td>Sayfa numarası <a data-mention href="../cevap-yapisi">cevap-yapisi</a></td><td>hayır</td></tr><tr><td>per-page</td><td>integer</td><td>Bir sayfada bulunması istenen kayıt sayısı. Üst limit 500. <a data-mention href="../cevap-yapisi">cevap-yapisi</a></td><td>hayır</td></tr><tr><td>drugtype</td><td>integer</td><td>İlaç tipi ID'si <a data-mention href="drug-tipleri">drug-tipleri</a></td><td>hayır</td></tr></tbody></table>

### Cevap Parametreleri

İlaç listesi[#cevap-parametreleri](https://doc.vapi.co/tr/api-klavuzu/ilac-listesi#cevap-parametreleri "mention") bölümünden görüntülenebilir.&#x20;

### <mark style="color:blue;">curl</mark> İstek Örneği

**İsim arama örneği:**&#x20;

<pre><code><strong>curl --location 'https://api.vapi.co/products?name=aspiri' \
</strong>--header 'Authorization: Bearer &#x3C;API Anahtarı>'                                        
</code></pre>

**Barkod arama örneği:**

```
curl --location 'https://api.vapi.co/products?barcode=8699546010011' \
--header 'Authorization: Bearer <API Anahtarı>'   
```

**İlaç tipi arama örneği:**

```
curl --location 'https://api.vapi.co/products?drugtype=1' \
--header 'Authorization: Bearer <API Anahtarı>'   
```

**İsim ve barkod arama örneği:**&#x20;

<pre><code><strong>curl --location 'https://api.vapi.co/products?name=aspiri&#x26;barcode=8699546010011' \
</strong>--header 'Authorization: Bearer &#x3C;API Anahtarı>'
</code></pre>

**İsim, barkod ve drug tipi arama örneği:**&#x20;

<pre><code><strong>curl --location 'https://api.vapi.co/products?drugtype=1&#x26;name=aspiri&#x26;barcode=8699546010011' \
</strong>--header 'Authorization: Bearer &#x3C;API Anahtarı>'   
</code></pre>

### <mark style="color:blue;">postman</mark> İstek Örneği

<figure><img src="https://1066508896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFijFX6qkv9C1NPJR2PMY%2Fuploads%2F6IEroOpGYiea6NfDbxrG%2FScreen%20Shot%202024-03-21%20at%2016.05.31.png?alt=media&#x26;token=2cf4d8f0-4c8c-410c-925b-de555f36cd4d" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1066508896-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFijFX6qkv9C1NPJR2PMY%2Fuploads%2F4mcUR9np0FtYcSIg9rnD%2FScreen%20Shot%202024-03-21%20at%2016.11.23.png?alt=media&#x26;token=dfedb173-b6a4-410d-8a5f-9fe2c8993850" alt=""><figcaption></figcaption></figure>

### Cevap örneği

```json
{
    "data": [
        {
            "product": {
                "id": 10008,
                "name": "ASPİRİN COMPLEX Oral Süspansiyon İçin Granül İçeren Saşe 500 mg/30 mg 10 saşelik ambalaj"
            },
            "drug": {
                "id": 4556,
                "name": "ASPİRİN COMPLEX"
            },
            "drugform": {
                "id": 7873,
                "name": "Oral Süspansiyon İçin Granül İçeren Saşe 500 mg/30 mg"
            },
            "barcodes": [
                {
                    "barcode": "8699546241231",
                    "skrsStatus": "Aktif"
                }
            ],
            "published": true
        },
        {
            "product": {
                "id": 10009,
                "name": "ASPİRİN COMPLEX Oral Süspansiyon İçin Granül İçeren Saşe 500 mg/30 mg 20 saşelik ambalaj"
            },
            "drug": {
                "id": 4556,
                "name": "ASPİRİN COMPLEX"
            },
            "drugform": {
                "id": 7873,
                "name": "Oral Süspansiyon İçin Granül İçeren Saşe 500 mg/30 mg"
            },
            "barcodes": [
                {
                    "barcode": "8699546241248",
                    "skrsStatus": "Aktif"
                }
            ],
            "published": true
        },
        ...
    ],
    "_links": {
        "self": {
            "href": "https://api.vapi.co/products?name=aspiri&page=1&per-page=200"
        },
        "first": {
            "href": "https://api.vapi.co/products?name=aspiri&page=1&per-page=200"
        },
        "last": {
            "href": "https://api.vapi.co/products?name=aspiri&page=1&per-page=200"
        }
    },
    "_meta": {
        "totalCount": 6,
        "pageCount": 1,
        "currentPage": 1,
        "perPage": 200
    },
    "success": true
}
```
