Banka sorgusu tetikleme
curl --request POST \
--url https://api.sarraf.pro/v1/bank-queries \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"accountId": "<string>"
}
}
'import requests
url = "https://api.sarraf.pro/v1/bank-queries"
payload = { "data": { "accountId": "<string>" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {accountId: '<string>'}})
};
fetch('https://api.sarraf.pro/v1/bank-queries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sarraf.pro/v1/bank-queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'accountId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sarraf.pro/v1/bank-queries"
payload := strings.NewReader("{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sarraf.pro/v1/bank-queries")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sarraf.pro/v1/bank-queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"total": 123,
"triggered": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123,
"results": [
{
"accountId": "<string>",
"status": "success",
"name": "<string>",
"message": "<string>"
}
],
"ranAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Banka
Banka sorgusu tetikleme
Şirketin entegre banka hesapları için hareket sorgusu tetikler. accountId verilirse tek hesap, verilmezse tüm entegre hesaplar sırayla çalıştırılır. Cron kilit mekanizmasına saygılıdır: o anda işlenen hesap skipped döner. Not: bu uç gerçek banka API çağrıları yapar ve hesap sayısına bağlı olarak uzun sürebilir.
POST
/
v1
/
bank-queries
Banka sorgusu tetikleme
curl --request POST \
--url https://api.sarraf.pro/v1/bank-queries \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"accountId": "<string>"
}
}
'import requests
url = "https://api.sarraf.pro/v1/bank-queries"
payload = { "data": { "accountId": "<string>" } }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({data: {accountId: '<string>'}})
};
fetch('https://api.sarraf.pro/v1/bank-queries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sarraf.pro/v1/bank-queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'accountId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sarraf.pro/v1/bank-queries"
payload := strings.NewReader("{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sarraf.pro/v1/bank-queries")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sarraf.pro/v1/bank-queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"accountId\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"total": 123,
"triggered": 123,
"succeeded": 123,
"failed": 123,
"skipped": 123,
"results": [
{
"accountId": "<string>",
"status": "success",
"name": "<string>",
"message": "<string>"
}
],
"ranAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"success": false,
"error": {
"code": "VALIDATION_FAILED",
"message": "<string>",
"details": [
{
"field": "<string>",
"rule": "<string>"
}
]
},
"traceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Kullanıcı adı apiUserId, parola secretKey. Authorization: Basic base64(apiUserId:secretKey)
Body
application/json
Yazma uçlarında gövde zarfı: data zorunludur (boş nesne olabilir).
Show child attributes
Show child attributes
⌘I