Refresh bank statements with MFA
curl --request POST \
--url https://ledgersyncappv2.com/api/v2/statements/refresh/mfa \
--header 'Auth-Token: <auth-token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaChallenge": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
}
}
'import requests
url = "https://ledgersyncappv2.com/api/v2/statements/refresh/mfa"
payload = {
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaChallenge": {
"mfaSession": "<string>",
"mfaBody": { "questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
] }
}
}
headers = {
"Auth-Token": "<auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Auth-Token': '<auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankAccountId: 123,
accountId: 123,
pullIndex: 123,
mfaChallenge: {
mfaSession: '<string>',
mfaBody: {
questions: [
{
text: '<string>',
image: '<string>',
choices: [{choice: '<string>', value: '<string>'}],
imageChoices: [{imageChoice: '<string>', value: '<string>'}],
answer: '<string>'
}
]
}
}
})
};
fetch('https://ledgersyncappv2.com/api/v2/statements/refresh/mfa', 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://ledgersyncappv2.com/api/v2/statements/refresh/mfa",
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([
'bankAccountId' => 123,
'accountId' => 123,
'pullIndex' => 123,
'mfaChallenge' => [
'mfaSession' => '<string>',
'mfaBody' => [
'questions' => [
[
'text' => '<string>',
'image' => '<string>',
'choices' => [
[
'choice' => '<string>',
'value' => '<string>'
]
],
'imageChoices' => [
[
'imageChoice' => '<string>',
'value' => '<string>'
]
],
'answer' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Auth-Token: <auth-token>",
"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://ledgersyncappv2.com/api/v2/statements/refresh/mfa"
payload := strings.NewReader("{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Auth-Token", "<auth-token>")
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://ledgersyncappv2.com/api/v2/statements/refresh/mfa")
.header("Auth-Token", "<auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ledgersyncappv2.com/api/v2/statements/refresh/mfa")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Auth-Token"] = '<auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}statement-api
Refresh bank statements with MFA
Refresh account statements with MFA (Multi Factor Authentication)
This API should be called only when the call to /api/v2/statements/refresh returns a MFA challenge, Http code: 203 or when the call to this API returns another MFA challenge.
Params
bankAccountId: Id of the bank account to be refreshed. accountId: Id of the account to be refreshed. pullIndex: Represents the month to be refreshed. Please use the same value provided during the call to /api/v2/statements/refresh. mfaRequest: MFA challenge that could be a simple question, an image, a multiple choice question or multiple images.
- mfaSession: Provided in the response of /api/v2/statements/refresh
- mfaBody: Wrapper for questions.
- questions: Represents different types of challenges.
- text: Challenge text. E.g Enter name of your first pet.
- image: Not required.
- choices: Not required.
- imageChoices: Not required.
- answer: Answer to the question in text format.
- questions: Represents different types of challenges.
POST
/
api
/
v2
/
statements
/
refresh
/
mfa
Refresh bank statements with MFA
curl --request POST \
--url https://ledgersyncappv2.com/api/v2/statements/refresh/mfa \
--header 'Auth-Token: <auth-token>' \
--header 'Content-Type: application/json' \
--data '
{
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaChallenge": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
}
}
'import requests
url = "https://ledgersyncappv2.com/api/v2/statements/refresh/mfa"
payload = {
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaChallenge": {
"mfaSession": "<string>",
"mfaBody": { "questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
] }
}
}
headers = {
"Auth-Token": "<auth-token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Auth-Token': '<auth-token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bankAccountId: 123,
accountId: 123,
pullIndex: 123,
mfaChallenge: {
mfaSession: '<string>',
mfaBody: {
questions: [
{
text: '<string>',
image: '<string>',
choices: [{choice: '<string>', value: '<string>'}],
imageChoices: [{imageChoice: '<string>', value: '<string>'}],
answer: '<string>'
}
]
}
}
})
};
fetch('https://ledgersyncappv2.com/api/v2/statements/refresh/mfa', 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://ledgersyncappv2.com/api/v2/statements/refresh/mfa",
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([
'bankAccountId' => 123,
'accountId' => 123,
'pullIndex' => 123,
'mfaChallenge' => [
'mfaSession' => '<string>',
'mfaBody' => [
'questions' => [
[
'text' => '<string>',
'image' => '<string>',
'choices' => [
[
'choice' => '<string>',
'value' => '<string>'
]
],
'imageChoices' => [
[
'imageChoice' => '<string>',
'value' => '<string>'
]
],
'answer' => '<string>'
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Auth-Token: <auth-token>",
"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://ledgersyncappv2.com/api/v2/statements/refresh/mfa"
payload := strings.NewReader("{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Auth-Token", "<auth-token>")
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://ledgersyncappv2.com/api/v2/statements/refresh/mfa")
.header("Auth-Token", "<auth-token>")
.header("Content-Type", "application/json")
.body("{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ledgersyncappv2.com/api/v2/statements/refresh/mfa")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Auth-Token"] = '<auth-token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bankAccountId\": 123,\n \"accountId\": 123,\n \"pullIndex\": 123,\n \"mfaChallenge\": {\n \"mfaSession\": \"<string>\",\n \"mfaBody\": {\n \"questions\": [\n {\n \"text\": \"<string>\",\n \"image\": \"<string>\",\n \"choices\": [\n {\n \"choice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"imageChoices\": [\n {\n \"imageChoice\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"answer\": \"<string>\"\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}{
"responseList": [
{
"refreshStatus": "SUCCESS",
"bankAccountId": 123,
"accountId": 123,
"pullIndex": 123,
"mfaWrapper": {
"statusCode": "100 CONTINUE",
"noMfaResponse": "<unknown>",
"mfaRequest": {
"mfaSession": "<string>",
"mfaBody": {
"questions": [
{
"text": "<string>",
"image": "<string>",
"choices": [
{
"choice": "<string>",
"value": "<string>"
}
],
"imageChoices": [
{
"imageChoice": "<string>",
"value": "<string>"
}
],
"answer": "<string>"
}
]
}
},
"errorMessage": "<string>"
}
}
],
"errorMsg": "<string>"
}Body
application/json
