# Banka Hesapları

## Banka Hesapları

<mark style="color:blue;">`GET`</mark> `https://api.banksocket.com/v1/accounts/:id`

Tüm bağlı ve apikey için izin verilmiş hesaplarınızın detaylarını gösterir.

#### Path Parameters

| Name | Type    | Description                                                                 |
| ---- | ------- | --------------------------------------------------------------------------- |
| id   | integer | Sadece belirli bir hesabın bilgilerini almak için gönderiniz. Opsiyoneldir. |

#### Headers

| Name           | Type   | Description                                                                     |
| -------------- | ------ | ------------------------------------------------------------------------------- |
| Authentication | string | Kimlik denetimi başlığıdır. Detaylar için kimlik denetimi sayfasına göz atınız. |

{% tabs %}
{% tab title="200 Banka hesapları başarı ile alındı" %}

```javascript
{
    "accounts": [
        {
            "id": 31,
            "bank": "Türkiye İş Bankası A.Ş.",
            "title": "Türkiye İş Bankası A.Ş.",
            "balance": "2641.00",
            "currency": "TRY",
            "status": "Active",
            "last_work": "2019-10-24 18:39:16+03",
            "last_update": "2019-10-24 18:39:16+03",
            "error": null
        }
    ]
}
```

{% endtab %}

{% tab title="404 Banka hesabı bulunamadı" %}

```javascript
{
    "message": "Accounts not found"
}
    
```

{% endtab %}
{% endtabs %}

## Banka Hesabı Oluştur

<mark style="color:green;">`POST`</mark> `https://api.banksocket.com/v1/accounts`

Servis ile banka hesabı eklemek için kullanılır. Bu işlemi yapabilmek bağlantı kurduğunuz apikey hesabına servis yetkisi verilmelidir.&#x20;

#### Headers

| Name           | Type   | Description                                                                     |
| -------------- | ------ | ------------------------------------------------------------------------------- |
| Authentication | string | Kimlik denetimi başlığıdır. Detaylar için kimlik denetimi sayfasına göz atınız. |

#### Request Body

| Name          | Type    | Description                                                                                                                                                                                                 |
| ------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title         | string  | Banka hesabının başlığıdır.                                                                                                                                                                                 |
| bank\_id      | integer | Eklenecek olan bankanın ID değeridir. Bu değerleri öğrenmek için bankalar sayfasına bakınız.                                                                                                                |
| currency      | string  | Para birimi değeridir. TRY, USD, EUR                                                                                                                                                                        |
| auth\_params  | object  | Bankanın istediği Authentication parametreleridir. JSON formatında gönderilmelidir. İlgili değerleri Bankalar sayfasında Banka detay bilgileri bölümünde bulabilirsiniz. Örn : {"username":"kullanıcı adı"} |
| sub\_accounts | array   | İlgili bağlantıda birden fazla alt hesap olması durumunda  alt hesap ID değerlerini dizi içerisinde iletmelisiniz. Bu durum oluştuğunda servis öncelikle alt hesap ve ID değerlerini dönecektir.            |

{% tabs %}
{% tab title="200 Başarılı" %}

```javascript
{
    "accounts" : [
        {
            "account_id" : 10000, 
            "bank_id" : 1, 
            "title" : "Akbank Talas Şubesi"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

## Banka hesabı sil

<mark style="color:red;">`DELETE`</mark> `https://api.banksocket.com/v1/accounts/:id`

#### Path Parameters

| Name | Type    | Description                            |
| ---- | ------- | -------------------------------------- |
| id   | integer | Silinecek hesabın Banksocket ID değeri |

#### Headers

| Name           | Type   | Description             |
| -------------- | ------ | ----------------------- |
| Authentication | string | Kimlik denetimi başlığı |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.banksocket.com/accounts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
