# Stok Listesinde Arama Yapar

## GET /Stocks/SearchStock/{searchText}

> Stok arar.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"StockResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks/SearchStock/{searchText}":{"get":{"tags":["Stocks"],"summary":"Stok arar.","parameters":[{"name":"searchText","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stok arar.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockResponse"}}}}},"400":{"description":"Geçersiz İstek | Gönderdiğiniz istekte geçersiz veriler bulunduğu anlamında gelmektedir | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#badrequest-400\">tıklayınız</a>"},"403":{"description":"Yetkisiz Erişim | Bu uca erişmek için gerekli yetkiye sahip olmadığınız durumda dönülür"},"404":{"description":"Parametrede belirtilen kayıt bulunamadığında dönülür | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#notfound-404\">tıklayınız</a>"}}}}}}
```

{% tabs %}
{% tab title="C#" %}

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Stocks/SearchStock/adfghjkl");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apitest.nilvera.com/general/Stocks/SearchStock/adfghjkl',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Stocks/SearchStock/adfghjkl',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}
