> For the complete documentation index, see [llms.txt](https://doc.paynet.com.tr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.paynet.com.tr/uornek/servisler/oran/oran-tanimlama.md).

# Oran Tanımlama

Bir oran tipine oranların tanımını yapmayı, bu oran tipi için taksit veya banka bloklamayı sağlayan servistir.

{% hint style="success" %}
<https://api.paynet.com.tr/v1/ratio/define>
{% endhint %}

{% tabs %}
{% tab title="İstek Parametreleri" %}

| Parametre İsmi  | Tip     | Zorunlu | Açıklama                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ratio\_code** | string  | Evet    | Oran tanımı yapmak istediğiniz oran tipine ait kod                                                                                                                                                                                                                                                                                                                                                                        |
| **banks**       | dizi    | Evet    | Oran tanımlarının yapılacağı bankaları tutan dizi. Bknz. [Banka Kodları](/uornek/genel-bilgiler/banka-kodlari.md)[ ](https://www.paynet.com.tr/doc/index.html#api-banka_kodlari)                                                                                                                                                                                                                                          |
| **bank\_id**    | char(4) | Evet    | Tanımların yapılacağı bankaları temsil eden 4 karakterli kod                                                                                                                                                                                                                                                                                                                                                              |
| **instalments** | dizi    | Hayır   | "banks" dizisinin altındaki her nesne için taksitlere ait bilgileri tutan dizilerdir. Bir banka bloklanacaksa bu banka için "instalments" dizisi göndermeye gerek yok.                                                                                                                                                                                                                                                    |
| **instalment**  | int     | Evet    | Bloklanacak veya oran tanımı yapılacak taksite ait numara. Bknz. [Taksit Kodları](/uornek/genel-bilgiler/taksit-kodlari.md)                                                                                                                                                                                                                                                                                               |
| **is\_blocked** | bool    | Hayır   | true/false, Default: false. Banka veya taksitin bloklu olup olmadığına dair, "banks" veya "instalments" dizilerindeki nesnelere eklenebilir.                                                                                                                                                                                                                                                                              |
| **ratio**       | float   | Hayır   | Default: 0. Tanımların yapılacağı oran tipinin, oran hesaplama yöntemine göre belli aralıklarda gönderilmesi gereken orandır. Oran hesaplama yönetimi "Kümülatif" olan oran tiplerinde minimum -0.20, maksimum 0.20 olabilir. Oran hesaplama yönetimi "Net" olan oran tiplerinde minimum 0, maksimum 0.20 olabilir. Taksit bloklanacaksa veya oran "0" olarak kaydedilecekse bu parametrenin gönderilmesine gerek yoktur. |
| {% endtab %}    |         |         |                                                                                                                                                                                                                                                                                                                                                                                                                           |

{% tab title="Dönüş Parametreleri" %}

| Parametre İsmi   | Tip    | Açıklama                                                                                            |
| ---------------- | ------ | --------------------------------------------------------------------------------------------------- |
| **object\_name** | string | Dönüş yapılan API’nin nesne adı                                                                     |
| **code**         | string | Dönüş sonucunun kodu. Bknz [Dönüş Kodları](/uornek/genel-bilgiler/hata-kodlari/doenues-kodlari.md). |
| **message**      | string | Dönüş sonuç kodunun açıklaması                                                                      |
| {% endtab %}     |        |                                                                                                     |

{% tab title="Request" %}

```
  
   "ratio_code":"S3E746PV",
   "banks":[  
      {  
         "bank_id":"MAXM",
         "is_blocked":"false",
         "instalments":[  
            {  
               "instalment":"3",
               "ratio":"0.13",
               "is_blocked":"false"
            },
            {  
               "instalment":"6",
               "ratio":"0.15",
               "is_blocked":"false"
            }
         ]
      },
      {  
         "bank_id":"WRLD",
         "is_blocked":"false",
         "instalments":[  
            {  
               "instalment":"3",
               "ratio":"0.12",
               "is_blocked":"false"
            }
         ]
      },
      {  
         "bank_id":"AXSS",
         "is_blocked":"true"
      }
   ]
}

```

{% endtab %}

{% tab title="Response" %}

```
{
"object_name":"ratio_define",
"code":0,
"message":"Başarılı İşlem"
}
```

{% endtab %}

{% tab title="Service Url" %}

| Sistem           | URL                                             |
| ---------------- | ----------------------------------------------- |
| **Canlı Sistem** | <https://api.paynet.com.tr/v1/ratio/define>     |
| **Test Sistemi** | <https://pts-api.paynet.com.tr/v1/ratio/define> |
| {% endtab %}     |                                                 |
| {% endtabs %}    |                                                 |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://doc.paynet.com.tr/uornek/servisler/oran/oran-tanimlama.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
