curl --request POST \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"Name\": \"3 Taksit\",\n \"DayCount\": 90,\n \"CommissionRates\": [\n {\n \"Name\": \"3 Taksit\",\n \"Rate\": 2.5,\n \"ExpenseCode\": \"MSR-0001\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'POST',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Name: '3 Taksit',
DayCount: 90,
CommissionRates: [{Name: '3 Taksit', Rate: 2.5, ExpenseCode: 'MSR-0001'}]
})
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans"
payload = {
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "8024",
"Message": "Repayment plans can only be added to a POS account (AccountType 3).",
"Errors": [
{
"Code": "8024",
"Message": "Repayment plans can only be added to a POS account (AccountType 3)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}Geri ödeme planı oluştur
Yeni geri ödeme planı ve komisyon oranlarını tek işlemde ekler.
curl --request POST \
--url https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-CompanyID: <x-companyid>' \
--header 'X-UserID: <x-userid>' \
--data '
{
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
}
'using RestSharp;
var options = new RestClientOptions("https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-UserID", "<x-userid>");
request.AddHeader("X-CompanyID", "<x-companyid>");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"Name\": \"3 Taksit\",\n \"DayCount\": 90,\n \"CommissionRates\": [\n {\n \"Name\": \"3 Taksit\",\n \"Rate\": 2.5,\n \"ExpenseCode\": \"MSR-0001\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
const options = {
method: 'POST',
headers: {
'X-UserID': '<x-userid>',
'X-CompanyID': '<x-companyid>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Name: '3 Taksit',
DayCount: 90,
CommissionRates: [{Name: '3 Taksit', Rate: 2.5, ExpenseCode: 'MSR-0001'}]
})
};
fetch('https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://dev.noyax.com/services/noyax_api/api/v1/finance/bank-accounts/{bankAccountId}/repayment-plans"
payload = {
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
}
headers = {
"X-UserID": "<x-userid>",
"X-CompanyID": "<x-companyid>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"Success": true,
"ResultCode": "0000",
"Data": {
"Id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"Name": "3 Taksit",
"DayCount": 90,
"CommissionRates": [
{
"Name": "3 Taksit",
"Rate": 2.5,
"ExpenseCode": "MSR-0001"
}
]
},
"Message": "<string>"
}{
"Success": false,
"ResultCode": "8024",
"Message": "Repayment plans can only be added to a POS account (AccountType 3).",
"Errors": [
{
"Code": "8024",
"Message": "Repayment plans can only be added to a POS account (AccountType 3)."
}
]
}{
"Success": false,
"ResultCode": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token.",
"Errors": [
{
"Code": "0102",
"Message": "Token has expired. Obtain a new token using the refresh token."
}
]
}{
"Success": false,
"ResultCode": "0110",
"Message": "You do not have permission for this operation.",
"Errors": [
{
"Code": "0110",
"Message": "You do not have permission for this operation."
}
]
}{
"Success": false,
"ResultCode": "0120",
"Message": "Daily request limit (10000) exceeded.",
"Errors": [
{
"Code": "0120",
"Message": "Daily request limit (10000) exceeded."
}
]
}- Banka hesabının
AccountType’ı 3 (POS hesabı) olmalıdır, aksi halde reddedilir. Namezorunludur ve banka hesabı içinde benzersiz olmalıdır.DayCountnegatif olamaz.CommissionRatesisteğe bağlıdır; her girdideName(planda benzersiz),Rate(yüzde, 0-100) veExpenseCode(tipi 6/Masraf olan bir ürün kodu) zorunludur. Komisyon oranları planla aynı işlemde (transaction) yazılır.
Hata kodları
Bu endpoint’in dönebileceği kodlar. Her endpoint için geçerli olan genel hatalar (kimlik doğrulama, yetki, istek header’ları, günlük limit) burada tekrarlanmaz.| Kod | HTTP | Anlamı |
|---|---|---|
0002 | 400 | İstek gövdesi okunamadı (bozuk JSON, alan tipi uyumsuz) |
0003 | 400 | Alan azami uzunluğu aşıyor (mesajda alan adı ve sınır yazar) |
0580 | 400 | Metinle verilen değer (kod ya da ad) birden fazla kayıtla eşleşiyor; hangisi olduğunu ayırt edecek bilgiyi ekleyin (ör. ilçe için City, il için Country) |
8010 | 404 | Banka hesabı bulunamadı |
8021 | 400 | Geri ödeme planı Name zorunlu |
8022 | 400 | Geri ödeme planı adı bu banka hesabında kullanılıyor |
8023 | 400 | DayCount negatif olamaz |
8024 | 400 | Geri ödeme planı yalnızca POS hesabına (AccountType 3) eklenebilir |
8031 | 400 | Komisyon oranı Name zorunlu |
8032 | 400 | Komisyon oranı adı aynı geri ödeme planında birden fazla kullanılıyor |
8033 | 400 | Rate 0-100 arasında olmalı |
8034 | 400 | ExpenseCode zorunlu |
8035 | 400 | ExpenseCode bulunamadı |
Yetkilendirmeler
Access token obtained from the Noyax auth service with your API key.
Başlıklar
İsteğin adına yapıldığı Noyax kullanıcısının ID'si. Oluşturulan, güncellenen ve silinen kayıtların denetim alanlarına yazılır.
x >= 1Şirketin ID'si. Kullanıcı bu şirkete tanımlı olmalıdır. Bütün okuma ve yazma işlemleri bu şirketle sınırlıdır.
x >= 1Muhasebe döneminin ID'si. Cari endpoint'lerinde isteğe bağlıdır; gönderilirse oluşturulan kayıtlara yazılır.
x >= 1Yol Parametreleri
Banka hesabı ID'si.
Gövde
Zorunlu. Banka hesabı içinde benzersiz. En fazla 100 karakter.
"3 Taksit"
Zorunlu. Gün sayısı, negatif olamaz.
90
Bu geri ödeme planının komisyon oranları. Güncellemede bu liste mevcutların tamamının yerini alır.
Show child attributes
Show child attributes
Yanıt
Created
İşlemin başarılı olup olmadığı.
true
Başarıda "0000". Hatada ilk hatanın kodu; hataların tamamı Errors içinde listelenir.
"0000"
Show child attributes
Show child attributes
Success false olduğunda hata mesajı. Bütün hataların mesajları tek metinde birleştirilir.