Gider Tipi Listeleme
Şirketinize ait tüm gider/gelir tiplerini listeleyin. Dönen id değerini genel gider oluştururken financial_action_type_id olarak kullanabilirsiniz.
Endpoint
GET /kolaybi/v1/financial_action_types
Örnekler
- cURL
- JavaScript
- PHP
- Python
- C#
curl -X GET "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/financial_action_types" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Channel: YOUR_CHANNEL"
async function getFinancialActionTypes() {
const response = await fetch(
"https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/financial_action_types",
{
method: "GET",
headers: {
Authorization: `Bearer ${accessToken}`,
Channel: channel,
},
}
);
return await response.json();
}
function getFinancialActionTypes() {
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/financial_action_types",
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $accessToken,
'Channel: ' . $channel
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
import requests
def get_financial_action_types():
url = "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/financial_action_types"
headers = {
"Authorization": f"Bearer {access_token}",
"Channel": channel
}
response = requests.get(url, headers=headers)
return response.json()
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
async Task<dynamic> GetFinancialActionTypesAsync()
{
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://ofis-sandbox-api.kolaybi.com/kolaybi/v1/financial_action_types");
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);
}
Yanıt
- Başarılı Yanıt
{
"data": [
{
"id": 12,
"name": "Elektrik",
"description": null
},
{
"id": 13,
"name": "Faiz",
"description": null
}
]
}
Yanıt Alanları
| Alan | Tip | Açıklama |
|---|---|---|
id | integer | Gider tipi ID |
name | string | Gider tipi adı |
description | string | Açıklama |