Çek Listeleme
Firmaya ait çekleri listeleme.
Endpoint
GET /kolaybi/v1/cheques
Parametreler
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
cheque_status | ChequeStatus | Hayır | Çek durumu ile filtreleme |
cash_flow_direction | CashFlowDirection | Hayır | Nakit yönü (1 alınan çek, -1 verilen çek) |
serial_no | string | Hayır | Seri numarası içerenler |
drawer | string | Hayır | Keşideci adı içerenler |
payee | string | Hayır | Lehtar adı içerenler |
associate_id | integer | Hayır | Çekleri görüntülenecek cari ID'si |
endorsed_associate_id | integer | Hayır | Ciro edilen cari ID'si |
currency | Currency | Hayır | Para birimi |
min_amount | number | Hayır | Minimum tutar |
max_amount | number | Hayır | Maksimum tutar |
min_issue_date | string | Hayır | Minimum keşide tarihi (YYYY-MM-DD) |
max_issue_date | string | Hayır | Maksimum keşide tarihi (YYYY-MM-DD) |
min_receive_date | string | Hayır | Minimum vade tarihi (YYYY-MM-DD) |
max_receive_date | string | Hayır | Maksimum vade tarihi (YYYY-MM-DD) |
Örnekler
- cURL
- JavaScript
- PHP
- Python
- C#
# Tüm çekler
curl -X GET "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
# Portföydeki alınan çekler
curl -X GET "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques?cheque_status=portfolio&cash_flow_direction=1" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
# Tarih aralığı ile filtreleme
curl -X GET "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques?min_receive_date=2026-01-01&max_receive_date=2026-03-31" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
async function getCheques(filters = {}) {
const params = new URLSearchParams(filters);
const response = await fetch(
`https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques?${params}`,
{
headers: {
Authorization: `Bearer ${accessToken}`,
Channel: channel,
},
}
);
return await response.json();
}
// Kullanım
const allCheques = await getCheques();
const portfolioCheques = await getCheques({
cheque_status: "portfolio",
cash_flow_direction: 1,
});
function getCheques($filters = []) {
$url = 'https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques';
if (!empty($filters)) {
$url .= '?' . http_build_query($filters);
}
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $accessToken,
'Channel: ' . $channel
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// Kullanım
$allCheques = getCheques();
$portfolioCheques = getCheques([
'cheque_status' => 'portfolio',
'cash_flow_direction' => 1,
]);
import requests
def get_cheques(filters=None):
url = "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques"
headers = {
"Authorization": f"Bearer {access_token}",
"Channel": channel
}
response = requests.get(url, headers=headers, params=filters)
return response.json()
# Kullanım
all_cheques = get_cheques()
portfolio_cheques = get_cheques({
"cheque_status": "portfolio",
"cash_flow_direction": 1
})
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
async Task<dynamic> GetChequesAsync(Dictionary<string, string> filters = null)
{
using var client = new HttpClient();
var url = "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/cheques";
if (filters != null && filters.Count > 0)
{
var query = await new FormUrlEncodedContent(filters).ReadAsStringAsync();
url += "?" + query;
}
var request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
request.Headers.Add("Channel", channel);
var response = await client.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<dynamic>(content);
}
// Kullanım
var allCheques = await GetChequesAsync();
var portfolioCheques = await GetChequesAsync(new Dictionary<string, string>
{
{ "cheque_status", "portfolio" },
{ "cash_flow_direction", "1" }
});
Yanıt
- Başarılı Yanıt
{
"data": [
{
"id": 42,
"serial_no": "0012345",
"drawer": "Örnek Keşideci A.Ş.",
"payee": "Örnek Lehtar Ltd. Şti.",
"receive_date": "2026-03-15 00:00:00",
"issue_date": "2026-01-15 00:00:00",
"issue_place": "İstanbul",
"cheque_status": "portfolio",
"cash_flow_direction": 1,
"amount": 15000.5,
"currency": "try",
"description": "Ocak ayı tahsilatı",
"bank_name": "Ziraat Bankası",
"bank_code": "0010",
"associate_id": 7,
"vault_id": 3,
"endorsed_associate_id": null,
"tags": [
{
"id": 12,
"name": "Tahsilat",
"description": null
}
]
}
]
}
Yanıt Alanları
| Alan | Tip | Açıklama |
|---|---|---|
data | array | Çek kayıtları (data[n]) |
Kayıt Alanları (data[n])
| Alan | Tip | Açıklama |
|---|---|---|
id | integer | Çek ID |
serial_no | string | Seri numarası |
drawer | string | Keşideci |
payee | string | Lehtar |
receive_date | string | Vade tarihi |
issue_date | string | Keşide tarihi |
issue_place | string | Keşide yeri |
cheque_status | ChequeStatus | Çek durumu |
cash_flow_direction | CashFlowDirection | Nakit yönü |
amount | number | Tutar |
currency | Currency | Para birimi |
description | string | Açıklama |
bank_name | string | Banka adı |
bank_code | string | Banka kodu |
associate_id | integer | İlişkili cari ID |
vault_id | integer | Banka/kasa ID |
endorsed_associate_id | integer | Ciro edilen cari ID |
tags | array | Etiketler (id, name, description) |