The Plaid API
POST
(Deprecated) Check digital income verification eligibility and optimize conversion
{{baseUrl}}/income/verification/precheck
BODY json
{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/income/verification/precheck");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/income/verification/precheck" {:content-type :json
:form-params {:client_id ""
:employer {:address {}
:name ""
:tax_id ""
:url ""}
:payroll_institution {:name ""}
:secret ""
:transactions_access_token ""
:transactions_access_tokens []
:us_military_info {:branch ""
:is_active_duty false}
:user {:email_address ""
:first_name ""
:home_address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:last_name ""}}})
require "http/client"
url = "{{baseUrl}}/income/verification/precheck"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/income/verification/precheck"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/income/verification/precheck");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/income/verification/precheck"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/income/verification/precheck HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 534
{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/income/verification/precheck")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/income/verification/precheck"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/income/verification/precheck")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/income/verification/precheck")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
client_id: '',
employer: {
address: {},
name: '',
tax_id: '',
url: ''
},
payroll_institution: {
name: ''
},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {
branch: '',
is_active_duty: false
},
user: {
email_address: '',
first_name: '',
home_address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
last_name: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/income/verification/precheck');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/precheck',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {branch: '', is_active_duty: false},
user: {
email_address: '',
first_name: '',
home_address: {city: '', country: '', postal_code: '', region: '', street: ''},
last_name: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/income/verification/precheck';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","employer":{"address":{},"name":"","tax_id":"","url":""},"payroll_institution":{"name":""},"secret":"","transactions_access_token":"","transactions_access_tokens":[],"us_military_info":{"branch":"","is_active_duty":false},"user":{"email_address":"","first_name":"","home_address":{"city":"","country":"","postal_code":"","region":"","street":""},"last_name":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/income/verification/precheck',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "employer": {\n "address": {},\n "name": "",\n "tax_id": "",\n "url": ""\n },\n "payroll_institution": {\n "name": ""\n },\n "secret": "",\n "transactions_access_token": "",\n "transactions_access_tokens": [],\n "us_military_info": {\n "branch": "",\n "is_active_duty": false\n },\n "user": {\n "email_address": "",\n "first_name": "",\n "home_address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "last_name": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/income/verification/precheck")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/income/verification/precheck',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {branch: '', is_active_duty: false},
user: {
email_address: '',
first_name: '',
home_address: {city: '', country: '', postal_code: '', region: '', street: ''},
last_name: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/precheck',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {branch: '', is_active_duty: false},
user: {
email_address: '',
first_name: '',
home_address: {city: '', country: '', postal_code: '', region: '', street: ''},
last_name: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/income/verification/precheck');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
employer: {
address: {},
name: '',
tax_id: '',
url: ''
},
payroll_institution: {
name: ''
},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {
branch: '',
is_active_duty: false
},
user: {
email_address: '',
first_name: '',
home_address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
last_name: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/precheck',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
transactions_access_token: '',
transactions_access_tokens: [],
us_military_info: {branch: '', is_active_duty: false},
user: {
email_address: '',
first_name: '',
home_address: {city: '', country: '', postal_code: '', region: '', street: ''},
last_name: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/income/verification/precheck';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","employer":{"address":{},"name":"","tax_id":"","url":""},"payroll_institution":{"name":""},"secret":"","transactions_access_token":"","transactions_access_tokens":[],"us_military_info":{"branch":"","is_active_duty":false},"user":{"email_address":"","first_name":"","home_address":{"city":"","country":"","postal_code":"","region":"","street":""},"last_name":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"employer": @{ @"address": @{ }, @"name": @"", @"tax_id": @"", @"url": @"" },
@"payroll_institution": @{ @"name": @"" },
@"secret": @"",
@"transactions_access_token": @"",
@"transactions_access_tokens": @[ ],
@"us_military_info": @{ @"branch": @"", @"is_active_duty": @NO },
@"user": @{ @"email_address": @"", @"first_name": @"", @"home_address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"last_name": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/income/verification/precheck"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/income/verification/precheck" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/income/verification/precheck",
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([
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'transactions_access_token' => '',
'transactions_access_tokens' => [
],
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user' => [
'email_address' => '',
'first_name' => '',
'home_address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'last_name' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/income/verification/precheck', [
'body' => '{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/income/verification/precheck');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'transactions_access_token' => '',
'transactions_access_tokens' => [
],
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user' => [
'email_address' => '',
'first_name' => '',
'home_address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'last_name' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'transactions_access_token' => '',
'transactions_access_tokens' => [
],
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user' => [
'email_address' => '',
'first_name' => '',
'home_address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'last_name' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/income/verification/precheck');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/income/verification/precheck' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/income/verification/precheck' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/income/verification/precheck", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/income/verification/precheck"
payload = {
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": { "name": "" },
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": False
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/income/verification/precheck"
payload <- "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/income/verification/precheck")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/income/verification/precheck') do |req|
req.body = "{\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"transactions_access_token\": \"\",\n \"transactions_access_tokens\": [],\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user\": {\n \"email_address\": \"\",\n \"first_name\": \"\",\n \"home_address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"last_name\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/income/verification/precheck";
let payload = json!({
"client_id": "",
"employer": json!({
"address": json!({}),
"name": "",
"tax_id": "",
"url": ""
}),
"payroll_institution": json!({"name": ""}),
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": (),
"us_military_info": json!({
"branch": "",
"is_active_duty": false
}),
"user": json!({
"email_address": "",
"first_name": "",
"home_address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"last_name": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/income/verification/precheck \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}'
echo '{
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user": {
"email_address": "",
"first_name": "",
"home_address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"last_name": ""
}
}' | \
http POST {{baseUrl}}/income/verification/precheck \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "employer": {\n "address": {},\n "name": "",\n "tax_id": "",\n "url": ""\n },\n "payroll_institution": {\n "name": ""\n },\n "secret": "",\n "transactions_access_token": "",\n "transactions_access_tokens": [],\n "us_military_info": {\n "branch": "",\n "is_active_duty": false\n },\n "user": {\n "email_address": "",\n "first_name": "",\n "home_address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "last_name": ""\n }\n}' \
--output-document \
- {{baseUrl}}/income/verification/precheck
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"employer": [
"address": [],
"name": "",
"tax_id": "",
"url": ""
],
"payroll_institution": ["name": ""],
"secret": "",
"transactions_access_token": "",
"transactions_access_tokens": [],
"us_military_info": [
"branch": "",
"is_active_duty": false
],
"user": [
"email_address": "",
"first_name": "",
"home_address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"last_name": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/income/verification/precheck")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"confidence": "HIGH",
"precheck_id": "n9elqYlvYm",
"request_id": "lMjeOeu9X1VUh1F"
}
POST
(Deprecated) Create an income verification instance
{{baseUrl}}/income/verification/create
BODY json
{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/income/verification/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/income/verification/create" {:content-type :json
:form-params {:client_id ""
:options {:access_tokens []}
:precheck_id ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/income/verification/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/income/verification/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/income/verification/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/income/verification/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/income/verification/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 119
{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/income/verification/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/income/verification/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/income/verification/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/income/verification/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
options: {
access_tokens: []
},
precheck_id: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/income/verification/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {access_tokens: []},
precheck_id: '',
secret: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/income/verification/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"access_tokens":[]},"precheck_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/income/verification/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "options": {\n "access_tokens": []\n },\n "precheck_id": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/income/verification/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/income/verification/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
options: {access_tokens: []},
precheck_id: '',
secret: '',
webhook: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
options: {access_tokens: []},
precheck_id: '',
secret: '',
webhook: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/income/verification/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
options: {
access_tokens: []
},
precheck_id: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {access_tokens: []},
precheck_id: '',
secret: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/income/verification/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"access_tokens":[]},"precheck_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"options": @{ @"access_tokens": @[ ] },
@"precheck_id": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/income/verification/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/income/verification/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/income/verification/create",
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([
'client_id' => '',
'options' => [
'access_tokens' => [
]
],
'precheck_id' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/income/verification/create', [
'body' => '{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/income/verification/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'options' => [
'access_tokens' => [
]
],
'precheck_id' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'options' => [
'access_tokens' => [
]
],
'precheck_id' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/income/verification/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/income/verification/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/income/verification/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/income/verification/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/income/verification/create"
payload = {
"client_id": "",
"options": { "access_tokens": [] },
"precheck_id": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/income/verification/create"
payload <- "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/income/verification/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/income/verification/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"access_tokens\": []\n },\n \"precheck_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/income/verification/create";
let payload = json!({
"client_id": "",
"options": json!({"access_tokens": ()}),
"precheck_id": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/income/verification/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}'
echo '{
"client_id": "",
"options": {
"access_tokens": []
},
"precheck_id": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/income/verification/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "options": {\n "access_tokens": []\n },\n "precheck_id": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/income/verification/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"options": ["access_tokens": []],
"precheck_id": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/income/verification/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"income_verification_id": "f2a826d7-25cf-483b-a124-c40beb64b732",
"request_id": "lMjeOeu9X1VUh1F"
}
POST
(Deprecated) Download the original documents used for income verification
{{baseUrl}}/income/verification/documents/download
BODY json
{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/income/verification/documents/download");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/income/verification/documents/download" {:content-type :json
:form-params {:access_token ""
:client_id ""
:document_id ""
:income_verification_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/income/verification/documents/download"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/income/verification/documents/download"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/income/verification/documents/download");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/income/verification/documents/download"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/income/verification/documents/download HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 112
{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/income/verification/documents/download")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/income/verification/documents/download"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/income/verification/documents/download")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/income/verification/documents/download")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/income/verification/documents/download');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/documents/download',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/income/verification/documents/download';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","document_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/income/verification/documents/download',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "document_id": "",\n "income_verification_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/income/verification/documents/download")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/income/verification/documents/download',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/documents/download',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/income/verification/documents/download');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/documents/download',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
document_id: '',
income_verification_id: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/income/verification/documents/download';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","document_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"document_id": @"",
@"income_verification_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/income/verification/documents/download"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/income/verification/documents/download" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/income/verification/documents/download",
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([
'access_token' => '',
'client_id' => '',
'document_id' => '',
'income_verification_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/income/verification/documents/download', [
'body' => '{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/income/verification/documents/download');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'document_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'document_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/income/verification/documents/download');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/income/verification/documents/download' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/income/verification/documents/download' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/income/verification/documents/download", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/income/verification/documents/download"
payload = {
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/income/verification/documents/download"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/income/verification/documents/download")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/income/verification/documents/download') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"document_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/income/verification/documents/download";
let payload = json!({
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/income/verification/documents/download \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/income/verification/documents/download \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "document_id": "",\n "income_verification_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/income/verification/documents/download
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"document_id": "",
"income_verification_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/income/verification/documents/download")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
(Deprecated) Retrieve a summary of an individual's employment information
{{baseUrl}}/employment/verification/get
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/employment/verification/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/employment/verification/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/employment/verification/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/employment/verification/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/employment/verification/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/employment/verification/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/employment/verification/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/employment/verification/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/employment/verification/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/employment/verification/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/employment/verification/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/employment/verification/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/employment/verification/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/employment/verification/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/employment/verification/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/employment/verification/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/employment/verification/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/employment/verification/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/employment/verification/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/employment/verification/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/employment/verification/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/employment/verification/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/employment/verification/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/employment/verification/get",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/employment/verification/get', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/employment/verification/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/employment/verification/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/employment/verification/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/employment/verification/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/employment/verification/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/employment/verification/get"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/employment/verification/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/employment/verification/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/employment/verification/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/employment/verification/get";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/employment/verification/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/employment/verification/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/employment/verification/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/employment/verification/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"employments": [
{
"employer": {
"name": "Plaid Inc"
},
"end_date": null,
"platform_ids": {
"employee_id": "1234567",
"payroll_id": "1234567",
"position_id": "8888"
},
"start_date": "2020-01-01",
"status": "EMPLOYMENT_STATUS_ACTIVE",
"title": "Software Engineer"
}
],
"request_id": "LhQf0THi8SH1yJm"
}
POST
(Deprecated) Retrieve information from the paystubs used for income verification
{{baseUrl}}/income/verification/paystubs/get
BODY json
{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/income/verification/paystubs/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/income/verification/paystubs/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:income_verification_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/income/verification/paystubs/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/income/verification/paystubs/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/income/verification/paystubs/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/income/verification/paystubs/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/income/verification/paystubs/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 91
{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/income/verification/paystubs/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/income/verification/paystubs/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/income/verification/paystubs/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/income/verification/paystubs/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
income_verification_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/income/verification/paystubs/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/paystubs/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', income_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/income/verification/paystubs/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/income/verification/paystubs/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "income_verification_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/income/verification/paystubs/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/income/verification/paystubs/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', income_verification_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/paystubs/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', income_verification_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/income/verification/paystubs/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
income_verification_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/paystubs/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', income_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/income/verification/paystubs/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"income_verification_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/income/verification/paystubs/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/income/verification/paystubs/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/income/verification/paystubs/get",
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([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/income/verification/paystubs/get', [
'body' => '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/income/verification/paystubs/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/income/verification/paystubs/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/income/verification/paystubs/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/income/verification/paystubs/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/income/verification/paystubs/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/income/verification/paystubs/get"
payload = {
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/income/verification/paystubs/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/income/verification/paystubs/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/income/verification/paystubs/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/income/verification/paystubs/get";
let payload = json!({
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/income/verification/paystubs/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/income/verification/paystubs/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "income_verification_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/income/verification/paystubs/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/income/verification/paystubs/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"document_metadata": [
{
"doc_id": "2jkflanbd",
"doc_type": "DOCUMENT_TYPE_PAYSTUB",
"name": "paystub.pdf",
"status": "DOCUMENT_STATUS_PROCESSING_COMPLETE"
}
],
"paystubs": [
{
"deductions": {
"breakdown": [
{
"current_amount": 123.45,
"description": "taxes",
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 246.9
}
],
"total": {
"current_amount": 123.45,
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 246.9
}
},
"doc_id": "2jkflanbd",
"earnings": {
"breakdown": [
{
"canonical_description": "REGULAR PAY",
"current_amount": 200.22,
"description": "salary earned",
"hours": 80,
"iso_currency_code": "USD",
"rate": null,
"unofficial_currency_code": null,
"ytd_amount": 400.44
},
{
"canonical_desription": "BONUS",
"current_amount": 100,
"description": "bonus earned",
"hours": null,
"iso_currency_code": "USD",
"rate": null,
"unofficial_currency_code": null,
"ytd_amount": 100
}
],
"total": {
"current_amount": 300.22,
"hours": 160,
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 500.44
}
},
"employee": {
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94133",
"region": "CA",
"street": "2140 TAYLOR ST"
},
"marital_status": "single",
"name": "ANNA CHARLESTON",
"taxpayer_id": {
"id_mask": "3333",
"id_type": "SSN"
}
},
"employer": {
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94111",
"region": "CA",
"street": "1098 HARRISON ST"
},
"name": "PLAID INC"
},
"net_pay": {
"current_amount": 123.34,
"description": "TOTAL NET PAY",
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 253.54
},
"pay_period_details": {
"check_amount": 1490.21,
"distribution_breakdown": [
{
"account_name": "Big time checking",
"bank_name": "bank of plaid",
"current_amount": 176.77,
"iso_currency_code": "USD",
"mask": "1223",
"type": "checking",
"unofficial_currency_code": null
}
],
"end_date": "2020-12-15",
"gross_earnings": 4500,
"pay_date": "2020-12-15",
"pay_frequency": "PAY_FREQUENCY_BIWEEKLY",
"start_date": "2020-12-01"
}
}
],
"request_id": "2pxQ59buGdsHRef"
}
POST
(Deprecated) Retrieve information from the tax documents used for income verification
{{baseUrl}}/income/verification/taxforms/get
BODY json
{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/income/verification/taxforms/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/income/verification/taxforms/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:income_verification_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/income/verification/taxforms/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/income/verification/taxforms/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/income/verification/taxforms/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/income/verification/taxforms/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/income/verification/taxforms/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 91
{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/income/verification/taxforms/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/income/verification/taxforms/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/income/verification/taxforms/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/income/verification/taxforms/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
income_verification_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/income/verification/taxforms/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/taxforms/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', income_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/income/verification/taxforms/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/income/verification/taxforms/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "income_verification_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/income/verification/taxforms/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/income/verification/taxforms/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', income_verification_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/taxforms/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', income_verification_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/income/verification/taxforms/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
income_verification_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/income/verification/taxforms/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', income_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/income/verification/taxforms/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","income_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"income_verification_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/income/verification/taxforms/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/income/verification/taxforms/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/income/verification/taxforms/get",
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([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/income/verification/taxforms/get', [
'body' => '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/income/verification/taxforms/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'income_verification_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/income/verification/taxforms/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/income/verification/taxforms/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/income/verification/taxforms/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/income/verification/taxforms/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/income/verification/taxforms/get"
payload = {
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/income/verification/taxforms/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/income/verification/taxforms/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/income/verification/taxforms/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"income_verification_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/income/verification/taxforms/get";
let payload = json!({
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/income/verification/taxforms/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/income/verification/taxforms/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "income_verification_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/income/verification/taxforms/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"income_verification_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/income/verification/taxforms/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"document_metadata": [
{
"doc_id": "q5Ypbbr03p",
"doc_type": "DOCUMENT_TYPE_US_TAX_W2",
"name": "my_w2.pdf",
"status": "DOCUMENT_STATUS_PROCESSING_COMPLETE"
}
],
"request_id": "73W7sz8nIP8Mgck",
"taxforms": [
{
"document_type": "W2",
"w2": {
"allocated_tips": "1000",
"box_12": [
{
"amount": "200",
"code": "AA"
}
],
"box_9": "box9",
"dependent_care_benefits": "1000",
"employee": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94103",
"region": "CA",
"street": "1234 Grand St"
},
"marital_status": "single",
"name": "Josie Georgia Harrison",
"taxpayer_id": {
"id_mask": "1234",
"id_type": "SSN"
}
},
"employee_id_number": "12-1234567",
"employer": {
"address": {
"city": "New York",
"country": "US",
"postal_code": "10010",
"region": "NY",
"street": "456 Main St"
},
"name": "Acme Inc"
},
"federal_income_tax_withheld": "1000",
"medicare_tax_withheld": "1000",
"medicare_wages_and_tips": "1000",
"nonqualified_plans": "1000",
"other": "other",
"retirement_plan": "CHECKED",
"social_security_tax_withheld": "1000",
"social_security_tips": "1000",
"social_security_wages": "1000",
"state_and_local_wages": [
{
"employer_state_id_number": "11111111111AAA",
"local_income_tax": "200",
"local_wages_and_tips": "200",
"locality_name": "local",
"state": "UT",
"state_income_tax": "200",
"state_wages_tips": "200"
}
],
"statutory_employee": "CHECKED",
"tax_year": "2020",
"third_party_sick_pay": "CHECKED",
"wages_tips_other_comp": "1000"
}
}
]
}
POST
Advance a test clock
{{baseUrl}}/sandbox/transfer/test_clock/advance
BODY json
{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/test_clock/advance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/test_clock/advance" {:content-type :json
:form-params {:client_id ""
:new_virtual_time ""
:secret ""
:test_clock_id ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/test_clock/advance"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/test_clock/advance"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/test_clock/advance");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/test_clock/advance"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/test_clock/advance HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 86
{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/test_clock/advance")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/test_clock/advance"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/advance")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/test_clock/advance")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
new_virtual_time: '',
secret: '',
test_clock_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/test_clock/advance');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/advance',
headers: {'content-type': 'application/json'},
data: {client_id: '', new_virtual_time: '', secret: '', test_clock_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/test_clock/advance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","new_virtual_time":"","secret":"","test_clock_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/test_clock/advance',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "new_virtual_time": "",\n "secret": "",\n "test_clock_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/advance")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/test_clock/advance',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', new_virtual_time: '', secret: '', test_clock_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/advance',
headers: {'content-type': 'application/json'},
body: {client_id: '', new_virtual_time: '', secret: '', test_clock_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/test_clock/advance');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
new_virtual_time: '',
secret: '',
test_clock_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/advance',
headers: {'content-type': 'application/json'},
data: {client_id: '', new_virtual_time: '', secret: '', test_clock_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/test_clock/advance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","new_virtual_time":"","secret":"","test_clock_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"new_virtual_time": @"",
@"secret": @"",
@"test_clock_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/test_clock/advance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/test_clock/advance" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/test_clock/advance",
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([
'client_id' => '',
'new_virtual_time' => '',
'secret' => '',
'test_clock_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/test_clock/advance', [
'body' => '{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/test_clock/advance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'new_virtual_time' => '',
'secret' => '',
'test_clock_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'new_virtual_time' => '',
'secret' => '',
'test_clock_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/test_clock/advance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/test_clock/advance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/test_clock/advance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/test_clock/advance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/test_clock/advance"
payload = {
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/test_clock/advance"
payload <- "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/test_clock/advance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/test_clock/advance') do |req|
req.body = "{\n \"client_id\": \"\",\n \"new_virtual_time\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/test_clock/advance";
let payload = json!({
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/test_clock/advance \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}'
echo '{
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/test_clock/advance \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "new_virtual_time": "",\n "secret": "",\n "test_clock_id": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/test_clock/advance
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"new_virtual_time": "",
"secret": "",
"test_clock_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/test_clock/advance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Cancel a bank transfer
{{baseUrl}}/bank_transfer/cancel
BODY json
{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/cancel" {:content-type :json
:form-params {:bank_transfer_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/cancel"),
Content = new StringContent("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/cancel"
payload := strings.NewReader("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/cancel")
.setHeader("content-type", "application/json")
.setBody("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/cancel")
.header("content-type", "application/json")
.body("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
bank_transfer_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/cancel',
headers: {'content-type': 'application/json'},
data: {bank_transfer_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bank_transfer_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({bank_transfer_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/cancel',
headers: {'content-type': 'application/json'},
body: {bank_transfer_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bank_transfer_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/cancel',
headers: {'content-type': 'application/json'},
data: {bank_transfer_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bank_transfer_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/cancel",
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([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/cancel', [
'body' => '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/cancel"
payload = {
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/cancel"
payload <- "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/cancel') do |req|
req.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/cancel";
let payload = json!({
"bank_transfer_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/cancel \
--header 'content-type: application/json' \
--data '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/bank_transfer/cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bank_transfer_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bank_transfer_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno"
}
POST
Cancel a recurring transfer.
{{baseUrl}}/transfer/recurring/cancel
BODY json
{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/recurring/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/recurring/cancel" {:content-type :json
:form-params {:client_id ""
:recurring_transfer_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/recurring/cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/recurring/cancel"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/recurring/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/recurring/cancel"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/recurring/cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/recurring/cancel")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/recurring/cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/recurring/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/recurring/cancel")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
recurring_transfer_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/recurring/cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', recurring_transfer_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/recurring/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recurring_transfer_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/recurring/cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "recurring_transfer_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/recurring/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/recurring/cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', recurring_transfer_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/cancel',
headers: {'content-type': 'application/json'},
body: {client_id: '', recurring_transfer_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/recurring/cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
recurring_transfer_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', recurring_transfer_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/recurring/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recurring_transfer_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"recurring_transfer_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/recurring/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/recurring/cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/recurring/cancel",
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([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/recurring/cancel', [
'body' => '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/recurring/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/recurring/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/recurring/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/recurring/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/recurring/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/recurring/cancel"
payload = {
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/recurring/cancel"
payload <- "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/recurring/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/recurring/cancel') do |req|
req.body = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/recurring/cancel";
let payload = json!({
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/recurring/cancel \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/recurring/cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "recurring_transfer_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/recurring/cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/recurring/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno"
}
POST
Cancel a refund
{{baseUrl}}/transfer/refund/cancel
BODY json
{
"client_id": "",
"refund_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/refund/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/refund/cancel" {:content-type :json
:form-params {:client_id ""
:refund_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/refund/cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/refund/cancel"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/refund/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/refund/cancel"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/refund/cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"client_id": "",
"refund_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/refund/cancel")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/refund/cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/refund/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/refund/cancel")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
refund_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/refund/cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', refund_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/refund/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","refund_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/refund/cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "refund_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/refund/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/refund/cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', refund_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/cancel',
headers: {'content-type': 'application/json'},
body: {client_id: '', refund_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/refund/cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
refund_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', refund_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/refund/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","refund_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"refund_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/refund/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/refund/cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/refund/cancel",
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([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/refund/cancel', [
'body' => '{
"client_id": "",
"refund_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/refund/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/refund/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/refund/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/refund/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/refund/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/refund/cancel"
payload = {
"client_id": "",
"refund_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/refund/cancel"
payload <- "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/refund/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/refund/cancel') do |req|
req.body = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/refund/cancel";
let payload = json!({
"client_id": "",
"refund_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/refund/cancel \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"refund_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/refund/cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "refund_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/refund/cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"refund_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/refund/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno"
}
POST
Cancel a transfer
{{baseUrl}}/transfer/cancel
BODY json
{
"client_id": "",
"secret": "",
"transfer_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/cancel" {:content-type :json
:form-params {:client_id ""
:secret ""
:transfer_id ""}})
require "http/client"
url = "{{baseUrl}}/transfer/cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/cancel"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/cancel"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"client_id": "",
"secret": "",
"transfer_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/cancel")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/cancel")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
transfer_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "transfer_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', transfer_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/cancel',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', transfer_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
transfer_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/cancel',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"transfer_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/cancel",
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([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/cancel', [
'body' => '{
"client_id": "",
"secret": "",
"transfer_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/cancel"
payload = {
"client_id": "",
"secret": "",
"transfer_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/cancel"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/cancel') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/cancel";
let payload = json!({
"client_id": "",
"secret": "",
"transfer_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/cancel \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"transfer_id": ""
}' | \
http POST {{baseUrl}}/transfer/cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "transfer_id": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"transfer_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno"
}
POST
Check income verification eligibility and optimize conversion
{{baseUrl}}/credit/payroll_income/precheck
BODY json
{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/payroll_income/precheck");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/payroll_income/precheck" {:content-type :json
:form-params {:access_tokens []
:client_id ""
:employer {:address {}
:name ""
:tax_id ""
:url ""}
:payroll_institution {:name ""}
:secret ""
:us_military_info {:branch ""
:is_active_duty false}
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/payroll_income/precheck"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/payroll_income/precheck"),
Content = new StringContent("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/payroll_income/precheck");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/payroll_income/precheck"
payload := strings.NewReader("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/payroll_income/precheck HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 290
{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/payroll_income/precheck")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/payroll_income/precheck"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/precheck")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/payroll_income/precheck")
.header("content-type", "application/json")
.body("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_tokens: [],
client_id: '',
employer: {
address: {},
name: '',
tax_id: '',
url: ''
},
payroll_institution: {
name: ''
},
secret: '',
us_military_info: {
branch: '',
is_active_duty: false
},
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/payroll_income/precheck');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/precheck',
headers: {'content-type': 'application/json'},
data: {
access_tokens: [],
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
us_military_info: {branch: '', is_active_duty: false},
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/payroll_income/precheck';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_tokens":[],"client_id":"","employer":{"address":{},"name":"","tax_id":"","url":""},"payroll_institution":{"name":""},"secret":"","us_military_info":{"branch":"","is_active_duty":false},"user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/payroll_income/precheck',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_tokens": [],\n "client_id": "",\n "employer": {\n "address": {},\n "name": "",\n "tax_id": "",\n "url": ""\n },\n "payroll_institution": {\n "name": ""\n },\n "secret": "",\n "us_military_info": {\n "branch": "",\n "is_active_duty": false\n },\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/precheck")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/payroll_income/precheck',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_tokens: [],
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
us_military_info: {branch: '', is_active_duty: false},
user_token: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/precheck',
headers: {'content-type': 'application/json'},
body: {
access_tokens: [],
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
us_military_info: {branch: '', is_active_duty: false},
user_token: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/payroll_income/precheck');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_tokens: [],
client_id: '',
employer: {
address: {},
name: '',
tax_id: '',
url: ''
},
payroll_institution: {
name: ''
},
secret: '',
us_military_info: {
branch: '',
is_active_duty: false
},
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/precheck',
headers: {'content-type': 'application/json'},
data: {
access_tokens: [],
client_id: '',
employer: {address: {}, name: '', tax_id: '', url: ''},
payroll_institution: {name: ''},
secret: '',
us_military_info: {branch: '', is_active_duty: false},
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/payroll_income/precheck';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_tokens":[],"client_id":"","employer":{"address":{},"name":"","tax_id":"","url":""},"payroll_institution":{"name":""},"secret":"","us_military_info":{"branch":"","is_active_duty":false},"user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_tokens": @[ ],
@"client_id": @"",
@"employer": @{ @"address": @{ }, @"name": @"", @"tax_id": @"", @"url": @"" },
@"payroll_institution": @{ @"name": @"" },
@"secret": @"",
@"us_military_info": @{ @"branch": @"", @"is_active_duty": @NO },
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/payroll_income/precheck"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/payroll_income/precheck" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/payroll_income/precheck",
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([
'access_tokens' => [
],
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/payroll_income/precheck', [
'body' => '{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/payroll_income/precheck');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_tokens' => [
],
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_tokens' => [
],
'client_id' => '',
'employer' => [
'address' => [
],
'name' => '',
'tax_id' => '',
'url' => ''
],
'payroll_institution' => [
'name' => ''
],
'secret' => '',
'us_military_info' => [
'branch' => '',
'is_active_duty' => null
],
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/payroll_income/precheck');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/payroll_income/precheck' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/payroll_income/precheck' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/payroll_income/precheck", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/payroll_income/precheck"
payload = {
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": { "name": "" },
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": False
},
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/payroll_income/precheck"
payload <- "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/payroll_income/precheck")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/payroll_income/precheck') do |req|
req.body = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"employer\": {\n \"address\": {},\n \"name\": \"\",\n \"tax_id\": \"\",\n \"url\": \"\"\n },\n \"payroll_institution\": {\n \"name\": \"\"\n },\n \"secret\": \"\",\n \"us_military_info\": {\n \"branch\": \"\",\n \"is_active_duty\": false\n },\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/payroll_income/precheck";
let payload = json!({
"access_tokens": (),
"client_id": "",
"employer": json!({
"address": json!({}),
"name": "",
"tax_id": "",
"url": ""
}),
"payroll_institution": json!({"name": ""}),
"secret": "",
"us_military_info": json!({
"branch": "",
"is_active_duty": false
}),
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/payroll_income/precheck \
--header 'content-type: application/json' \
--data '{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}'
echo '{
"access_tokens": [],
"client_id": "",
"employer": {
"address": {},
"name": "",
"tax_id": "",
"url": ""
},
"payroll_institution": {
"name": ""
},
"secret": "",
"us_military_info": {
"branch": "",
"is_active_duty": false
},
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/payroll_income/precheck \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_tokens": [],\n "client_id": "",\n "employer": {\n "address": {},\n "name": "",\n "tax_id": "",\n "url": ""\n },\n "payroll_institution": {\n "name": ""\n },\n "secret": "",\n "us_military_info": {\n "branch": "",\n "is_active_duty": false\n },\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/payroll_income/precheck
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_tokens": [],
"client_id": "",
"employer": [
"address": [],
"name": "",
"tax_id": "",
"url": ""
],
"payroll_institution": ["name": ""],
"secret": "",
"us_military_info": [
"branch": "",
"is_active_duty": false
],
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/payroll_income/precheck")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"confidence": "HIGH",
"request_id": "lMjeOeu9X1VUh1F"
}
POST
Create Apex bank account token
{{baseUrl}}/processor/apex/processor_token/create
BODY json
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/apex/processor_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/apex/processor_token/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/apex/processor_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/apex/processor_token/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/apex/processor_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/apex/processor_token/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/apex/processor_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/apex/processor_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/apex/processor_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/apex/processor_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/apex/processor_token/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/apex/processor_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/apex/processor_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/apex/processor_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/apex/processor_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/apex/processor_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/apex/processor_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', account_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/apex/processor_token/create',
headers: {'content-type': 'application/json'},
body: {access_token: '', account_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/apex/processor_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/apex/processor_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/apex/processor_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/apex/processor_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/apex/processor_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/apex/processor_token/create",
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([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/apex/processor_token/create', [
'body' => '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/apex/processor_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/apex/processor_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/apex/processor_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/apex/processor_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/apex/processor_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/apex/processor_token/create"
payload = {
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/apex/processor_token/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/apex/processor_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/apex/processor_token/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/apex/processor_token/create";
let payload = json!({
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/apex/processor_token/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/apex/processor_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/apex/processor_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/apex/processor_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Create Asset Report Audit Copy
{{baseUrl}}/asset_report/audit_copy/create
BODY json
{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/audit_copy/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/audit_copy/create" {:content-type :json
:form-params {:asset_report_token ""
:auditor_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/audit_copy/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/audit_copy/create"),
Content = new StringContent("{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/audit_copy/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/audit_copy/create"
payload := strings.NewReader("{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/audit_copy/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 85
{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/audit_copy/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/audit_copy/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/audit_copy/create")
.header("content-type", "application/json")
.body("{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
asset_report_token: '',
auditor_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/audit_copy/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/create',
headers: {'content-type': 'application/json'},
data: {asset_report_token: '', auditor_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/audit_copy/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","auditor_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/audit_copy/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "asset_report_token": "",\n "auditor_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/audit_copy/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({asset_report_token: '', auditor_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/create',
headers: {'content-type': 'application/json'},
body: {asset_report_token: '', auditor_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/audit_copy/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
asset_report_token: '',
auditor_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/create',
headers: {'content-type': 'application/json'},
data: {asset_report_token: '', auditor_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/audit_copy/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","auditor_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"asset_report_token": @"",
@"auditor_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/audit_copy/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/audit_copy/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/audit_copy/create",
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([
'asset_report_token' => '',
'auditor_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/audit_copy/create', [
'body' => '{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/audit_copy/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'asset_report_token' => '',
'auditor_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'asset_report_token' => '',
'auditor_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/audit_copy/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/audit_copy/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/audit_copy/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/audit_copy/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/audit_copy/create"
payload = {
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/audit_copy/create"
payload <- "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/audit_copy/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/audit_copy/create') do |req|
req.body = "{\n \"asset_report_token\": \"\",\n \"auditor_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/audit_copy/create";
let payload = json!({
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/audit_copy/create \
--header 'content-type: application/json' \
--data '{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/audit_copy/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "asset_report_token": "",\n "auditor_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/audit_copy/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"asset_report_token": "",
"auditor_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/audit_copy/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_copy_token": "a-sandbox-3TAU2CWVYBDVRHUCAAAI27ULU4",
"request_id": "Iam3b"
}
POST
Create Asset or Income Report Audit Copy Token
{{baseUrl}}/credit/audit_copy_token/create
BODY json
{
"client_id": "",
"report_tokens": [],
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/audit_copy_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/audit_copy_token/create" {:content-type :json
:form-params {:client_id ""
:report_tokens []
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/audit_copy_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/audit_copy_token/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/audit_copy_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/audit_copy_token/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/audit_copy_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 60
{
"client_id": "",
"report_tokens": [],
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/audit_copy_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/audit_copy_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/audit_copy_token/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
report_tokens: [],
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/audit_copy_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', report_tokens: [], secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/audit_copy_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","report_tokens":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/audit_copy_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "report_tokens": [],\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/audit_copy_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', report_tokens: [], secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', report_tokens: [], secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/audit_copy_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
report_tokens: [],
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', report_tokens: [], secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/audit_copy_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","report_tokens":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"report_tokens": @[ ],
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/audit_copy_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/audit_copy_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/audit_copy_token/create",
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([
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/audit_copy_token/create', [
'body' => '{
"client_id": "",
"report_tokens": [],
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/audit_copy_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/audit_copy_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/audit_copy_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"report_tokens": [],
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/audit_copy_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"report_tokens": [],
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/audit_copy_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/audit_copy_token/create"
payload = {
"client_id": "",
"report_tokens": [],
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/audit_copy_token/create"
payload <- "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/audit_copy_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/audit_copy_token/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/audit_copy_token/create";
let payload = json!({
"client_id": "",
"report_tokens": (),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/audit_copy_token/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"report_tokens": [],
"secret": ""
}'
echo '{
"client_id": "",
"report_tokens": [],
"secret": ""
}' | \
http POST {{baseUrl}}/credit/audit_copy_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "report_tokens": [],\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/audit_copy_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"report_tokens": [],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/audit_copy_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_copy_token": "a-production-3tau2cwvybdvrhucaaai27ulu4",
"request_id": "Iam3b"
}
POST
Create Link Delivery session
{{baseUrl}}/link_delivery/create
BODY json
{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/link_delivery/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/link_delivery/create" {:content-type :json
:form-params {:client_id ""
:communication_methods [{:address ""
:method ""}]
:link_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/link_delivery/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/link_delivery/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/link_delivery/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/link_delivery/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/link_delivery/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 143
{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/link_delivery/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/link_delivery/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/link_delivery/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/link_delivery/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
communication_methods: [
{
address: '',
method: ''
}
],
link_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/link_delivery/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
communication_methods: [{address: '', method: ''}],
link_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/link_delivery/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","communication_methods":[{"address":"","method":""}],"link_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/link_delivery/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "communication_methods": [\n {\n "address": "",\n "method": ""\n }\n ],\n "link_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/link_delivery/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/link_delivery/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
communication_methods: [{address: '', method: ''}],
link_token: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
communication_methods: [{address: '', method: ''}],
link_token: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/link_delivery/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
communication_methods: [
{
address: '',
method: ''
}
],
link_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
communication_methods: [{address: '', method: ''}],
link_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/link_delivery/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","communication_methods":[{"address":"","method":""}],"link_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"communication_methods": @[ @{ @"address": @"", @"method": @"" } ],
@"link_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/link_delivery/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/link_delivery/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/link_delivery/create",
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([
'client_id' => '',
'communication_methods' => [
[
'address' => '',
'method' => ''
]
],
'link_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/link_delivery/create', [
'body' => '{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/link_delivery/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'communication_methods' => [
[
'address' => '',
'method' => ''
]
],
'link_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'communication_methods' => [
[
'address' => '',
'method' => ''
]
],
'link_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/link_delivery/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/link_delivery/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/link_delivery/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/link_delivery/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/link_delivery/create"
payload = {
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/link_delivery/create"
payload <- "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/link_delivery/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/link_delivery/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"communication_methods\": [\n {\n \"address\": \"\",\n \"method\": \"\"\n }\n ],\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/link_delivery/create";
let payload = json!({
"client_id": "",
"communication_methods": (
json!({
"address": "",
"method": ""
})
),
"link_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/link_delivery/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"communication_methods": [
{
"address": "",
"method": ""
}
],
"link_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/link_delivery/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "communication_methods": [\n {\n "address": "",\n "method": ""\n }\n ],\n "link_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/link_delivery/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"communication_methods": [
[
"address": "",
"method": ""
]
],
"link_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/link_delivery/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"link_delivery_session_id": "99ace160-3cf7-4e51-a083-403633425815",
"link_delivery_url": "http://hosted.plaid.com/99ace160-3cf7-4e51-a083-403633425815",
"request_id": "4ciYmmesdqSiUAB"
}
POST
Create Link Token
{{baseUrl}}/link/token/create
BODY json
{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/link/token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/link/token/create" {:content-type :json
:form-params {:access_token ""
:account_filters {:credit {:account_subtypes []}
:depository {:account_subtypes []}
:investment {:account_subtypes []}
:loan {:account_subtypes []}}
:additional_consented_products []
:android_package_name ""
:auth {:auth_type_select_enabled false
:automated_microdeposits_enabled false
:flow_type ""
:instant_match_enabled false
:same_day_microdeposits_enabled false}
:client_id ""
:client_name ""
:country_codes []
:deposit_switch {:deposit_switch_id ""}
:employment {:bank_employment {:days_requested 0}
:employment_source_types []}
:eu_config {:headless false}
:identity_verification {:consent ""
:gave_consent false
:template_id ""}
:income_verification {:access_tokens []
:asset_report_id ""
:bank_income {:days_requested 0
:enable_multiple_items false}
:income_source_types []
:income_verification_id ""
:payroll_income {:flow_types []
:is_update_mode false}
:precheck_id ""
:stated_income_sources [{:category ""
:employer ""
:pay_annual ""
:pay_frequency ""
:pay_per_cycle ""
:pay_type ""}]}
:institution_data {:routing_number ""}
:institution_id ""
:investments {:allow_unverified_crypto_wallets false}
:language ""
:link_customization_name ""
:payment_initiation {:consent_id ""
:payment_id ""}
:products []
:redirect_uri ""
:secret ""
:transfer {:intent_id ""
:payment_profile_token ""}
:update {:account_selection_enabled false}
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""
:street2 ""}
:client_user_id ""
:date_of_birth ""
:email_address ""
:email_address_verified_time ""
:id_number {:type ""
:value ""}
:legal_name ""
:name ""
:phone_number ""
:phone_number_verified_time ""
:ssn ""}
:user_token ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/link/token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/link/token/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/link/token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/link/token/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/link/token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2426
{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/link/token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/link/token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/link/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/link/token/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_filters: {
credit: {
account_subtypes: []
},
depository: {
account_subtypes: []
},
investment: {
account_subtypes: []
},
loan: {
account_subtypes: []
}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {
deposit_switch_id: ''
},
employment: {
bank_employment: {
days_requested: 0
},
employment_source_types: []
},
eu_config: {
headless: false
},
identity_verification: {
consent: '',
gave_consent: false,
template_id: ''
},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {
days_requested: 0,
enable_multiple_items: false
},
income_source_types: [],
income_verification_id: '',
payroll_income: {
flow_types: [],
is_update_mode: false
},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {
routing_number: ''
},
institution_id: '',
investments: {
allow_unverified_crypto_wallets: false
},
language: '',
link_customization_name: '',
payment_initiation: {
consent_id: '',
payment_id: ''
},
products: [],
redirect_uri: '',
secret: '',
transfer: {
intent_id: '',
payment_profile_token: ''
},
update: {
account_selection_enabled: false
},
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: '',
street2: ''
},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {
type: '',
value: ''
},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/link/token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_filters: {
credit: {account_subtypes: []},
depository: {account_subtypes: []},
investment: {account_subtypes: []},
loan: {account_subtypes: []}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {deposit_switch_id: ''},
employment: {bank_employment: {days_requested: 0}, employment_source_types: []},
eu_config: {headless: false},
identity_verification: {consent: '', gave_consent: false, template_id: ''},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {days_requested: 0, enable_multiple_items: false},
income_source_types: [],
income_verification_id: '',
payroll_income: {flow_types: [], is_update_mode: false},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {routing_number: ''},
institution_id: '',
investments: {allow_unverified_crypto_wallets: false},
language: '',
link_customization_name: '',
payment_initiation: {consent_id: '', payment_id: ''},
products: [],
redirect_uri: '',
secret: '',
transfer: {intent_id: '', payment_profile_token: ''},
update: {account_selection_enabled: false},
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {type: '', value: ''},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/link/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_filters":{"credit":{"account_subtypes":[]},"depository":{"account_subtypes":[]},"investment":{"account_subtypes":[]},"loan":{"account_subtypes":[]}},"additional_consented_products":[],"android_package_name":"","auth":{"auth_type_select_enabled":false,"automated_microdeposits_enabled":false,"flow_type":"","instant_match_enabled":false,"same_day_microdeposits_enabled":false},"client_id":"","client_name":"","country_codes":[],"deposit_switch":{"deposit_switch_id":""},"employment":{"bank_employment":{"days_requested":0},"employment_source_types":[]},"eu_config":{"headless":false},"identity_verification":{"consent":"","gave_consent":false,"template_id":""},"income_verification":{"access_tokens":[],"asset_report_id":"","bank_income":{"days_requested":0,"enable_multiple_items":false},"income_source_types":[],"income_verification_id":"","payroll_income":{"flow_types":[],"is_update_mode":false},"precheck_id":"","stated_income_sources":[{"category":"","employer":"","pay_annual":"","pay_frequency":"","pay_per_cycle":"","pay_type":""}]},"institution_data":{"routing_number":""},"institution_id":"","investments":{"allow_unverified_crypto_wallets":false},"language":"","link_customization_name":"","payment_initiation":{"consent_id":"","payment_id":""},"products":[],"redirect_uri":"","secret":"","transfer":{"intent_id":"","payment_profile_token":""},"update":{"account_selection_enabled":false},"user":{"address":{"city":"","country":"","postal_code":"","region":"","street":"","street2":""},"client_user_id":"","date_of_birth":"","email_address":"","email_address_verified_time":"","id_number":{"type":"","value":""},"legal_name":"","name":"","phone_number":"","phone_number_verified_time":"","ssn":""},"user_token":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/link/token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_filters": {\n "credit": {\n "account_subtypes": []\n },\n "depository": {\n "account_subtypes": []\n },\n "investment": {\n "account_subtypes": []\n },\n "loan": {\n "account_subtypes": []\n }\n },\n "additional_consented_products": [],\n "android_package_name": "",\n "auth": {\n "auth_type_select_enabled": false,\n "automated_microdeposits_enabled": false,\n "flow_type": "",\n "instant_match_enabled": false,\n "same_day_microdeposits_enabled": false\n },\n "client_id": "",\n "client_name": "",\n "country_codes": [],\n "deposit_switch": {\n "deposit_switch_id": ""\n },\n "employment": {\n "bank_employment": {\n "days_requested": 0\n },\n "employment_source_types": []\n },\n "eu_config": {\n "headless": false\n },\n "identity_verification": {\n "consent": "",\n "gave_consent": false,\n "template_id": ""\n },\n "income_verification": {\n "access_tokens": [],\n "asset_report_id": "",\n "bank_income": {\n "days_requested": 0,\n "enable_multiple_items": false\n },\n "income_source_types": [],\n "income_verification_id": "",\n "payroll_income": {\n "flow_types": [],\n "is_update_mode": false\n },\n "precheck_id": "",\n "stated_income_sources": [\n {\n "category": "",\n "employer": "",\n "pay_annual": "",\n "pay_frequency": "",\n "pay_per_cycle": "",\n "pay_type": ""\n }\n ]\n },\n "institution_data": {\n "routing_number": ""\n },\n "institution_id": "",\n "investments": {\n "allow_unverified_crypto_wallets": false\n },\n "language": "",\n "link_customization_name": "",\n "payment_initiation": {\n "consent_id": "",\n "payment_id": ""\n },\n "products": [],\n "redirect_uri": "",\n "secret": "",\n "transfer": {\n "intent_id": "",\n "payment_profile_token": ""\n },\n "update": {\n "account_selection_enabled": false\n },\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": "",\n "street2": ""\n },\n "client_user_id": "",\n "date_of_birth": "",\n "email_address": "",\n "email_address_verified_time": "",\n "id_number": {\n "type": "",\n "value": ""\n },\n "legal_name": "",\n "name": "",\n "phone_number": "",\n "phone_number_verified_time": "",\n "ssn": ""\n },\n "user_token": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/link/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/link/token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_filters: {
credit: {account_subtypes: []},
depository: {account_subtypes: []},
investment: {account_subtypes: []},
loan: {account_subtypes: []}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {deposit_switch_id: ''},
employment: {bank_employment: {days_requested: 0}, employment_source_types: []},
eu_config: {headless: false},
identity_verification: {consent: '', gave_consent: false, template_id: ''},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {days_requested: 0, enable_multiple_items: false},
income_source_types: [],
income_verification_id: '',
payroll_income: {flow_types: [], is_update_mode: false},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {routing_number: ''},
institution_id: '',
investments: {allow_unverified_crypto_wallets: false},
language: '',
link_customization_name: '',
payment_initiation: {consent_id: '', payment_id: ''},
products: [],
redirect_uri: '',
secret: '',
transfer: {intent_id: '', payment_profile_token: ''},
update: {account_selection_enabled: false},
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {type: '', value: ''},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_filters: {
credit: {account_subtypes: []},
depository: {account_subtypes: []},
investment: {account_subtypes: []},
loan: {account_subtypes: []}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {deposit_switch_id: ''},
employment: {bank_employment: {days_requested: 0}, employment_source_types: []},
eu_config: {headless: false},
identity_verification: {consent: '', gave_consent: false, template_id: ''},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {days_requested: 0, enable_multiple_items: false},
income_source_types: [],
income_verification_id: '',
payroll_income: {flow_types: [], is_update_mode: false},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {routing_number: ''},
institution_id: '',
investments: {allow_unverified_crypto_wallets: false},
language: '',
link_customization_name: '',
payment_initiation: {consent_id: '', payment_id: ''},
products: [],
redirect_uri: '',
secret: '',
transfer: {intent_id: '', payment_profile_token: ''},
update: {account_selection_enabled: false},
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {type: '', value: ''},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/link/token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_filters: {
credit: {
account_subtypes: []
},
depository: {
account_subtypes: []
},
investment: {
account_subtypes: []
},
loan: {
account_subtypes: []
}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {
deposit_switch_id: ''
},
employment: {
bank_employment: {
days_requested: 0
},
employment_source_types: []
},
eu_config: {
headless: false
},
identity_verification: {
consent: '',
gave_consent: false,
template_id: ''
},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {
days_requested: 0,
enable_multiple_items: false
},
income_source_types: [],
income_verification_id: '',
payroll_income: {
flow_types: [],
is_update_mode: false
},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {
routing_number: ''
},
institution_id: '',
investments: {
allow_unverified_crypto_wallets: false
},
language: '',
link_customization_name: '',
payment_initiation: {
consent_id: '',
payment_id: ''
},
products: [],
redirect_uri: '',
secret: '',
transfer: {
intent_id: '',
payment_profile_token: ''
},
update: {
account_selection_enabled: false
},
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: '',
street2: ''
},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {
type: '',
value: ''
},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_filters: {
credit: {account_subtypes: []},
depository: {account_subtypes: []},
investment: {account_subtypes: []},
loan: {account_subtypes: []}
},
additional_consented_products: [],
android_package_name: '',
auth: {
auth_type_select_enabled: false,
automated_microdeposits_enabled: false,
flow_type: '',
instant_match_enabled: false,
same_day_microdeposits_enabled: false
},
client_id: '',
client_name: '',
country_codes: [],
deposit_switch: {deposit_switch_id: ''},
employment: {bank_employment: {days_requested: 0}, employment_source_types: []},
eu_config: {headless: false},
identity_verification: {consent: '', gave_consent: false, template_id: ''},
income_verification: {
access_tokens: [],
asset_report_id: '',
bank_income: {days_requested: 0, enable_multiple_items: false},
income_source_types: [],
income_verification_id: '',
payroll_income: {flow_types: [], is_update_mode: false},
precheck_id: '',
stated_income_sources: [
{
category: '',
employer: '',
pay_annual: '',
pay_frequency: '',
pay_per_cycle: '',
pay_type: ''
}
]
},
institution_data: {routing_number: ''},
institution_id: '',
investments: {allow_unverified_crypto_wallets: false},
language: '',
link_customization_name: '',
payment_initiation: {consent_id: '', payment_id: ''},
products: [],
redirect_uri: '',
secret: '',
transfer: {intent_id: '', payment_profile_token: ''},
update: {account_selection_enabled: false},
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
email_address_verified_time: '',
id_number: {type: '', value: ''},
legal_name: '',
name: '',
phone_number: '',
phone_number_verified_time: '',
ssn: ''
},
user_token: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/link/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_filters":{"credit":{"account_subtypes":[]},"depository":{"account_subtypes":[]},"investment":{"account_subtypes":[]},"loan":{"account_subtypes":[]}},"additional_consented_products":[],"android_package_name":"","auth":{"auth_type_select_enabled":false,"automated_microdeposits_enabled":false,"flow_type":"","instant_match_enabled":false,"same_day_microdeposits_enabled":false},"client_id":"","client_name":"","country_codes":[],"deposit_switch":{"deposit_switch_id":""},"employment":{"bank_employment":{"days_requested":0},"employment_source_types":[]},"eu_config":{"headless":false},"identity_verification":{"consent":"","gave_consent":false,"template_id":""},"income_verification":{"access_tokens":[],"asset_report_id":"","bank_income":{"days_requested":0,"enable_multiple_items":false},"income_source_types":[],"income_verification_id":"","payroll_income":{"flow_types":[],"is_update_mode":false},"precheck_id":"","stated_income_sources":[{"category":"","employer":"","pay_annual":"","pay_frequency":"","pay_per_cycle":"","pay_type":""}]},"institution_data":{"routing_number":""},"institution_id":"","investments":{"allow_unverified_crypto_wallets":false},"language":"","link_customization_name":"","payment_initiation":{"consent_id":"","payment_id":""},"products":[],"redirect_uri":"","secret":"","transfer":{"intent_id":"","payment_profile_token":""},"update":{"account_selection_enabled":false},"user":{"address":{"city":"","country":"","postal_code":"","region":"","street":"","street2":""},"client_user_id":"","date_of_birth":"","email_address":"","email_address_verified_time":"","id_number":{"type":"","value":""},"legal_name":"","name":"","phone_number":"","phone_number_verified_time":"","ssn":""},"user_token":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_filters": @{ @"credit": @{ @"account_subtypes": @[ ] }, @"depository": @{ @"account_subtypes": @[ ] }, @"investment": @{ @"account_subtypes": @[ ] }, @"loan": @{ @"account_subtypes": @[ ] } },
@"additional_consented_products": @[ ],
@"android_package_name": @"",
@"auth": @{ @"auth_type_select_enabled": @NO, @"automated_microdeposits_enabled": @NO, @"flow_type": @"", @"instant_match_enabled": @NO, @"same_day_microdeposits_enabled": @NO },
@"client_id": @"",
@"client_name": @"",
@"country_codes": @[ ],
@"deposit_switch": @{ @"deposit_switch_id": @"" },
@"employment": @{ @"bank_employment": @{ @"days_requested": @0 }, @"employment_source_types": @[ ] },
@"eu_config": @{ @"headless": @NO },
@"identity_verification": @{ @"consent": @"", @"gave_consent": @NO, @"template_id": @"" },
@"income_verification": @{ @"access_tokens": @[ ], @"asset_report_id": @"", @"bank_income": @{ @"days_requested": @0, @"enable_multiple_items": @NO }, @"income_source_types": @[ ], @"income_verification_id": @"", @"payroll_income": @{ @"flow_types": @[ ], @"is_update_mode": @NO }, @"precheck_id": @"", @"stated_income_sources": @[ @{ @"category": @"", @"employer": @"", @"pay_annual": @"", @"pay_frequency": @"", @"pay_per_cycle": @"", @"pay_type": @"" } ] },
@"institution_data": @{ @"routing_number": @"" },
@"institution_id": @"",
@"investments": @{ @"allow_unverified_crypto_wallets": @NO },
@"language": @"",
@"link_customization_name": @"",
@"payment_initiation": @{ @"consent_id": @"", @"payment_id": @"" },
@"products": @[ ],
@"redirect_uri": @"",
@"secret": @"",
@"transfer": @{ @"intent_id": @"", @"payment_profile_token": @"" },
@"update": @{ @"account_selection_enabled": @NO },
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"", @"street2": @"" }, @"client_user_id": @"", @"date_of_birth": @"", @"email_address": @"", @"email_address_verified_time": @"", @"id_number": @{ @"type": @"", @"value": @"" }, @"legal_name": @"", @"name": @"", @"phone_number": @"", @"phone_number_verified_time": @"", @"ssn": @"" },
@"user_token": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/link/token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/link/token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/link/token/create",
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([
'access_token' => '',
'account_filters' => [
'credit' => [
'account_subtypes' => [
]
],
'depository' => [
'account_subtypes' => [
]
],
'investment' => [
'account_subtypes' => [
]
],
'loan' => [
'account_subtypes' => [
]
]
],
'additional_consented_products' => [
],
'android_package_name' => '',
'auth' => [
'auth_type_select_enabled' => null,
'automated_microdeposits_enabled' => null,
'flow_type' => '',
'instant_match_enabled' => null,
'same_day_microdeposits_enabled' => null
],
'client_id' => '',
'client_name' => '',
'country_codes' => [
],
'deposit_switch' => [
'deposit_switch_id' => ''
],
'employment' => [
'bank_employment' => [
'days_requested' => 0
],
'employment_source_types' => [
]
],
'eu_config' => [
'headless' => null
],
'identity_verification' => [
'consent' => '',
'gave_consent' => null,
'template_id' => ''
],
'income_verification' => [
'access_tokens' => [
],
'asset_report_id' => '',
'bank_income' => [
'days_requested' => 0,
'enable_multiple_items' => null
],
'income_source_types' => [
],
'income_verification_id' => '',
'payroll_income' => [
'flow_types' => [
],
'is_update_mode' => null
],
'precheck_id' => '',
'stated_income_sources' => [
[
'category' => '',
'employer' => '',
'pay_annual' => '',
'pay_frequency' => '',
'pay_per_cycle' => '',
'pay_type' => ''
]
]
],
'institution_data' => [
'routing_number' => ''
],
'institution_id' => '',
'investments' => [
'allow_unverified_crypto_wallets' => null
],
'language' => '',
'link_customization_name' => '',
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
],
'products' => [
],
'redirect_uri' => '',
'secret' => '',
'transfer' => [
'intent_id' => '',
'payment_profile_token' => ''
],
'update' => [
'account_selection_enabled' => null
],
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'email_address_verified_time' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'legal_name' => '',
'name' => '',
'phone_number' => '',
'phone_number_verified_time' => '',
'ssn' => ''
],
'user_token' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/link/token/create', [
'body' => '{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/link/token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_filters' => [
'credit' => [
'account_subtypes' => [
]
],
'depository' => [
'account_subtypes' => [
]
],
'investment' => [
'account_subtypes' => [
]
],
'loan' => [
'account_subtypes' => [
]
]
],
'additional_consented_products' => [
],
'android_package_name' => '',
'auth' => [
'auth_type_select_enabled' => null,
'automated_microdeposits_enabled' => null,
'flow_type' => '',
'instant_match_enabled' => null,
'same_day_microdeposits_enabled' => null
],
'client_id' => '',
'client_name' => '',
'country_codes' => [
],
'deposit_switch' => [
'deposit_switch_id' => ''
],
'employment' => [
'bank_employment' => [
'days_requested' => 0
],
'employment_source_types' => [
]
],
'eu_config' => [
'headless' => null
],
'identity_verification' => [
'consent' => '',
'gave_consent' => null,
'template_id' => ''
],
'income_verification' => [
'access_tokens' => [
],
'asset_report_id' => '',
'bank_income' => [
'days_requested' => 0,
'enable_multiple_items' => null
],
'income_source_types' => [
],
'income_verification_id' => '',
'payroll_income' => [
'flow_types' => [
],
'is_update_mode' => null
],
'precheck_id' => '',
'stated_income_sources' => [
[
'category' => '',
'employer' => '',
'pay_annual' => '',
'pay_frequency' => '',
'pay_per_cycle' => '',
'pay_type' => ''
]
]
],
'institution_data' => [
'routing_number' => ''
],
'institution_id' => '',
'investments' => [
'allow_unverified_crypto_wallets' => null
],
'language' => '',
'link_customization_name' => '',
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
],
'products' => [
],
'redirect_uri' => '',
'secret' => '',
'transfer' => [
'intent_id' => '',
'payment_profile_token' => ''
],
'update' => [
'account_selection_enabled' => null
],
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'email_address_verified_time' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'legal_name' => '',
'name' => '',
'phone_number' => '',
'phone_number_verified_time' => '',
'ssn' => ''
],
'user_token' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_filters' => [
'credit' => [
'account_subtypes' => [
]
],
'depository' => [
'account_subtypes' => [
]
],
'investment' => [
'account_subtypes' => [
]
],
'loan' => [
'account_subtypes' => [
]
]
],
'additional_consented_products' => [
],
'android_package_name' => '',
'auth' => [
'auth_type_select_enabled' => null,
'automated_microdeposits_enabled' => null,
'flow_type' => '',
'instant_match_enabled' => null,
'same_day_microdeposits_enabled' => null
],
'client_id' => '',
'client_name' => '',
'country_codes' => [
],
'deposit_switch' => [
'deposit_switch_id' => ''
],
'employment' => [
'bank_employment' => [
'days_requested' => 0
],
'employment_source_types' => [
]
],
'eu_config' => [
'headless' => null
],
'identity_verification' => [
'consent' => '',
'gave_consent' => null,
'template_id' => ''
],
'income_verification' => [
'access_tokens' => [
],
'asset_report_id' => '',
'bank_income' => [
'days_requested' => 0,
'enable_multiple_items' => null
],
'income_source_types' => [
],
'income_verification_id' => '',
'payroll_income' => [
'flow_types' => [
],
'is_update_mode' => null
],
'precheck_id' => '',
'stated_income_sources' => [
[
'category' => '',
'employer' => '',
'pay_annual' => '',
'pay_frequency' => '',
'pay_per_cycle' => '',
'pay_type' => ''
]
]
],
'institution_data' => [
'routing_number' => ''
],
'institution_id' => '',
'investments' => [
'allow_unverified_crypto_wallets' => null
],
'language' => '',
'link_customization_name' => '',
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
],
'products' => [
],
'redirect_uri' => '',
'secret' => '',
'transfer' => [
'intent_id' => '',
'payment_profile_token' => ''
],
'update' => [
'account_selection_enabled' => null
],
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'email_address_verified_time' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'legal_name' => '',
'name' => '',
'phone_number' => '',
'phone_number_verified_time' => '',
'ssn' => ''
],
'user_token' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/link/token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/link/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/link/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/link/token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/link/token/create"
payload = {
"access_token": "",
"account_filters": {
"credit": { "account_subtypes": [] },
"depository": { "account_subtypes": [] },
"investment": { "account_subtypes": [] },
"loan": { "account_subtypes": [] }
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": False,
"automated_microdeposits_enabled": False,
"flow_type": "",
"instant_match_enabled": False,
"same_day_microdeposits_enabled": False
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": { "deposit_switch_id": "" },
"employment": {
"bank_employment": { "days_requested": 0 },
"employment_source_types": []
},
"eu_config": { "headless": False },
"identity_verification": {
"consent": "",
"gave_consent": False,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": False
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": False
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": { "routing_number": "" },
"institution_id": "",
"investments": { "allow_unverified_crypto_wallets": False },
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": { "account_selection_enabled": False },
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/link/token/create"
payload <- "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/link/token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/link/token/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_filters\": {\n \"credit\": {\n \"account_subtypes\": []\n },\n \"depository\": {\n \"account_subtypes\": []\n },\n \"investment\": {\n \"account_subtypes\": []\n },\n \"loan\": {\n \"account_subtypes\": []\n }\n },\n \"additional_consented_products\": [],\n \"android_package_name\": \"\",\n \"auth\": {\n \"auth_type_select_enabled\": false,\n \"automated_microdeposits_enabled\": false,\n \"flow_type\": \"\",\n \"instant_match_enabled\": false,\n \"same_day_microdeposits_enabled\": false\n },\n \"client_id\": \"\",\n \"client_name\": \"\",\n \"country_codes\": [],\n \"deposit_switch\": {\n \"deposit_switch_id\": \"\"\n },\n \"employment\": {\n \"bank_employment\": {\n \"days_requested\": 0\n },\n \"employment_source_types\": []\n },\n \"eu_config\": {\n \"headless\": false\n },\n \"identity_verification\": {\n \"consent\": \"\",\n \"gave_consent\": false,\n \"template_id\": \"\"\n },\n \"income_verification\": {\n \"access_tokens\": [],\n \"asset_report_id\": \"\",\n \"bank_income\": {\n \"days_requested\": 0,\n \"enable_multiple_items\": false\n },\n \"income_source_types\": [],\n \"income_verification_id\": \"\",\n \"payroll_income\": {\n \"flow_types\": [],\n \"is_update_mode\": false\n },\n \"precheck_id\": \"\",\n \"stated_income_sources\": [\n {\n \"category\": \"\",\n \"employer\": \"\",\n \"pay_annual\": \"\",\n \"pay_frequency\": \"\",\n \"pay_per_cycle\": \"\",\n \"pay_type\": \"\"\n }\n ]\n },\n \"institution_data\": {\n \"routing_number\": \"\"\n },\n \"institution_id\": \"\",\n \"investments\": {\n \"allow_unverified_crypto_wallets\": false\n },\n \"language\": \"\",\n \"link_customization_name\": \"\",\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n },\n \"products\": [],\n \"redirect_uri\": \"\",\n \"secret\": \"\",\n \"transfer\": {\n \"intent_id\": \"\",\n \"payment_profile_token\": \"\"\n },\n \"update\": {\n \"account_selection_enabled\": false\n },\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"email_address_verified_time\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"legal_name\": \"\",\n \"name\": \"\",\n \"phone_number\": \"\",\n \"phone_number_verified_time\": \"\",\n \"ssn\": \"\"\n },\n \"user_token\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/link/token/create";
let payload = json!({
"access_token": "",
"account_filters": json!({
"credit": json!({"account_subtypes": ()}),
"depository": json!({"account_subtypes": ()}),
"investment": json!({"account_subtypes": ()}),
"loan": json!({"account_subtypes": ()})
}),
"additional_consented_products": (),
"android_package_name": "",
"auth": json!({
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
}),
"client_id": "",
"client_name": "",
"country_codes": (),
"deposit_switch": json!({"deposit_switch_id": ""}),
"employment": json!({
"bank_employment": json!({"days_requested": 0}),
"employment_source_types": ()
}),
"eu_config": json!({"headless": false}),
"identity_verification": json!({
"consent": "",
"gave_consent": false,
"template_id": ""
}),
"income_verification": json!({
"access_tokens": (),
"asset_report_id": "",
"bank_income": json!({
"days_requested": 0,
"enable_multiple_items": false
}),
"income_source_types": (),
"income_verification_id": "",
"payroll_income": json!({
"flow_types": (),
"is_update_mode": false
}),
"precheck_id": "",
"stated_income_sources": (
json!({
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
})
)
}),
"institution_data": json!({"routing_number": ""}),
"institution_id": "",
"investments": json!({"allow_unverified_crypto_wallets": false}),
"language": "",
"link_customization_name": "",
"payment_initiation": json!({
"consent_id": "",
"payment_id": ""
}),
"products": (),
"redirect_uri": "",
"secret": "",
"transfer": json!({
"intent_id": "",
"payment_profile_token": ""
}),
"update": json!({"account_selection_enabled": false}),
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
}),
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": json!({
"type": "",
"value": ""
}),
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
}),
"user_token": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/link/token/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}'
echo '{
"access_token": "",
"account_filters": {
"credit": {
"account_subtypes": []
},
"depository": {
"account_subtypes": []
},
"investment": {
"account_subtypes": []
},
"loan": {
"account_subtypes": []
}
},
"additional_consented_products": [],
"android_package_name": "",
"auth": {
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
},
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": {
"deposit_switch_id": ""
},
"employment": {
"bank_employment": {
"days_requested": 0
},
"employment_source_types": []
},
"eu_config": {
"headless": false
},
"identity_verification": {
"consent": "",
"gave_consent": false,
"template_id": ""
},
"income_verification": {
"access_tokens": [],
"asset_report_id": "",
"bank_income": {
"days_requested": 0,
"enable_multiple_items": false
},
"income_source_types": [],
"income_verification_id": "",
"payroll_income": {
"flow_types": [],
"is_update_mode": false
},
"precheck_id": "",
"stated_income_sources": [
{
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
}
]
},
"institution_data": {
"routing_number": ""
},
"institution_id": "",
"investments": {
"allow_unverified_crypto_wallets": false
},
"language": "",
"link_customization_name": "",
"payment_initiation": {
"consent_id": "",
"payment_id": ""
},
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": {
"intent_id": "",
"payment_profile_token": ""
},
"update": {
"account_selection_enabled": false
},
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": {
"type": "",
"value": ""
},
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
},
"user_token": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/link/token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_filters": {\n "credit": {\n "account_subtypes": []\n },\n "depository": {\n "account_subtypes": []\n },\n "investment": {\n "account_subtypes": []\n },\n "loan": {\n "account_subtypes": []\n }\n },\n "additional_consented_products": [],\n "android_package_name": "",\n "auth": {\n "auth_type_select_enabled": false,\n "automated_microdeposits_enabled": false,\n "flow_type": "",\n "instant_match_enabled": false,\n "same_day_microdeposits_enabled": false\n },\n "client_id": "",\n "client_name": "",\n "country_codes": [],\n "deposit_switch": {\n "deposit_switch_id": ""\n },\n "employment": {\n "bank_employment": {\n "days_requested": 0\n },\n "employment_source_types": []\n },\n "eu_config": {\n "headless": false\n },\n "identity_verification": {\n "consent": "",\n "gave_consent": false,\n "template_id": ""\n },\n "income_verification": {\n "access_tokens": [],\n "asset_report_id": "",\n "bank_income": {\n "days_requested": 0,\n "enable_multiple_items": false\n },\n "income_source_types": [],\n "income_verification_id": "",\n "payroll_income": {\n "flow_types": [],\n "is_update_mode": false\n },\n "precheck_id": "",\n "stated_income_sources": [\n {\n "category": "",\n "employer": "",\n "pay_annual": "",\n "pay_frequency": "",\n "pay_per_cycle": "",\n "pay_type": ""\n }\n ]\n },\n "institution_data": {\n "routing_number": ""\n },\n "institution_id": "",\n "investments": {\n "allow_unverified_crypto_wallets": false\n },\n "language": "",\n "link_customization_name": "",\n "payment_initiation": {\n "consent_id": "",\n "payment_id": ""\n },\n "products": [],\n "redirect_uri": "",\n "secret": "",\n "transfer": {\n "intent_id": "",\n "payment_profile_token": ""\n },\n "update": {\n "account_selection_enabled": false\n },\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": "",\n "street2": ""\n },\n "client_user_id": "",\n "date_of_birth": "",\n "email_address": "",\n "email_address_verified_time": "",\n "id_number": {\n "type": "",\n "value": ""\n },\n "legal_name": "",\n "name": "",\n "phone_number": "",\n "phone_number_verified_time": "",\n "ssn": ""\n },\n "user_token": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/link/token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_filters": [
"credit": ["account_subtypes": []],
"depository": ["account_subtypes": []],
"investment": ["account_subtypes": []],
"loan": ["account_subtypes": []]
],
"additional_consented_products": [],
"android_package_name": "",
"auth": [
"auth_type_select_enabled": false,
"automated_microdeposits_enabled": false,
"flow_type": "",
"instant_match_enabled": false,
"same_day_microdeposits_enabled": false
],
"client_id": "",
"client_name": "",
"country_codes": [],
"deposit_switch": ["deposit_switch_id": ""],
"employment": [
"bank_employment": ["days_requested": 0],
"employment_source_types": []
],
"eu_config": ["headless": false],
"identity_verification": [
"consent": "",
"gave_consent": false,
"template_id": ""
],
"income_verification": [
"access_tokens": [],
"asset_report_id": "",
"bank_income": [
"days_requested": 0,
"enable_multiple_items": false
],
"income_source_types": [],
"income_verification_id": "",
"payroll_income": [
"flow_types": [],
"is_update_mode": false
],
"precheck_id": "",
"stated_income_sources": [
[
"category": "",
"employer": "",
"pay_annual": "",
"pay_frequency": "",
"pay_per_cycle": "",
"pay_type": ""
]
]
],
"institution_data": ["routing_number": ""],
"institution_id": "",
"investments": ["allow_unverified_crypto_wallets": false],
"language": "",
"link_customization_name": "",
"payment_initiation": [
"consent_id": "",
"payment_id": ""
],
"products": [],
"redirect_uri": "",
"secret": "",
"transfer": [
"intent_id": "",
"payment_profile_token": ""
],
"update": ["account_selection_enabled": false],
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
],
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"email_address_verified_time": "",
"id_number": [
"type": "",
"value": ""
],
"legal_name": "",
"name": "",
"phone_number": "",
"phone_number_verified_time": "",
"ssn": ""
],
"user_token": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/link/token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"expiration": "2020-03-27T12:56:34Z",
"link_token": "link-sandbox-af1a0311-da53-4636-b754-dd15cc058176",
"request_id": "XQVgFigpGHXkb0b"
}
POST
Create Stripe bank account token
{{baseUrl}}/processor/stripe/bank_account_token/create
BODY json
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/stripe/bank_account_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/stripe/bank_account_token/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/stripe/bank_account_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/stripe/bank_account_token/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/stripe/bank_account_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/stripe/bank_account_token/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/stripe/bank_account_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/stripe/bank_account_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/stripe/bank_account_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/stripe/bank_account_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/stripe/bank_account_token/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/stripe/bank_account_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/stripe/bank_account_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/stripe/bank_account_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/stripe/bank_account_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/stripe/bank_account_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/stripe/bank_account_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', account_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/stripe/bank_account_token/create',
headers: {'content-type': 'application/json'},
body: {access_token: '', account_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/stripe/bank_account_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/stripe/bank_account_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/stripe/bank_account_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/stripe/bank_account_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/stripe/bank_account_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/stripe/bank_account_token/create",
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([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/stripe/bank_account_token/create', [
'body' => '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/stripe/bank_account_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/stripe/bank_account_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/stripe/bank_account_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/stripe/bank_account_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/stripe/bank_account_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/stripe/bank_account_token/create"
payload = {
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/stripe/bank_account_token/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/stripe/bank_account_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/stripe/bank_account_token/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/stripe/bank_account_token/create";
let payload = json!({
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/stripe/bank_account_token/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/stripe/bank_account_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/stripe/bank_account_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/stripe/bank_account_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "xrQNYZ7Zoh6R7gV",
"stripe_bank_account_token": "btok_5oEetfLzPklE1fwJZ7SG"
}
POST
Create a bank transfer as a processor
{{baseUrl}}/processor/bank_transfer/create
BODY json
{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/bank_transfer/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/bank_transfer/create" {:content-type :json
:form-params {:ach_class ""
:amount ""
:client_id ""
:custom_tag ""
:description ""
:idempotency_key ""
:iso_currency_code ""
:metadata {}
:network ""
:origination_account_id ""
:processor_token ""
:secret ""
:type ""
:user {:email_address ""
:legal_name ""
:routing_number ""}}})
require "http/client"
url = "{{baseUrl}}/processor/bank_transfer/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/bank_transfer/create"),
Content = new StringContent("{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/bank_transfer/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/bank_transfer/create"
payload := strings.NewReader("{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/bank_transfer/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 360
{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/bank_transfer/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/bank_transfer/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/bank_transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/bank_transfer/create")
.header("content-type", "application/json")
.body("{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {
email_address: '',
legal_name: '',
routing_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/bank_transfer/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/bank_transfer/create',
headers: {'content-type': 'application/json'},
data: {
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/bank_transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ach_class":"","amount":"","client_id":"","custom_tag":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","processor_token":"","secret":"","type":"","user":{"email_address":"","legal_name":"","routing_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/bank_transfer/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "custom_tag": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "processor_token": "",\n "secret": "",\n "type": "",\n "user": {\n "email_address": "",\n "legal_name": "",\n "routing_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/bank_transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/bank_transfer/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/bank_transfer/create',
headers: {'content-type': 'application/json'},
body: {
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/bank_transfer/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {
email_address: '',
legal_name: '',
routing_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/bank_transfer/create',
headers: {'content-type': 'application/json'},
data: {
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
processor_token: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/bank_transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ach_class":"","amount":"","client_id":"","custom_tag":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","processor_token":"","secret":"","type":"","user":{"email_address":"","legal_name":"","routing_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"ach_class": @"",
@"amount": @"",
@"client_id": @"",
@"custom_tag": @"",
@"description": @"",
@"idempotency_key": @"",
@"iso_currency_code": @"",
@"metadata": @{ },
@"network": @"",
@"origination_account_id": @"",
@"processor_token": @"",
@"secret": @"",
@"type": @"",
@"user": @{ @"email_address": @"", @"legal_name": @"", @"routing_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/bank_transfer/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/bank_transfer/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/bank_transfer/create",
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([
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'processor_token' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/bank_transfer/create', [
'body' => '{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/bank_transfer/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'processor_token' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'processor_token' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/processor/bank_transfer/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/bank_transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/bank_transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/bank_transfer/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/bank_transfer/create"
payload = {
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/bank_transfer/create"
payload <- "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/bank_transfer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/bank_transfer/create') do |req|
req.body = "{\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/bank_transfer/create";
let payload = json!({
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": json!({}),
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": json!({
"email_address": "",
"legal_name": "",
"routing_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/bank_transfer/create \
--header 'content-type: application/json' \
--data '{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
echo '{
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}' | \
http POST {{baseUrl}}/processor/bank_transfer/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "custom_tag": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "processor_token": "",\n "secret": "",\n "type": "",\n "user": {\n "email_address": "",\n "legal_name": "",\n "routing_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/processor/bank_transfer/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": [],
"network": "",
"origination_account_id": "",
"processor_token": "",
"secret": "",
"type": "",
"user": [
"email_address": "",
"legal_name": "",
"routing_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/bank_transfer/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfer": {
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"custom_tag": "my tag",
"description": "Testing2",
"direction": "outbound",
"failure_reason": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "11111111-1111-1111-1111-111111111111",
"status": "pending",
"type": "credit",
"user": {
"email_address": "plaid@plaid.com",
"legal_name": "John Smith",
"routing_number": "111111111"
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Create a bank transfer
{{baseUrl}}/bank_transfer/create
BODY json
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:ach_class ""
:amount ""
:client_id ""
:custom_tag ""
:description ""
:idempotency_key ""
:iso_currency_code ""
:metadata {}
:network ""
:origination_account_id ""
:secret ""
:type ""
:user {:email_address ""
:legal_name ""
:routing_number ""}}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 377
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {
email_address: '',
legal_name: '',
routing_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","client_id":"","custom_tag":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","secret":"","type":"","user":{"email_address":"","legal_name":"","routing_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "custom_tag": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "secret": "",\n "type": "",\n "user": {\n "email_address": "",\n "legal_name": "",\n "routing_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {
email_address: '',
legal_name: '',
routing_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
custom_tag: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
secret: '',
type: '',
user: {email_address: '', legal_name: '', routing_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","client_id":"","custom_tag":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","secret":"","type":"","user":{"email_address":"","legal_name":"","routing_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"ach_class": @"",
@"amount": @"",
@"client_id": @"",
@"custom_tag": @"",
@"description": @"",
@"idempotency_key": @"",
@"iso_currency_code": @"",
@"metadata": @{ },
@"network": @"",
@"origination_account_id": @"",
@"secret": @"",
@"type": @"",
@"user": @{ @"email_address": @"", @"legal_name": @"", @"routing_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/create",
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([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/create', [
'body' => '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'custom_tag' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'secret' => '',
'type' => '',
'user' => [
'email_address' => '',
'legal_name' => '',
'routing_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/create"
payload = {
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"custom_tag\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"routing_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/create";
let payload = json!({
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": json!({}),
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": json!({
"email_address": "",
"legal_name": "",
"routing_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}'
echo '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": {
"email_address": "",
"legal_name": "",
"routing_number": ""
}
}' | \
http POST {{baseUrl}}/bank_transfer/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "custom_tag": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "secret": "",\n "type": "",\n "user": {\n "email_address": "",\n "legal_name": "",\n "routing_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"custom_tag": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": [],
"network": "",
"origination_account_id": "",
"secret": "",
"type": "",
"user": [
"email_address": "",
"legal_name": "",
"routing_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfer": {
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"custom_tag": "my tag",
"description": "Testing2",
"direction": "outbound",
"failure_reason": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"status": "pending",
"type": "credit",
"user": {
"email_address": "plaid@plaid.com",
"legal_name": "John Smith",
"routing_number": "111111111"
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Create a deposit switch token
{{baseUrl}}/deposit_switch/token/create
BODY json
{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deposit_switch/token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deposit_switch/token/create" {:content-type :json
:form-params {:client_id ""
:deposit_switch_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/deposit_switch/token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/deposit_switch/token/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deposit_switch/token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deposit_switch/token/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deposit_switch/token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deposit_switch/token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deposit_switch/token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deposit_switch/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deposit_switch/token/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
deposit_switch_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deposit_switch/token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', deposit_switch_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deposit_switch/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","deposit_switch_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deposit_switch/token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "deposit_switch_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deposit_switch/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deposit_switch/token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', deposit_switch_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/token/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', deposit_switch_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/deposit_switch/token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
deposit_switch_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', deposit_switch_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deposit_switch/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","deposit_switch_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"deposit_switch_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deposit_switch/token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deposit_switch/token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deposit_switch/token/create",
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([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deposit_switch/token/create', [
'body' => '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deposit_switch/token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deposit_switch/token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deposit_switch/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deposit_switch/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deposit_switch/token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deposit_switch/token/create"
payload = {
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deposit_switch/token/create"
payload <- "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deposit_switch/token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/deposit_switch/token/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deposit_switch/token/create";
let payload = json!({
"client_id": "",
"deposit_switch_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deposit_switch/token/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/deposit_switch/token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "deposit_switch_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/deposit_switch/token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"deposit_switch_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deposit_switch/token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"deposit_switch_token": "deposit-switch-sandbox-3e5cacca-10a6-11ea-bcdb-6003089acac0",
"deposit_switch_token_expiration_time": "2019-12-31T12:01:37Z",
"request_id": "68MvHx4Ub5NYoXt"
}
POST
Create a deposit switch without using Plaid Exchange
{{baseUrl}}/deposit_switch/alt/create
BODY json
{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deposit_switch/alt/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deposit_switch/alt/create" {:content-type :json
:form-params {:client_id ""
:country_code ""
:options {:transaction_item_access_tokens []
:webhook ""}
:secret ""
:target_account {:account_name ""
:account_number ""
:account_subtype ""
:routing_number ""}
:target_user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email ""
:family_name ""
:given_name ""
:phone ""
:tax_payer_id ""}}})
require "http/client"
url = "{{baseUrl}}/deposit_switch/alt/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/deposit_switch/alt/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deposit_switch/alt/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deposit_switch/alt/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deposit_switch/alt/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 521
{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deposit_switch/alt/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deposit_switch/alt/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deposit_switch/alt/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deposit_switch/alt/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
client_id: '',
country_code: '',
options: {
transaction_item_access_tokens: [],
webhook: ''
},
secret: '',
target_account: {
account_name: '',
account_number: '',
account_subtype: '',
routing_number: ''
},
target_user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deposit_switch/alt/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/alt/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_account: {account_name: '', account_number: '', account_subtype: '', routing_number: ''},
target_user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deposit_switch/alt/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_code":"","options":{"transaction_item_access_tokens":[],"webhook":""},"secret":"","target_account":{"account_name":"","account_number":"","account_subtype":"","routing_number":""},"target_user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email":"","family_name":"","given_name":"","phone":"","tax_payer_id":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deposit_switch/alt/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "country_code": "",\n "options": {\n "transaction_item_access_tokens": [],\n "webhook": ""\n },\n "secret": "",\n "target_account": {\n "account_name": "",\n "account_number": "",\n "account_subtype": "",\n "routing_number": ""\n },\n "target_user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email": "",\n "family_name": "",\n "given_name": "",\n "phone": "",\n "tax_payer_id": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deposit_switch/alt/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deposit_switch/alt/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_account: {account_name: '', account_number: '', account_subtype: '', routing_number: ''},
target_user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/alt/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_account: {account_name: '', account_number: '', account_subtype: '', routing_number: ''},
target_user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/deposit_switch/alt/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
country_code: '',
options: {
transaction_item_access_tokens: [],
webhook: ''
},
secret: '',
target_account: {
account_name: '',
account_number: '',
account_subtype: '',
routing_number: ''
},
target_user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/alt/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_account: {account_name: '', account_number: '', account_subtype: '', routing_number: ''},
target_user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email: '',
family_name: '',
given_name: '',
phone: '',
tax_payer_id: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deposit_switch/alt/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_code":"","options":{"transaction_item_access_tokens":[],"webhook":""},"secret":"","target_account":{"account_name":"","account_number":"","account_subtype":"","routing_number":""},"target_user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email":"","family_name":"","given_name":"","phone":"","tax_payer_id":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"country_code": @"",
@"options": @{ @"transaction_item_access_tokens": @[ ], @"webhook": @"" },
@"secret": @"",
@"target_account": @{ @"account_name": @"", @"account_number": @"", @"account_subtype": @"", @"routing_number": @"" },
@"target_user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email": @"", @"family_name": @"", @"given_name": @"", @"phone": @"", @"tax_payer_id": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deposit_switch/alt/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deposit_switch/alt/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deposit_switch/alt/create",
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([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_account' => [
'account_name' => '',
'account_number' => '',
'account_subtype' => '',
'routing_number' => ''
],
'target_user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email' => '',
'family_name' => '',
'given_name' => '',
'phone' => '',
'tax_payer_id' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deposit_switch/alt/create', [
'body' => '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deposit_switch/alt/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_account' => [
'account_name' => '',
'account_number' => '',
'account_subtype' => '',
'routing_number' => ''
],
'target_user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email' => '',
'family_name' => '',
'given_name' => '',
'phone' => '',
'tax_payer_id' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_account' => [
'account_name' => '',
'account_number' => '',
'account_subtype' => '',
'routing_number' => ''
],
'target_user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email' => '',
'family_name' => '',
'given_name' => '',
'phone' => '',
'tax_payer_id' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/deposit_switch/alt/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deposit_switch/alt/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deposit_switch/alt/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deposit_switch/alt/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deposit_switch/alt/create"
payload = {
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deposit_switch/alt/create"
payload <- "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deposit_switch/alt/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/deposit_switch/alt/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_account\": {\n \"account_name\": \"\",\n \"account_number\": \"\",\n \"account_subtype\": \"\",\n \"routing_number\": \"\"\n },\n \"target_user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"phone\": \"\",\n \"tax_payer_id\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deposit_switch/alt/create";
let payload = json!({
"client_id": "",
"country_code": "",
"options": json!({
"transaction_item_access_tokens": (),
"webhook": ""
}),
"secret": "",
"target_account": json!({
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
}),
"target_user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deposit_switch/alt/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}'
echo '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_account": {
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
},
"target_user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
}
}' | \
http POST {{baseUrl}}/deposit_switch/alt/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "country_code": "",\n "options": {\n "transaction_item_access_tokens": [],\n "webhook": ""\n },\n "secret": "",\n "target_account": {\n "account_name": "",\n "account_number": "",\n "account_subtype": "",\n "routing_number": ""\n },\n "target_user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email": "",\n "family_name": "",\n "given_name": "",\n "phone": "",\n "tax_payer_id": ""\n }\n}' \
--output-document \
- {{baseUrl}}/deposit_switch/alt/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"country_code": "",
"options": [
"transaction_item_access_tokens": [],
"webhook": ""
],
"secret": "",
"target_account": [
"account_name": "",
"account_number": "",
"account_subtype": "",
"routing_number": ""
],
"target_user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email": "",
"family_name": "",
"given_name": "",
"phone": "",
"tax_payer_id": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deposit_switch/alt/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"deposit_switch_id": "c7jMwPPManIwy9rwMewWP7lpb4pKRbtrbMomp",
"request_id": "lMjeOeu9X1VUh1F"
}
POST
Create a deposit switch
{{baseUrl}}/deposit_switch/create
BODY json
{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deposit_switch/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deposit_switch/create" {:content-type :json
:form-params {:client_id ""
:country_code ""
:options {:transaction_item_access_tokens []
:webhook ""}
:secret ""
:target_access_token ""
:target_account_id ""}})
require "http/client"
url = "{{baseUrl}}/deposit_switch/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/deposit_switch/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deposit_switch/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deposit_switch/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deposit_switch/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 195
{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deposit_switch/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deposit_switch/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deposit_switch/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deposit_switch/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
country_code: '',
options: {
transaction_item_access_tokens: [],
webhook: ''
},
secret: '',
target_access_token: '',
target_account_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deposit_switch/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_access_token: '',
target_account_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deposit_switch/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_code":"","options":{"transaction_item_access_tokens":[],"webhook":""},"secret":"","target_access_token":"","target_account_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deposit_switch/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "country_code": "",\n "options": {\n "transaction_item_access_tokens": [],\n "webhook": ""\n },\n "secret": "",\n "target_access_token": "",\n "target_account_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deposit_switch/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deposit_switch/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_access_token: '',
target_account_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_access_token: '',
target_account_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/deposit_switch/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
country_code: '',
options: {
transaction_item_access_tokens: [],
webhook: ''
},
secret: '',
target_access_token: '',
target_account_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_code: '',
options: {transaction_item_access_tokens: [], webhook: ''},
secret: '',
target_access_token: '',
target_account_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deposit_switch/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_code":"","options":{"transaction_item_access_tokens":[],"webhook":""},"secret":"","target_access_token":"","target_account_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"country_code": @"",
@"options": @{ @"transaction_item_access_tokens": @[ ], @"webhook": @"" },
@"secret": @"",
@"target_access_token": @"",
@"target_account_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deposit_switch/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deposit_switch/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deposit_switch/create",
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([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_access_token' => '',
'target_account_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deposit_switch/create', [
'body' => '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deposit_switch/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_access_token' => '',
'target_account_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'country_code' => '',
'options' => [
'transaction_item_access_tokens' => [
],
'webhook' => ''
],
'secret' => '',
'target_access_token' => '',
'target_account_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deposit_switch/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deposit_switch/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deposit_switch/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deposit_switch/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deposit_switch/create"
payload = {
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deposit_switch/create"
payload <- "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deposit_switch/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/deposit_switch/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"country_code\": \"\",\n \"options\": {\n \"transaction_item_access_tokens\": [],\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"target_access_token\": \"\",\n \"target_account_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deposit_switch/create";
let payload = json!({
"client_id": "",
"country_code": "",
"options": json!({
"transaction_item_access_tokens": (),
"webhook": ""
}),
"secret": "",
"target_access_token": "",
"target_account_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deposit_switch/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}'
echo '{
"client_id": "",
"country_code": "",
"options": {
"transaction_item_access_tokens": [],
"webhook": ""
},
"secret": "",
"target_access_token": "",
"target_account_id": ""
}' | \
http POST {{baseUrl}}/deposit_switch/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "country_code": "",\n "options": {\n "transaction_item_access_tokens": [],\n "webhook": ""\n },\n "secret": "",\n "target_access_token": "",\n "target_account_id": ""\n}' \
--output-document \
- {{baseUrl}}/deposit_switch/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"country_code": "",
"options": [
"transaction_item_access_tokens": [],
"webhook": ""
],
"secret": "",
"target_access_token": "",
"target_account_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deposit_switch/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"deposit_switch_id": "c7jMwPPManIwy9rwMewWP7lpb4pKRbtrbMomp",
"request_id": "lMjeOeu9X1VUh1F"
}
POST
Create a new identity verification
{{baseUrl}}/identity_verification/create
BODY json
{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity_verification/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity_verification/create" {:content-type :json
:form-params {:client_id ""
:gave_consent false
:is_idempotent false
:is_shareable false
:secret ""
:template_id ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""
:street2 ""}
:client_user_id ""
:date_of_birth ""
:email_address ""
:id_number {:type ""
:value ""}
:name {:family_name ""
:given_name ""}
:phone_number ""}}})
require "http/client"
url = "{{baseUrl}}/identity_verification/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity_verification/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity_verification/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity_verification/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity_verification/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 529
{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity_verification/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity_verification/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity_verification/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity_verification/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: '',
street2: ''
},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {
type: '',
value: ''
},
name: {
family_name: '',
given_name: ''
},
phone_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity_verification/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {type: '', value: ''},
name: {family_name: '', given_name: ''},
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity_verification/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","gave_consent":false,"is_idempotent":false,"is_shareable":false,"secret":"","template_id":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":"","street2":""},"client_user_id":"","date_of_birth":"","email_address":"","id_number":{"type":"","value":""},"name":{"family_name":"","given_name":""},"phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity_verification/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "gave_consent": false,\n "is_idempotent": false,\n "is_shareable": false,\n "secret": "",\n "template_id": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": "",\n "street2": ""\n },\n "client_user_id": "",\n "date_of_birth": "",\n "email_address": "",\n "id_number": {\n "type": "",\n "value": ""\n },\n "name": {\n "family_name": "",\n "given_name": ""\n },\n "phone_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity_verification/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity_verification/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {type: '', value: ''},
name: {family_name: '', given_name: ''},
phone_number: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {type: '', value: ''},
name: {family_name: '', given_name: ''},
phone_number: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity_verification/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: '',
street2: ''
},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {
type: '',
value: ''
},
name: {
family_name: '',
given_name: ''
},
phone_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
gave_consent: false,
is_idempotent: false,
is_shareable: false,
secret: '',
template_id: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: '', street2: ''},
client_user_id: '',
date_of_birth: '',
email_address: '',
id_number: {type: '', value: ''},
name: {family_name: '', given_name: ''},
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity_verification/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","gave_consent":false,"is_idempotent":false,"is_shareable":false,"secret":"","template_id":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":"","street2":""},"client_user_id":"","date_of_birth":"","email_address":"","id_number":{"type":"","value":""},"name":{"family_name":"","given_name":""},"phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"gave_consent": @NO,
@"is_idempotent": @NO,
@"is_shareable": @NO,
@"secret": @"",
@"template_id": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"", @"street2": @"" }, @"client_user_id": @"", @"date_of_birth": @"", @"email_address": @"", @"id_number": @{ @"type": @"", @"value": @"" }, @"name": @{ @"family_name": @"", @"given_name": @"" }, @"phone_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity_verification/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity_verification/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity_verification/create",
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([
'client_id' => '',
'gave_consent' => null,
'is_idempotent' => null,
'is_shareable' => null,
'secret' => '',
'template_id' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'name' => [
'family_name' => '',
'given_name' => ''
],
'phone_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity_verification/create', [
'body' => '{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity_verification/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'gave_consent' => null,
'is_idempotent' => null,
'is_shareable' => null,
'secret' => '',
'template_id' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'name' => [
'family_name' => '',
'given_name' => ''
],
'phone_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'gave_consent' => null,
'is_idempotent' => null,
'is_shareable' => null,
'secret' => '',
'template_id' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => '',
'street2' => ''
],
'client_user_id' => '',
'date_of_birth' => '',
'email_address' => '',
'id_number' => [
'type' => '',
'value' => ''
],
'name' => [
'family_name' => '',
'given_name' => ''
],
'phone_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/identity_verification/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity_verification/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity_verification/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity_verification/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity_verification/create"
payload = {
"client_id": "",
"gave_consent": False,
"is_idempotent": False,
"is_shareable": False,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity_verification/create"
payload <- "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity_verification/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity_verification/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"gave_consent\": false,\n \"is_idempotent\": false,\n \"is_shareable\": false,\n \"secret\": \"\",\n \"template_id\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\",\n \"street2\": \"\"\n },\n \"client_user_id\": \"\",\n \"date_of_birth\": \"\",\n \"email_address\": \"\",\n \"id_number\": {\n \"type\": \"\",\n \"value\": \"\"\n },\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\"\n },\n \"phone_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity_verification/create";
let payload = json!({
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
}),
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": json!({
"type": "",
"value": ""
}),
"name": json!({
"family_name": "",
"given_name": ""
}),
"phone_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity_verification/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}'
echo '{
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
},
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": {
"type": "",
"value": ""
},
"name": {
"family_name": "",
"given_name": ""
},
"phone_number": ""
}
}' | \
http POST {{baseUrl}}/identity_verification/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "gave_consent": false,\n "is_idempotent": false,\n "is_shareable": false,\n "secret": "",\n "template_id": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": "",\n "street2": ""\n },\n "client_user_id": "",\n "date_of_birth": "",\n "email_address": "",\n "id_number": {\n "type": "",\n "value": ""\n },\n "name": {\n "family_name": "",\n "given_name": ""\n },\n "phone_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/identity_verification/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"gave_consent": false,
"is_idempotent": false,
"is_shareable": false,
"secret": "",
"template_id": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": "",
"street2": ""
],
"client_user_id": "",
"date_of_birth": "",
"email_address": "",
"id_number": [
"type": "",
"value": ""
],
"name": [
"family_name": "",
"given_name": ""
],
"phone_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity_verification/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"client_user_id": "your-db-id-3b24110",
"completed_at": "2020-07-24T03:26:02Z",
"created_at": "2020-07-24T03:26:02Z",
"documentary_verification": {
"documents": [
{
"analysis": {
"authenticity": "match",
"extracted_data": {
"date_of_birth": "match",
"expiration_date": "not_expired",
"issuing_country": "match",
"name": "match"
},
"image_quality": "high"
},
"attempt": 1,
"extracted_data": {
"category": "drivers_license",
"expiration_date": "1990-05-29",
"id_number": "AB123456",
"issuing_country": "US",
"issuing_region": "IN"
},
"images": {
"cropped_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_back.jpeg",
"cropped_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_front.jpeg",
"face": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/face.jpeg",
"original_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_back.jpeg",
"original_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_front.jpeg"
},
"redacted_at": "2020-07-24T03:26:02Z",
"status": "success"
}
],
"status": "success"
},
"id": "idv_52xR9LKo77r1Np",
"kyc_check": {
"address": {
"po_box": "yes",
"summary": "match",
"type": "residential"
},
"date_of_birth": {
"summary": "match"
},
"id_number": {
"summary": "match"
},
"name": {
"summary": "match"
},
"phone_number": {
"summary": "match"
},
"status": "success"
},
"previous_attempt_id": "idv_42cF1MNo42r9Xj",
"redacted_at": "2020-07-24T03:26:02Z",
"request_id": "saKrIBuEB9qJZng",
"shareable_url": "https://flow.plaid.com/verify/idv_4FrXJvfQU3zGUR?key=e004115db797f7cc3083bff3167cba30644ef630fb46f5b086cde6cc3b86a36f",
"status": "success",
"steps": {
"accept_tos": "success",
"documentary_verification": "success",
"kyc_check": "success",
"risk_check": "success",
"selfie_check": "success",
"verify_sms": "success",
"watchlist_screening": "success"
},
"template": {
"id": "idvtmp_4FrXJvfQU3zGUR",
"version": 2
},
"user": {
"address": {
"city": "Pawnee",
"country": "US",
"postal_code": "46001",
"region": "IN",
"street": "123 Main St.",
"street2": "Unit 42"
},
"date_of_birth": "1990-05-29",
"email_address": "user@example.com",
"id_number": {
"type": "us_ssn",
"value": "123456789"
},
"ip_address": "192.0.2.42",
"name": {
"family_name": "Knope",
"given_name": "Leslie"
},
"phone_number": "+19876543212"
},
"watchlist_screening_id": "scr_52xR9LKo77r1Np"
}
POST
Create a new originator
{{baseUrl}}/transfer/originator/create
BODY json
{
"client_id": "",
"company_name": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/originator/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/originator/create" {:content-type :json
:form-params {:client_id ""
:company_name ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/originator/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/originator/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/originator/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/originator/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/originator/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"client_id": "",
"company_name": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/originator/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/originator/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/originator/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/originator/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
company_name: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/originator/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', company_name: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/originator/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","company_name":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/originator/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "company_name": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/originator/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/originator/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', company_name: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', company_name: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/originator/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
company_name: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', company_name: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/originator/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","company_name":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"company_name": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/originator/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/originator/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/originator/create",
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([
'client_id' => '',
'company_name' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/originator/create', [
'body' => '{
"client_id": "",
"company_name": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/originator/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'company_name' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'company_name' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/originator/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/originator/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"company_name": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/originator/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"company_name": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/originator/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/originator/create"
payload = {
"client_id": "",
"company_name": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/originator/create"
payload <- "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/originator/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/originator/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"company_name\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/originator/create";
let payload = json!({
"client_id": "",
"company_name": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/originator/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"company_name": "",
"secret": ""
}'
echo '{
"client_id": "",
"company_name": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/originator/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "company_name": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/originator/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"company_name": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/originator/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"company_name": "Marketplace of Shannon",
"originator_client_id": "6a65dh3d1h0d1027121ak184",
"request_id": "4zlKapIkTm8p5KM"
}
POST
Create a payment
{{baseUrl}}/payment_initiation/payment/create
BODY json
{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/payment/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/payment/create" {:content-type :json
:form-params {:amount {:currency ""
:value ""}
:client_id ""
:options {:bacs ""
:iban ""
:request_refund_details false
:scheme ""}
:recipient_id ""
:reference ""
:schedule ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/payment/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/payment/create"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/payment/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/payment/create"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/payment/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 257
{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/payment/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/payment/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/payment/create")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: ''
},
client_id: '',
options: {
bacs: '',
iban: '',
request_refund_details: false,
scheme: ''
},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/payment/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/create',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: ''},
client_id: '',
options: {bacs: '', iban: '', request_refund_details: false, scheme: ''},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/payment/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":""},"client_id":"","options":{"bacs":"","iban":"","request_refund_details":false,"scheme":""},"recipient_id":"","reference":"","schedule":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/payment/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": ""\n },\n "client_id": "",\n "options": {\n "bacs": "",\n "iban": "",\n "request_refund_details": false,\n "scheme": ""\n },\n "recipient_id": "",\n "reference": "",\n "schedule": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/payment/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: ''},
client_id: '',
options: {bacs: '', iban: '', request_refund_details: false, scheme: ''},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/create',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: ''},
client_id: '',
options: {bacs: '', iban: '', request_refund_details: false, scheme: ''},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/payment/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: ''
},
client_id: '',
options: {
bacs: '',
iban: '',
request_refund_details: false,
scheme: ''
},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/create',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: ''},
client_id: '',
options: {bacs: '', iban: '', request_refund_details: false, scheme: ''},
recipient_id: '',
reference: '',
schedule: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/payment/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":""},"client_id":"","options":{"bacs":"","iban":"","request_refund_details":false,"scheme":""},"recipient_id":"","reference":"","schedule":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @"" },
@"client_id": @"",
@"options": @{ @"bacs": @"", @"iban": @"", @"request_refund_details": @NO, @"scheme": @"" },
@"recipient_id": @"",
@"reference": @"",
@"schedule": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/payment/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/payment/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/payment/create",
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([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null,
'scheme' => ''
],
'recipient_id' => '',
'reference' => '',
'schedule' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/payment/create', [
'body' => '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/payment/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null,
'scheme' => ''
],
'recipient_id' => '',
'reference' => '',
'schedule' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null,
'scheme' => ''
],
'recipient_id' => '',
'reference' => '',
'schedule' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/payment/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/payment/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/payment/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/payment/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/payment/create"
payload = {
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": False,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/payment/create"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/payment/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/payment/create') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false,\n \"scheme\": \"\"\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"schedule\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/payment/create";
let payload = json!({
"amount": json!({
"currency": "",
"value": ""
}),
"client_id": "",
"options": json!({
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
}),
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/payment/create \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}'
echo '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
},
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/payment/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": ""\n },\n "client_id": "",\n "options": {\n "bacs": "",\n "iban": "",\n "request_refund_details": false,\n "scheme": ""\n },\n "recipient_id": "",\n "reference": "",\n "schedule": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/payment/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": ""
],
"client_id": "",
"options": [
"bacs": "",
"iban": "",
"request_refund_details": false,
"scheme": ""
],
"recipient_id": "",
"reference": "",
"schedule": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/payment/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"payment_id": "payment-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"request_id": "4ciYVmesrySiUAB",
"status": "PAYMENT_STATUS_INPUT_NEEDED"
}
POST
Create a recurring transfer
{{baseUrl}}/transfer/recurring/create
BODY json
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/recurring/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/recurring/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:ach_class ""
:amount ""
:client_id ""
:description ""
:device {:ip_address ""
:user_agent ""}
:funding_account_id ""
:idempotency_key ""
:iso_currency_code ""
:network ""
:schedule {:end_date ""
:interval_count 0
:interval_execution_day 0
:interval_unit ""
:start_date ""}
:secret ""
:test_clock_id ""
:type ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:legal_name ""
:phone_number ""}
:user_present false}})
require "http/client"
url = "{{baseUrl}}/transfer/recurring/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/recurring/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/recurring/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/recurring/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/recurring/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 715
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/recurring/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/recurring/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/recurring/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/recurring/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {
ip_address: '',
user_agent: ''
},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/recurring/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/recurring/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","client_id":"","description":"","device":{"ip_address":"","user_agent":""},"funding_account_id":"","idempotency_key":"","iso_currency_code":"","network":"","schedule":{"end_date":"","interval_count":0,"interval_execution_day":0,"interval_unit":"","start_date":""},"secret":"","test_clock_id":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/recurring/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "description": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "funding_account_id": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "network": "",\n "schedule": {\n "end_date": "",\n "interval_count": 0,\n "interval_execution_day": 0,\n "interval_unit": "",\n "start_date": ""\n },\n "secret": "",\n "test_clock_id": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n },\n "user_present": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/recurring/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/recurring/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/recurring/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {
ip_address: '',
user_agent: ''
},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
schedule: {
end_date: '',
interval_count: 0,
interval_execution_day: 0,
interval_unit: '',
start_date: ''
},
secret: '',
test_clock_id: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/recurring/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","client_id":"","description":"","device":{"ip_address":"","user_agent":""},"funding_account_id":"","idempotency_key":"","iso_currency_code":"","network":"","schedule":{"end_date":"","interval_count":0,"interval_execution_day":0,"interval_unit":"","start_date":""},"secret":"","test_clock_id":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"ach_class": @"",
@"amount": @"",
@"client_id": @"",
@"description": @"",
@"device": @{ @"ip_address": @"", @"user_agent": @"" },
@"funding_account_id": @"",
@"idempotency_key": @"",
@"iso_currency_code": @"",
@"network": @"",
@"schedule": @{ @"end_date": @"", @"interval_count": @0, @"interval_execution_day": @0, @"interval_unit": @"", @"start_date": @"" },
@"secret": @"",
@"test_clock_id": @"",
@"type": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"legal_name": @"", @"phone_number": @"" },
@"user_present": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/recurring/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/recurring/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/recurring/create",
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([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'schedule' => [
'end_date' => '',
'interval_count' => 0,
'interval_execution_day' => 0,
'interval_unit' => '',
'start_date' => ''
],
'secret' => '',
'test_clock_id' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/recurring/create', [
'body' => '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/recurring/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'schedule' => [
'end_date' => '',
'interval_count' => 0,
'interval_execution_day' => 0,
'interval_unit' => '',
'start_date' => ''
],
'secret' => '',
'test_clock_id' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'schedule' => [
'end_date' => '',
'interval_count' => 0,
'interval_execution_day' => 0,
'interval_unit' => '',
'start_date' => ''
],
'secret' => '',
'test_clock_id' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null
]));
$request->setRequestUrl('{{baseUrl}}/transfer/recurring/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/recurring/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/recurring/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/recurring/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/recurring/create"
payload = {
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/recurring/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/recurring/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/recurring/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"schedule\": {\n \"end_date\": \"\",\n \"interval_count\": 0,\n \"interval_execution_day\": 0,\n \"interval_unit\": \"\",\n \"start_date\": \"\"\n },\n \"secret\": \"\",\n \"test_clock_id\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/recurring/create";
let payload = json!({
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": json!({
"ip_address": "",
"user_agent": ""
}),
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": json!({
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
}),
"secret": "",
"test_clock_id": "",
"type": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"legal_name": "",
"phone_number": ""
}),
"user_present": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/recurring/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}'
echo '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": {
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
},
"secret": "",
"test_clock_id": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false
}' | \
http POST {{baseUrl}}/transfer/recurring/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "description": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "funding_account_id": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "network": "",\n "schedule": {\n "end_date": "",\n "interval_count": 0,\n "interval_execution_day": 0,\n "interval_unit": "",\n "start_date": ""\n },\n "secret": "",\n "test_clock_id": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n },\n "user_present": false\n}' \
--output-document \
- {{baseUrl}}/transfer/recurring/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"device": [
"ip_address": "",
"user_agent": ""
],
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"schedule": [
"end_date": "",
"interval_count": 0,
"interval_execution_day": 0,
"interval_unit": "",
"start_date": ""
],
"secret": "",
"test_clock_id": "",
"type": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"legal_name": "",
"phone_number": ""
],
"user_present": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/recurring/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"decision": "approved",
"decision_rationale": null,
"recurring_transfer": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"created": "2022-07-05T12:48:37Z",
"description": "payment",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"iso_currency_code": "USD",
"network": "ach",
"next_origination_date": "2022-10-28",
"origination_account_id": "",
"recurring_transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"schedule": {
"end_date": "2023-10-01",
"interval_count": 1,
"interval_execution_day": 5,
"interval_unit": "week",
"start_date": "2022-10-01"
},
"status": "active",
"test_clock_id": "b33a6eda-5e97-5d64-244a-a9274110151c",
"transfer_ids": [],
"type": "debit",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Create a refund
{{baseUrl}}/transfer/refund/create
BODY json
{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/refund/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/refund/create" {:content-type :json
:form-params {:amount ""
:client_id ""
:idempotency_key ""
:secret ""
:transfer_id ""}})
require "http/client"
url = "{{baseUrl}}/transfer/refund/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/refund/create"),
Content = new StringContent("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/refund/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/refund/create"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/refund/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 99
{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/refund/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/refund/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/refund/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/refund/create")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
client_id: '',
idempotency_key: '',
secret: '',
transfer_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/refund/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/create',
headers: {'content-type': 'application/json'},
data: {amount: '', client_id: '', idempotency_key: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/refund/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","idempotency_key":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/refund/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "client_id": "",\n "idempotency_key": "",\n "secret": "",\n "transfer_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/refund/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/refund/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({amount: '', client_id: '', idempotency_key: '', secret: '', transfer_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/create',
headers: {'content-type': 'application/json'},
body: {amount: '', client_id: '', idempotency_key: '', secret: '', transfer_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/refund/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
client_id: '',
idempotency_key: '',
secret: '',
transfer_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/create',
headers: {'content-type': 'application/json'},
data: {amount: '', client_id: '', idempotency_key: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/refund/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","idempotency_key":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"client_id": @"",
@"idempotency_key": @"",
@"secret": @"",
@"transfer_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/refund/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/refund/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/refund/create",
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([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'secret' => '',
'transfer_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/refund/create', [
'body' => '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/refund/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'secret' => '',
'transfer_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'secret' => '',
'transfer_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/refund/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/refund/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/refund/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/refund/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/refund/create"
payload = {
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/refund/create"
payload <- "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/refund/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/refund/create') do |req|
req.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/refund/create";
let payload = json!({
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/refund/create \
--header 'content-type: application/json' \
--data '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}'
echo '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
}' | \
http POST {{baseUrl}}/transfer/refund/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "client_id": "",\n "idempotency_key": "",\n "secret": "",\n "transfer_id": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/refund/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"client_id": "",
"idempotency_key": "",
"secret": "",
"transfer_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/refund/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"refund": {
"amount": "12.34",
"created": "2020-08-06T17:27:15Z",
"id": "667af684-9ee1-4f5f-862a-633ec4c545cc",
"status": "pending",
"transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9"
},
"request_id": "saKrIBuEB9qJZno"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/relay/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/relay/create" {:content-type :json
:form-params {:client_id ""
:report_tokens []
:secondary_client_id ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/credit/relay/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/relay/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/relay/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/relay/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/relay/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106
{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/relay/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/relay/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/relay/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/relay/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/relay/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/relay/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","report_tokens":[],"secondary_client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/relay/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "report_tokens": [],\n "secondary_client_id": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/relay/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/relay/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/relay/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
report_tokens: [],
secondary_client_id: '',
secret: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/relay/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","report_tokens":[],"secondary_client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"report_tokens": @[ ],
@"secondary_client_id": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/relay/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/relay/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/relay/create",
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([
'client_id' => '',
'report_tokens' => [
],
'secondary_client_id' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/relay/create', [
'body' => '{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/relay/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'report_tokens' => [
],
'secondary_client_id' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'report_tokens' => [
],
'secondary_client_id' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/relay/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/relay/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/relay/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/relay/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/relay/create"
payload = {
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/relay/create"
payload <- "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/relay/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/relay/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secondary_client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/relay/create";
let payload = json!({
"client_id": "",
"report_tokens": (),
"secondary_client_id": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/relay/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}'
echo '{
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/credit/relay/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "report_tokens": [],\n "secondary_client_id": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/credit/relay/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"report_tokens": [],
"secondary_client_id": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/relay/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"relay_token": "credit-relay-production-3TAU2CWVYBDVRHUCAAAI27ULU4",
"request_id": "Iam3b"
}
POST
Create a review for an entity watchlist screening
{{baseUrl}}/watchlist_screening/entity/review/create
BODY json
{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/review/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/review/create" {:content-type :json
:form-params {:client_id ""
:comment ""
:confirmed_hits []
:dismissed_hits []
:entity_watchlist_screening_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/review/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/review/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/review/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/review/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/review/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 141
{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/review/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/review/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/review/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/review/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/review/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/review/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","comment":"","confirmed_hits":[],"dismissed_hits":[],"entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/review/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "comment": "",\n "confirmed_hits": [],\n "dismissed_hits": [],\n "entity_watchlist_screening_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/review/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/review/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/review/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
entity_watchlist_screening_id: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/review/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","comment":"","confirmed_hits":[],"dismissed_hits":[],"entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"comment": @"",
@"confirmed_hits": @[ ],
@"dismissed_hits": @[ ],
@"entity_watchlist_screening_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/review/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/review/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/review/create",
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([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'entity_watchlist_screening_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/review/create', [
'body' => '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/review/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/review/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/review/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/review/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/review/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/review/create"
payload = {
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/review/create"
payload <- "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/review/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/review/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/review/create";
let payload = json!({
"client_id": "",
"comment": "",
"confirmed_hits": (),
"dismissed_hits": (),
"entity_watchlist_screening_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/review/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/review/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "comment": "",\n "confirmed_hits": [],\n "dismissed_hits": [],\n "entity_watchlist_screening_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/review/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"entity_watchlist_screening_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/review/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"comment": "These look like legitimate matches, rejecting the customer.",
"confirmed_hits": [
"enthit_52xR9LKo77r1Np"
],
"dismissed_hits": [
"enthit_52xR9LKo77r1Np"
],
"id": "entrev_aCLNRxK3UVzn2r",
"request_id": "saKrIBuEB9qJZng"
}
POST
Create a review for an individual watchlist screening
{{baseUrl}}/watchlist_screening/individual/review/create
BODY json
{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/review/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/review/create" {:content-type :json
:form-params {:client_id ""
:comment ""
:confirmed_hits []
:dismissed_hits []
:secret ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/review/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/review/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/review/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/review/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/review/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 134
{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/review/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/review/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/review/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/review/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/review/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/review/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","comment":"","confirmed_hits":[],"dismissed_hits":[],"secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/review/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "comment": "",\n "confirmed_hits": [],\n "dismissed_hits": [],\n "secret": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/review/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/review/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/review/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
comment: '',
confirmed_hits: [],
dismissed_hits: [],
secret: '',
watchlist_screening_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/review/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","comment":"","confirmed_hits":[],"dismissed_hits":[],"secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"comment": @"",
@"confirmed_hits": @[ ],
@"dismissed_hits": @[ ],
@"secret": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/review/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/review/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/review/create",
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([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'secret' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/review/create', [
'body' => '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/review/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'secret' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'comment' => '',
'confirmed_hits' => [
],
'dismissed_hits' => [
],
'secret' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/review/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/review/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/review/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/review/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/review/create"
payload = {
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/review/create"
payload <- "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/review/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/review/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"comment\": \"\",\n \"confirmed_hits\": [],\n \"dismissed_hits\": [],\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/review/create";
let payload = json!({
"client_id": "",
"comment": "",
"confirmed_hits": (),
"dismissed_hits": (),
"secret": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/review/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}'
echo '{
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/review/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "comment": "",\n "confirmed_hits": [],\n "dismissed_hits": [],\n "secret": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/review/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"comment": "",
"confirmed_hits": [],
"dismissed_hits": [],
"secret": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/review/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"comment": "These look like legitimate matches, rejecting the customer.",
"confirmed_hits": [
"scrhit_52xR9LKo77r1Np"
],
"dismissed_hits": [
"scrhit_52xR9LKo77r1Np"
],
"id": "rev_aCLNRxK3UVzn2r",
"request_id": "saKrIBuEB9qJZng"
}
POST
Create a test Item and processor token
{{baseUrl}}/sandbox/processor_token/create
BODY json
{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/processor_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/processor_token/create" {:content-type :json
:form-params {:client_id ""
:institution_id ""
:options {:override_password ""
:override_username ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/processor_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/processor_token/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/processor_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/processor_token/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/processor_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138
{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/processor_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/processor_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/processor_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/processor_token/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
institution_id: '',
options: {
override_password: '',
override_username: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/processor_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/processor_token/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
institution_id: '',
options: {override_password: '', override_username: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/processor_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","institution_id":"","options":{"override_password":"","override_username":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/processor_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "institution_id": "",\n "options": {\n "override_password": "",\n "override_username": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/processor_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/processor_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
institution_id: '',
options: {override_password: '', override_username: ''},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/processor_token/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
institution_id: '',
options: {override_password: '', override_username: ''},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/processor_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
institution_id: '',
options: {
override_password: '',
override_username: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/processor_token/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
institution_id: '',
options: {override_password: '', override_username: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/processor_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","institution_id":"","options":{"override_password":"","override_username":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"institution_id": @"",
@"options": @{ @"override_password": @"", @"override_username": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/processor_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/processor_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/processor_token/create",
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([
'client_id' => '',
'institution_id' => '',
'options' => [
'override_password' => '',
'override_username' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/processor_token/create', [
'body' => '{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/processor_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'institution_id' => '',
'options' => [
'override_password' => '',
'override_username' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'institution_id' => '',
'options' => [
'override_password' => '',
'override_username' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/processor_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/processor_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/processor_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/processor_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/processor_token/create"
payload = {
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/processor_token/create"
payload <- "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/processor_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/processor_token/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"institution_id\": \"\",\n \"options\": {\n \"override_password\": \"\",\n \"override_username\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/processor_token/create";
let payload = json!({
"client_id": "",
"institution_id": "",
"options": json!({
"override_password": "",
"override_username": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/processor_token/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}'
echo '{
"client_id": "",
"institution_id": "",
"options": {
"override_password": "",
"override_username": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/processor_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "institution_id": "",\n "options": {\n "override_password": "",\n "override_username": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/processor_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"institution_id": "",
"options": [
"override_password": "",
"override_username": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/processor_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"processor_token": "processor-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d",
"request_id": "Aim3b"
}
POST
Create a test Item
{{baseUrl}}/sandbox/public_token/create
BODY json
{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/public_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/public_token/create" {:content-type :json
:form-params {:client_id ""
:initial_products []
:institution_id ""
:options {:income_verification {:bank_income {:days_requested 0}
:income_source_types []}
:override_password ""
:override_username ""
:transactions {:end_date ""
:start_date ""}
:webhook ""}
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/public_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/public_token/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/public_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/public_token/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/public_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 405
{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/public_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/public_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/public_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/public_token/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {
bank_income: {
days_requested: 0
},
income_source_types: []
},
override_password: '',
override_username: '',
transactions: {
end_date: '',
start_date: ''
},
webhook: ''
},
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/public_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/public_token/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {bank_income: {days_requested: 0}, income_source_types: []},
override_password: '',
override_username: '',
transactions: {end_date: '', start_date: ''},
webhook: ''
},
secret: '',
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/public_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","initial_products":[],"institution_id":"","options":{"income_verification":{"bank_income":{"days_requested":0},"income_source_types":[]},"override_password":"","override_username":"","transactions":{"end_date":"","start_date":""},"webhook":""},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/public_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "initial_products": [],\n "institution_id": "",\n "options": {\n "income_verification": {\n "bank_income": {\n "days_requested": 0\n },\n "income_source_types": []\n },\n "override_password": "",\n "override_username": "",\n "transactions": {\n "end_date": "",\n "start_date": ""\n },\n "webhook": ""\n },\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/public_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/public_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {bank_income: {days_requested: 0}, income_source_types: []},
override_password: '',
override_username: '',
transactions: {end_date: '', start_date: ''},
webhook: ''
},
secret: '',
user_token: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/public_token/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {bank_income: {days_requested: 0}, income_source_types: []},
override_password: '',
override_username: '',
transactions: {end_date: '', start_date: ''},
webhook: ''
},
secret: '',
user_token: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/public_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {
bank_income: {
days_requested: 0
},
income_source_types: []
},
override_password: '',
override_username: '',
transactions: {
end_date: '',
start_date: ''
},
webhook: ''
},
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/public_token/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
initial_products: [],
institution_id: '',
options: {
income_verification: {bank_income: {days_requested: 0}, income_source_types: []},
override_password: '',
override_username: '',
transactions: {end_date: '', start_date: ''},
webhook: ''
},
secret: '',
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/public_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","initial_products":[],"institution_id":"","options":{"income_verification":{"bank_income":{"days_requested":0},"income_source_types":[]},"override_password":"","override_username":"","transactions":{"end_date":"","start_date":""},"webhook":""},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"initial_products": @[ ],
@"institution_id": @"",
@"options": @{ @"income_verification": @{ @"bank_income": @{ @"days_requested": @0 }, @"income_source_types": @[ ] }, @"override_password": @"", @"override_username": @"", @"transactions": @{ @"end_date": @"", @"start_date": @"" }, @"webhook": @"" },
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/public_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/public_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/public_token/create",
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([
'client_id' => '',
'initial_products' => [
],
'institution_id' => '',
'options' => [
'income_verification' => [
'bank_income' => [
'days_requested' => 0
],
'income_source_types' => [
]
],
'override_password' => '',
'override_username' => '',
'transactions' => [
'end_date' => '',
'start_date' => ''
],
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/public_token/create', [
'body' => '{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/public_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'initial_products' => [
],
'institution_id' => '',
'options' => [
'income_verification' => [
'bank_income' => [
'days_requested' => 0
],
'income_source_types' => [
]
],
'override_password' => '',
'override_username' => '',
'transactions' => [
'end_date' => '',
'start_date' => ''
],
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'initial_products' => [
],
'institution_id' => '',
'options' => [
'income_verification' => [
'bank_income' => [
'days_requested' => 0
],
'income_source_types' => [
]
],
'override_password' => '',
'override_username' => '',
'transactions' => [
'end_date' => '',
'start_date' => ''
],
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/public_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/public_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/public_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/public_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/public_token/create"
payload = {
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": { "days_requested": 0 },
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/public_token/create"
payload <- "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/public_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/public_token/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"initial_products\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"income_verification\": {\n \"bank_income\": {\n \"days_requested\": 0\n },\n \"income_source_types\": []\n },\n \"override_password\": \"\",\n \"override_username\": \"\",\n \"transactions\": {\n \"end_date\": \"\",\n \"start_date\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/public_token/create";
let payload = json!({
"client_id": "",
"initial_products": (),
"institution_id": "",
"options": json!({
"income_verification": json!({
"bank_income": json!({"days_requested": 0}),
"income_source_types": ()
}),
"override_password": "",
"override_username": "",
"transactions": json!({
"end_date": "",
"start_date": ""
}),
"webhook": ""
}),
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/public_token/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": {
"income_verification": {
"bank_income": {
"days_requested": 0
},
"income_source_types": []
},
"override_password": "",
"override_username": "",
"transactions": {
"end_date": "",
"start_date": ""
},
"webhook": ""
},
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/sandbox/public_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "initial_products": [],\n "institution_id": "",\n "options": {\n "income_verification": {\n "bank_income": {\n "days_requested": 0\n },\n "income_source_types": []\n },\n "override_password": "",\n "override_username": "",\n "transactions": {\n "end_date": "",\n "start_date": ""\n },\n "webhook": ""\n },\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/public_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"initial_products": [],
"institution_id": "",
"options": [
"income_verification": [
"bank_income": ["days_requested": 0],
"income_source_types": []
],
"override_password": "",
"override_username": "",
"transactions": [
"end_date": "",
"start_date": ""
],
"webhook": ""
],
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/public_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"public_token": "public-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d",
"request_id": "Aim3b"
}
POST
Create a test clock
{{baseUrl}}/sandbox/transfer/test_clock/create
BODY json
{
"client_id": "",
"secret": "",
"virtual_time": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/test_clock/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/test_clock/create" {:content-type :json
:form-params {:client_id ""
:secret ""
:virtual_time ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/test_clock/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/test_clock/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/test_clock/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/test_clock/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/test_clock/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"client_id": "",
"secret": "",
"virtual_time": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/test_clock/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/test_clock/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/test_clock/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
virtual_time: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/test_clock/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', virtual_time: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/test_clock/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","virtual_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/test_clock/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "virtual_time": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/test_clock/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', virtual_time: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', virtual_time: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/test_clock/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
virtual_time: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', virtual_time: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/test_clock/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","virtual_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"virtual_time": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/test_clock/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/test_clock/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/test_clock/create",
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([
'client_id' => '',
'secret' => '',
'virtual_time' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/test_clock/create', [
'body' => '{
"client_id": "",
"secret": "",
"virtual_time": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/test_clock/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'virtual_time' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'virtual_time' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/test_clock/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/test_clock/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"virtual_time": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/test_clock/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"virtual_time": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/test_clock/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/test_clock/create"
payload = {
"client_id": "",
"secret": "",
"virtual_time": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/test_clock/create"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/test_clock/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/test_clock/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"virtual_time\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/test_clock/create";
let payload = json!({
"client_id": "",
"secret": "",
"virtual_time": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/test_clock/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"virtual_time": ""
}'
echo '{
"client_id": "",
"secret": "",
"virtual_time": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/test_clock/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "virtual_time": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/test_clock/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"virtual_time": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/test_clock/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"test_clock": {
"test_clock_id": "b33a6eda-5e97-5d64-244a-a9274110151c",
"virtual_time": "2006-01-02T15:04:05Z"
}
}
POST
Create a transfer authorization
{{baseUrl}}/transfer/authorization/create
BODY json
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/authorization/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/authorization/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:ach_class ""
:amount ""
:beacon_session_id ""
:client_id ""
:device {:ip_address ""
:user_agent ""}
:funding_account_id ""
:idempotency_key ""
:iso_currency_code ""
:network ""
:origination_account_id ""
:originator_client_id ""
:payment_profile_token ""
:secret ""
:type ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:legal_name ""
:phone_number ""}
:user_present false
:with_guarantee false}})
require "http/client"
url = "{{baseUrl}}/transfer/authorization/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/authorization/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/authorization/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/authorization/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/authorization/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 673
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/authorization/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/authorization/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/authorization/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/authorization/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {
ip_address: '',
user_agent: ''
},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/authorization/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/authorization/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/authorization/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","beacon_session_id":"","client_id":"","device":{"ip_address":"","user_agent":""},"funding_account_id":"","idempotency_key":"","iso_currency_code":"","network":"","origination_account_id":"","originator_client_id":"","payment_profile_token":"","secret":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""},"user_present":false,"with_guarantee":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/authorization/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "beacon_session_id": "",\n "client_id": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "funding_account_id": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "network": "",\n "origination_account_id": "",\n "originator_client_id": "",\n "payment_profile_token": "",\n "secret": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n },\n "user_present": false,\n "with_guarantee": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/authorization/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/authorization/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/authorization/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/authorization/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {
ip_address: '',
user_agent: ''
},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/authorization/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
beacon_session_id: '',
client_id: '',
device: {ip_address: '', user_agent: ''},
funding_account_id: '',
idempotency_key: '',
iso_currency_code: '',
network: '',
origination_account_id: '',
originator_client_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
},
user_present: false,
with_guarantee: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/authorization/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","beacon_session_id":"","client_id":"","device":{"ip_address":"","user_agent":""},"funding_account_id":"","idempotency_key":"","iso_currency_code":"","network":"","origination_account_id":"","originator_client_id":"","payment_profile_token":"","secret":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""},"user_present":false,"with_guarantee":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"ach_class": @"",
@"amount": @"",
@"beacon_session_id": @"",
@"client_id": @"",
@"device": @{ @"ip_address": @"", @"user_agent": @"" },
@"funding_account_id": @"",
@"idempotency_key": @"",
@"iso_currency_code": @"",
@"network": @"",
@"origination_account_id": @"",
@"originator_client_id": @"",
@"payment_profile_token": @"",
@"secret": @"",
@"type": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"legal_name": @"", @"phone_number": @"" },
@"user_present": @NO,
@"with_guarantee": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/authorization/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/authorization/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/authorization/create",
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([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'beacon_session_id' => '',
'client_id' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'origination_account_id' => '',
'originator_client_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null,
'with_guarantee' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/authorization/create', [
'body' => '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/authorization/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'beacon_session_id' => '',
'client_id' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'origination_account_id' => '',
'originator_client_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null,
'with_guarantee' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'beacon_session_id' => '',
'client_id' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'funding_account_id' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'network' => '',
'origination_account_id' => '',
'originator_client_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
],
'user_present' => null,
'with_guarantee' => null
]));
$request->setRequestUrl('{{baseUrl}}/transfer/authorization/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/authorization/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/authorization/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/authorization/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/authorization/create"
payload = {
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": False,
"with_guarantee": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/authorization/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/authorization/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/authorization/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"beacon_session_id\": \"\",\n \"client_id\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"funding_account_id\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n },\n \"user_present\": false,\n \"with_guarantee\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/authorization/create";
let payload = json!({
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": json!({
"ip_address": "",
"user_agent": ""
}),
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"legal_name": "",
"phone_number": ""
}),
"user_present": false,
"with_guarantee": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/authorization/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}'
echo '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
},
"user_present": false,
"with_guarantee": false
}' | \
http POST {{baseUrl}}/transfer/authorization/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "beacon_session_id": "",\n "client_id": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "funding_account_id": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "network": "",\n "origination_account_id": "",\n "originator_client_id": "",\n "payment_profile_token": "",\n "secret": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n },\n "user_present": false,\n "with_guarantee": false\n}' \
--output-document \
- {{baseUrl}}/transfer/authorization/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"beacon_session_id": "",
"client_id": "",
"device": [
"ip_address": "",
"user_agent": ""
],
"funding_account_id": "",
"idempotency_key": "",
"iso_currency_code": "",
"network": "",
"origination_account_id": "",
"originator_client_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"legal_name": "",
"phone_number": ""
],
"user_present": false,
"with_guarantee": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/authorization/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"authorization": {
"created": "2020-08-06T17:27:15Z",
"decision": "approved",
"decision_rationale": null,
"guarantee_decision": "GUARANTEED",
"guarantee_decision_rationale": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"proposed_transfer": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"iso_currency_code": "USD",
"network": "ach",
"origination_account_id": "",
"originator_client_id": null,
"type": "credit",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Create a transfer intent object to invoke the Transfer UI
{{baseUrl}}/transfer/intent/create
BODY json
{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/intent/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/intent/create" {:content-type :json
:form-params {:account_id ""
:ach_class ""
:amount ""
:client_id ""
:description ""
:funding_account_id ""
:iso_currency_code ""
:metadata {}
:mode ""
:network ""
:origination_account_id ""
:require_guarantee false
:secret ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:legal_name ""
:phone_number ""}}})
require "http/client"
url = "{{baseUrl}}/transfer/intent/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/intent/create"),
Content = new StringContent("{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/intent/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/intent/create"
payload := strings.NewReader("{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/intent/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 493
{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/intent/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/intent/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/intent/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/intent/create")
.header("content-type", "application/json")
.body("{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/intent/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/create',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/intent/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","ach_class":"","amount":"","client_id":"","description":"","funding_account_id":"","iso_currency_code":"","metadata":{},"mode":"","network":"","origination_account_id":"","require_guarantee":false,"secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/intent/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "description": "",\n "funding_account_id": "",\n "iso_currency_code": "",\n "metadata": {},\n "mode": "",\n "network": "",\n "origination_account_id": "",\n "require_guarantee": false,\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/intent/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/intent/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/create',
headers: {'content-type': 'application/json'},
body: {
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/intent/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/create',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
ach_class: '',
amount: '',
client_id: '',
description: '',
funding_account_id: '',
iso_currency_code: '',
metadata: {},
mode: '',
network: '',
origination_account_id: '',
require_guarantee: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/intent/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","ach_class":"","amount":"","client_id":"","description":"","funding_account_id":"","iso_currency_code":"","metadata":{},"mode":"","network":"","origination_account_id":"","require_guarantee":false,"secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_id": @"",
@"ach_class": @"",
@"amount": @"",
@"client_id": @"",
@"description": @"",
@"funding_account_id": @"",
@"iso_currency_code": @"",
@"metadata": @{ },
@"mode": @"",
@"network": @"",
@"origination_account_id": @"",
@"require_guarantee": @NO,
@"secret": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"legal_name": @"", @"phone_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/intent/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/intent/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/intent/create",
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([
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'funding_account_id' => '',
'iso_currency_code' => '',
'metadata' => [
],
'mode' => '',
'network' => '',
'origination_account_id' => '',
'require_guarantee' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/intent/create', [
'body' => '{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/intent/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'funding_account_id' => '',
'iso_currency_code' => '',
'metadata' => [
],
'mode' => '',
'network' => '',
'origination_account_id' => '',
'require_guarantee' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_id' => '',
'ach_class' => '',
'amount' => '',
'client_id' => '',
'description' => '',
'funding_account_id' => '',
'iso_currency_code' => '',
'metadata' => [
],
'mode' => '',
'network' => '',
'origination_account_id' => '',
'require_guarantee' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/transfer/intent/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/intent/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/intent/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/intent/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/intent/create"
payload = {
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": False,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/intent/create"
payload <- "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/intent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/intent/create') do |req|
req.body = "{\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"funding_account_id\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"mode\": \"\",\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"require_guarantee\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/intent/create";
let payload = json!({
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": json!({}),
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"legal_name": "",
"phone_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/intent/create \
--header 'content-type: application/json' \
--data '{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
echo '{
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": {},
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}' | \
http POST {{baseUrl}}/transfer/intent/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "client_id": "",\n "description": "",\n "funding_account_id": "",\n "iso_currency_code": "",\n "metadata": {},\n "mode": "",\n "network": "",\n "origination_account_id": "",\n "require_guarantee": false,\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/transfer/intent/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_id": "",
"ach_class": "",
"amount": "",
"client_id": "",
"description": "",
"funding_account_id": "",
"iso_currency_code": "",
"metadata": [],
"mode": "",
"network": "",
"origination_account_id": "",
"require_guarantee": false,
"secret": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"legal_name": "",
"phone_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/intent/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"transfer_intent": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"created": "2020-08-06T17:27:15Z",
"description": "Desc",
"funding_account_id": "9853defc-e703-463d-86b1-dc0607a45359",
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"mode": "PAYMENT",
"origination_account_id": "9853defc-e703-463d-86b1-dc0607a45359",
"status": "PENDING",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94103",
"region": "CA",
"street": "100 Market Street"
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "123-456-7890"
}
}
}
POST
Create a transfer
{{baseUrl}}/transfer/create
BODY json
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:ach_class ""
:amount ""
:authorization_id ""
:client_id ""
:description ""
:idempotency_key ""
:iso_currency_code ""
:metadata {}
:network ""
:origination_account_id ""
:payment_profile_token ""
:secret ""
:type ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:legal_name ""
:phone_number ""}}})
require "http/client"
url = "{{baseUrl}}/transfer/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 539
{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","authorization_id":"","client_id":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","payment_profile_token":"","secret":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "authorization_id": "",\n "client_id": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "payment_profile_token": "",\n "secret": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
legal_name: '',
phone_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
ach_class: '',
amount: '',
authorization_id: '',
client_id: '',
description: '',
idempotency_key: '',
iso_currency_code: '',
metadata: {},
network: '',
origination_account_id: '',
payment_profile_token: '',
secret: '',
type: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
legal_name: '',
phone_number: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","ach_class":"","amount":"","authorization_id":"","client_id":"","description":"","idempotency_key":"","iso_currency_code":"","metadata":{},"network":"","origination_account_id":"","payment_profile_token":"","secret":"","type":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"ach_class": @"",
@"amount": @"",
@"authorization_id": @"",
@"client_id": @"",
@"description": @"",
@"idempotency_key": @"",
@"iso_currency_code": @"",
@"metadata": @{ },
@"network": @"",
@"origination_account_id": @"",
@"payment_profile_token": @"",
@"secret": @"",
@"type": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"legal_name": @"", @"phone_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/create",
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([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'authorization_id' => '',
'client_id' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/create', [
'body' => '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'authorization_id' => '',
'client_id' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'ach_class' => '',
'amount' => '',
'authorization_id' => '',
'client_id' => '',
'description' => '',
'idempotency_key' => '',
'iso_currency_code' => '',
'metadata' => [
],
'network' => '',
'origination_account_id' => '',
'payment_profile_token' => '',
'secret' => '',
'type' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/transfer/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/create"
payload = {
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"ach_class\": \"\",\n \"amount\": \"\",\n \"authorization_id\": \"\",\n \"client_id\": \"\",\n \"description\": \"\",\n \"idempotency_key\": \"\",\n \"iso_currency_code\": \"\",\n \"metadata\": {},\n \"network\": \"\",\n \"origination_account_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\",\n \"type\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/create";
let payload = json!({
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": json!({}),
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"legal_name": "",
"phone_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
echo '{
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": {},
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}' | \
http POST {{baseUrl}}/transfer/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "ach_class": "",\n "amount": "",\n "authorization_id": "",\n "client_id": "",\n "description": "",\n "idempotency_key": "",\n "iso_currency_code": "",\n "metadata": {},\n "network": "",\n "origination_account_id": "",\n "payment_profile_token": "",\n "secret": "",\n "type": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/transfer/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"ach_class": "",
"amount": "",
"authorization_id": "",
"client_id": "",
"description": "",
"idempotency_key": "",
"iso_currency_code": "",
"metadata": [],
"network": "",
"origination_account_id": "",
"payment_profile_token": "",
"secret": "",
"type": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"legal_name": "",
"phone_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"transfer": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"description": "payment",
"expected_settlement_date": "2020-08-04",
"failure_reason": null,
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"guarantee_decision": "GUARANTEED",
"guarantee_decision_rationale": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "",
"originator_client_id": "569ed2f36b3a3a021713abc1",
"recurring_transfer_id": null,
"refunds": [],
"standard_return_window": "2020-08-07",
"status": "pending",
"type": "credit",
"unauthorized_return_window": "2020-10-07",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
}
POST
Create a watchlist screening for a person
{{baseUrl}}/watchlist_screening/individual/create
BODY json
{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/create" {:content-type :json
:form-params {:client_id ""
:client_user_id ""
:search_terms {:country ""
:date_of_birth ""
:document_number ""
:legal_name ""
:watchlist_program_id ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 210
{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","search_terms":{"country":"","date_of_birth":"","document_number":"","legal_name":"","watchlist_program_id":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_user_id": "",\n "search_terms": {\n "country": "",\n "date_of_birth": "",\n "document_number": "",\n "legal_name": "",\n "watchlist_program_id": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","search_terms":{"country":"","date_of_birth":"","document_number":"","legal_name":"","watchlist_program_id":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_user_id": @"",
@"search_terms": @{ @"country": @"", @"date_of_birth": @"", @"document_number": @"", @"legal_name": @"", @"watchlist_program_id": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/create",
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([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/create', [
'body' => '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/create"
payload = {
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/create"
payload <- "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/create";
let payload = json!({
"client_id": "",
"client_user_id": "",
"search_terms": json!({
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}'
echo '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_user_id": "",\n "search_terms": {\n "country": "",\n "date_of_birth": "",\n "document_number": "",\n "legal_name": "",\n "watchlist_program_id": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_user_id": "",
"search_terms": [
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "scr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"date_of_birth": "1990-05-29",
"document_number": "C31195855",
"legal_name": "Aleksey Potemkin",
"version": 1,
"watchlist_program_id": "prg_2eRPsDnL66rZ7H"
},
"status": "cleared"
}
POST
Create a watchlist screening for an entity
{{baseUrl}}/watchlist_screening/entity/create
BODY json
{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/create" {:content-type :json
:form-params {:client_id ""
:client_user_id ""
:search_terms {:country ""
:document_number ""
:email_address ""
:entity_watchlist_program_id ""
:legal_name ""
:phone_number ""
:url ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 256
{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","search_terms":{"country":"","document_number":"","email_address":"","entity_watchlist_program_id":"","legal_name":"","phone_number":"","url":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_user_id": "",\n "search_terms": {\n "country": "",\n "document_number": "",\n "email_address": "",\n "entity_watchlist_program_id": "",\n "legal_name": "",\n "phone_number": "",\n "url": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
search_terms: {
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
url: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","search_terms":{"country":"","document_number":"","email_address":"","entity_watchlist_program_id":"","legal_name":"","phone_number":"","url":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_user_id": @"",
@"search_terms": @{ @"country": @"", @"document_number": @"", @"email_address": @"", @"entity_watchlist_program_id": @"", @"legal_name": @"", @"phone_number": @"", @"url": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/create",
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([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'url' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/create', [
'body' => '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'url' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_user_id' => '',
'search_terms' => [
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'url' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/create"
payload = {
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/create"
payload <- "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"search_terms\": {\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/create";
let payload = json!({
"client_id": "",
"client_user_id": "",
"search_terms": json!({
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}'
echo '{
"client_id": "",
"client_user_id": "",
"search_terms": {
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_user_id": "",\n "search_terms": {\n "country": "",\n "document_number": "",\n "email_address": "",\n "entity_watchlist_program_id": "",\n "legal_name": "",\n "phone_number": "",\n "url": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_user_id": "",
"search_terms": [
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"url": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "entscr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"document_number": "C31195855",
"email_address": "user@example.com",
"entity_watchlist_program_id": "entprg_2eRPsDnL66rZ7H",
"legal_name": "Al-Qaida",
"phone_number": "+14025671234",
"url": "https://example.com",
"version": 1
},
"status": "cleared"
}
POST
Create an Asset Report
{{baseUrl}}/asset_report/create
BODY json
{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/create" {:content-type :json
:form-params {:access_tokens []
:client_id ""
:days_requested 0
:options {:add_ons []
:client_report_id ""
:include_fast_report false
:products []
:user {:client_user_id ""
:email ""
:first_name ""
:last_name ""
:middle_name ""
:phone_number ""
:ssn ""}
:webhook ""}
:report_type ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/create"),
Content = new StringContent("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/create"
payload := strings.NewReader("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 425
{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/create")
.header("content-type", "application/json")
.body("{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/create',
headers: {'content-type': 'application/json'},
data: {
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_tokens":[],"client_id":"","days_requested":0,"options":{"add_ons":[],"client_report_id":"","include_fast_report":false,"products":[],"user":{"client_user_id":"","email":"","first_name":"","last_name":"","middle_name":"","phone_number":"","ssn":""},"webhook":""},"report_type":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_tokens": [],\n "client_id": "",\n "days_requested": 0,\n "options": {\n "add_ons": [],\n "client_report_id": "",\n "include_fast_report": false,\n "products": [],\n "user": {\n "client_user_id": "",\n "email": "",\n "first_name": "",\n "last_name": "",\n "middle_name": "",\n "phone_number": "",\n "ssn": ""\n },\n "webhook": ""\n },\n "report_type": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/create',
headers: {'content-type': 'application/json'},
body: {
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/create',
headers: {'content-type': 'application/json'},
data: {
access_tokens: [],
client_id: '',
days_requested: 0,
options: {
add_ons: [],
client_report_id: '',
include_fast_report: false,
products: [],
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
report_type: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_tokens":[],"client_id":"","days_requested":0,"options":{"add_ons":[],"client_report_id":"","include_fast_report":false,"products":[],"user":{"client_user_id":"","email":"","first_name":"","last_name":"","middle_name":"","phone_number":"","ssn":""},"webhook":""},"report_type":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_tokens": @[ ],
@"client_id": @"",
@"days_requested": @0,
@"options": @{ @"add_ons": @[ ], @"client_report_id": @"", @"include_fast_report": @NO, @"products": @[ ], @"user": @{ @"client_user_id": @"", @"email": @"", @"first_name": @"", @"last_name": @"", @"middle_name": @"", @"phone_number": @"", @"ssn": @"" }, @"webhook": @"" },
@"report_type": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/create",
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([
'access_tokens' => [
],
'client_id' => '',
'days_requested' => 0,
'options' => [
'add_ons' => [
],
'client_report_id' => '',
'include_fast_report' => null,
'products' => [
],
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'report_type' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/create', [
'body' => '{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_tokens' => [
],
'client_id' => '',
'days_requested' => 0,
'options' => [
'add_ons' => [
],
'client_report_id' => '',
'include_fast_report' => null,
'products' => [
],
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'report_type' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_tokens' => [
],
'client_id' => '',
'days_requested' => 0,
'options' => [
'add_ons' => [
],
'client_report_id' => '',
'include_fast_report' => null,
'products' => [
],
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'report_type' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/create"
payload = {
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": False,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/create"
payload <- "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/create') do |req|
req.body = "{\n \"access_tokens\": [],\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"add_ons\": [],\n \"client_report_id\": \"\",\n \"include_fast_report\": false,\n \"products\": [],\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/create";
let payload = json!({
"access_tokens": (),
"client_id": "",
"days_requested": 0,
"options": json!({
"add_ons": (),
"client_report_id": "",
"include_fast_report": false,
"products": (),
"user": json!({
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
}),
"webhook": ""
}),
"report_type": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/create \
--header 'content-type: application/json' \
--data '{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}'
echo '{
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": {
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"report_type": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_tokens": [],\n "client_id": "",\n "days_requested": 0,\n "options": {\n "add_ons": [],\n "client_report_id": "",\n "include_fast_report": false,\n "products": [],\n "user": {\n "client_user_id": "",\n "email": "",\n "first_name": "",\n "last_name": "",\n "middle_name": "",\n "phone_number": "",\n "ssn": ""\n },\n "webhook": ""\n },\n "report_type": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_tokens": [],
"client_id": "",
"days_requested": 0,
"options": [
"add_ons": [],
"client_report_id": "",
"include_fast_report": false,
"products": [],
"user": [
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
],
"webhook": ""
],
"report_type": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"asset_report_id": "1f414183-220c-44f5-b0c8-bc0e6d4053bb",
"asset_report_token": "assets-sandbox-6f12f5bb-22dd-4855-b918-f47ec439198a",
"request_id": "Iam3b"
}
POST
Create an e-wallet
{{baseUrl}}/wallet/create
BODY json
{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/create" {:content-type :json
:form-params {:client_id ""
:iso_currency_code ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/wallet/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
iso_currency_code: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', iso_currency_code: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","iso_currency_code":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "iso_currency_code": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', iso_currency_code: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', iso_currency_code: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
iso_currency_code: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', iso_currency_code: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","iso_currency_code":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"iso_currency_code": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/create",
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([
'client_id' => '',
'iso_currency_code' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/create', [
'body' => '{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'iso_currency_code' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'iso_currency_code' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/create"
payload = {
"client_id": "",
"iso_currency_code": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/create"
payload <- "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/create";
let payload = json!({
"client_id": "",
"iso_currency_code": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}'
echo '{
"client_id": "",
"iso_currency_code": "",
"secret": ""
}' | \
http POST {{baseUrl}}/wallet/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "iso_currency_code": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"iso_currency_code": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balance": {
"current": 123.12,
"iso_currency_code": "GBP"
},
"numbers": {
"bacs": {
"account": "12345678",
"sort_code": "123456"
}
},
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f6",
"request_id": "4zlKapIkTm8p5KM",
"status": "ACTIVE",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
POST
Create payment consent
{{baseUrl}}/payment_initiation/consent/create
BODY json
{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/consent/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/consent/create" {:content-type :json
:form-params {:client_id ""
:constraints {:max_payment_amount ""
:periodic_amounts [{:alignment ""
:amount ""
:interval ""}]
:valid_date_time {:from ""
:to ""}}
:options {:bacs ""
:iban ""
:request_refund_details false}
:recipient_id ""
:reference ""
:scopes []
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/consent/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/consent/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/consent/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/consent/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/consent/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 419
{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/consent/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/consent/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/consent/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [
{
alignment: '',
amount: '',
interval: ''
}
],
valid_date_time: {
from: '',
to: ''
}
},
options: {
bacs: '',
iban: '',
request_refund_details: false
},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/consent/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [{alignment: '', amount: '', interval: ''}],
valid_date_time: {from: '', to: ''}
},
options: {bacs: '', iban: '', request_refund_details: false},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/consent/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","constraints":{"max_payment_amount":"","periodic_amounts":[{"alignment":"","amount":"","interval":""}],"valid_date_time":{"from":"","to":""}},"options":{"bacs":"","iban":"","request_refund_details":false},"recipient_id":"","reference":"","scopes":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/consent/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "constraints": {\n "max_payment_amount": "",\n "periodic_amounts": [\n {\n "alignment": "",\n "amount": "",\n "interval": ""\n }\n ],\n "valid_date_time": {\n "from": "",\n "to": ""\n }\n },\n "options": {\n "bacs": "",\n "iban": "",\n "request_refund_details": false\n },\n "recipient_id": "",\n "reference": "",\n "scopes": [],\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/consent/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [{alignment: '', amount: '', interval: ''}],
valid_date_time: {from: '', to: ''}
},
options: {bacs: '', iban: '', request_refund_details: false},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/create',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [{alignment: '', amount: '', interval: ''}],
valid_date_time: {from: '', to: ''}
},
options: {bacs: '', iban: '', request_refund_details: false},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/consent/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [
{
alignment: '',
amount: '',
interval: ''
}
],
valid_date_time: {
from: '',
to: ''
}
},
options: {
bacs: '',
iban: '',
request_refund_details: false
},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/create',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
constraints: {
max_payment_amount: '',
periodic_amounts: [{alignment: '', amount: '', interval: ''}],
valid_date_time: {from: '', to: ''}
},
options: {bacs: '', iban: '', request_refund_details: false},
recipient_id: '',
reference: '',
scopes: [],
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/consent/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","constraints":{"max_payment_amount":"","periodic_amounts":[{"alignment":"","amount":"","interval":""}],"valid_date_time":{"from":"","to":""}},"options":{"bacs":"","iban":"","request_refund_details":false},"recipient_id":"","reference":"","scopes":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"constraints": @{ @"max_payment_amount": @"", @"periodic_amounts": @[ @{ @"alignment": @"", @"amount": @"", @"interval": @"" } ], @"valid_date_time": @{ @"from": @"", @"to": @"" } },
@"options": @{ @"bacs": @"", @"iban": @"", @"request_refund_details": @NO },
@"recipient_id": @"",
@"reference": @"",
@"scopes": @[ ],
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/consent/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/consent/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/consent/create",
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([
'client_id' => '',
'constraints' => [
'max_payment_amount' => '',
'periodic_amounts' => [
[
'alignment' => '',
'amount' => '',
'interval' => ''
]
],
'valid_date_time' => [
'from' => '',
'to' => ''
]
],
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null
],
'recipient_id' => '',
'reference' => '',
'scopes' => [
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/consent/create', [
'body' => '{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/consent/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'constraints' => [
'max_payment_amount' => '',
'periodic_amounts' => [
[
'alignment' => '',
'amount' => '',
'interval' => ''
]
],
'valid_date_time' => [
'from' => '',
'to' => ''
]
],
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null
],
'recipient_id' => '',
'reference' => '',
'scopes' => [
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'constraints' => [
'max_payment_amount' => '',
'periodic_amounts' => [
[
'alignment' => '',
'amount' => '',
'interval' => ''
]
],
'valid_date_time' => [
'from' => '',
'to' => ''
]
],
'options' => [
'bacs' => '',
'iban' => '',
'request_refund_details' => null
],
'recipient_id' => '',
'reference' => '',
'scopes' => [
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/consent/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/consent/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/consent/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/consent/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/consent/create"
payload = {
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": False
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/consent/create"
payload <- "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/consent/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/consent/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"constraints\": {\n \"max_payment_amount\": \"\",\n \"periodic_amounts\": [\n {\n \"alignment\": \"\",\n \"amount\": \"\",\n \"interval\": \"\"\n }\n ],\n \"valid_date_time\": {\n \"from\": \"\",\n \"to\": \"\"\n }\n },\n \"options\": {\n \"bacs\": \"\",\n \"iban\": \"\",\n \"request_refund_details\": false\n },\n \"recipient_id\": \"\",\n \"reference\": \"\",\n \"scopes\": [],\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/consent/create";
let payload = json!({
"client_id": "",
"constraints": json!({
"max_payment_amount": "",
"periodic_amounts": (
json!({
"alignment": "",
"amount": "",
"interval": ""
})
),
"valid_date_time": json!({
"from": "",
"to": ""
})
}),
"options": json!({
"bacs": "",
"iban": "",
"request_refund_details": false
}),
"recipient_id": "",
"reference": "",
"scopes": (),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/consent/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}'
echo '{
"client_id": "",
"constraints": {
"max_payment_amount": "",
"periodic_amounts": [
{
"alignment": "",
"amount": "",
"interval": ""
}
],
"valid_date_time": {
"from": "",
"to": ""
}
},
"options": {
"bacs": "",
"iban": "",
"request_refund_details": false
},
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/consent/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "constraints": {\n "max_payment_amount": "",\n "periodic_amounts": [\n {\n "alignment": "",\n "amount": "",\n "interval": ""\n }\n ],\n "valid_date_time": {\n "from": "",\n "to": ""\n }\n },\n "options": {\n "bacs": "",\n "iban": "",\n "request_refund_details": false\n },\n "recipient_id": "",\n "reference": "",\n "scopes": [],\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/consent/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"constraints": [
"max_payment_amount": "",
"periodic_amounts": [
[
"alignment": "",
"amount": "",
"interval": ""
]
],
"valid_date_time": [
"from": "",
"to": ""
]
],
"options": [
"bacs": "",
"iban": "",
"request_refund_details": false
],
"recipient_id": "",
"reference": "",
"scopes": [],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/consent/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"consent_id": "consent-id-production-feca8a7a-5491-4444-9999-f3062bb735d3",
"request_id": "4ciYmmesdqSiUAB",
"status": "UNAUTHORISED"
}
POST
Create payment profile
{{baseUrl}}/payment_profile/create
BODY json
{
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_profile/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_profile/create" {:content-type :json
:form-params {:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_profile/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_profile/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_profile/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_profile/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_profile/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_profile/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_profile/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_profile/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_profile/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_profile/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_profile/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_profile/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_profile/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_profile/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_profile/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_profile/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_profile/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_profile/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_profile/create",
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([
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_profile/create', [
'body' => '{
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_profile/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_profile/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_profile/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_profile/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_profile/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_profile/create"
payload = {
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_profile/create"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_profile/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_profile/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_profile/create";
let payload = json!({
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_profile/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_profile/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_profile/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_profile/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"payment_profile_token": "payment-profile-sandbox-eda0b25e-8ef3-4ebb-9ef7-1ef3db3c5ee8",
"request_id": "4ciYmmesdqSiUAB"
}
POST
Create payment recipient
{{baseUrl}}/payment_initiation/recipient/create
BODY json
{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/recipient/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/recipient/create" {:content-type :json
:form-params {:address {:city ""
:country ""
:postal_code ""
:street []}
:bacs ""
:client_id ""
:iban ""
:name ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/recipient/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/recipient/create"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/recipient/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/recipient/create"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/recipient/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 174
{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/recipient/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/recipient/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/recipient/create")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
country: '',
postal_code: '',
street: []
},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/recipient/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/create',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', country: '', postal_code: '', street: []},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/recipient/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","postal_code":"","street":[]},"bacs":"","client_id":"","iban":"","name":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/recipient/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "street": []\n },\n "bacs": "",\n "client_id": "",\n "iban": "",\n "name": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/recipient/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {city: '', country: '', postal_code: '', street: []},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/create',
headers: {'content-type': 'application/json'},
body: {
address: {city: '', country: '', postal_code: '', street: []},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/recipient/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
country: '',
postal_code: '',
street: []
},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/create',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', country: '', postal_code: '', street: []},
bacs: '',
client_id: '',
iban: '',
name: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/recipient/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","postal_code":"","street":[]},"bacs":"","client_id":"","iban":"","name":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"street": @[ ] },
@"bacs": @"",
@"client_id": @"",
@"iban": @"",
@"name": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/recipient/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/recipient/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/recipient/create",
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([
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'street' => [
]
],
'bacs' => '',
'client_id' => '',
'iban' => '',
'name' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/recipient/create', [
'body' => '{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/recipient/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'street' => [
]
],
'bacs' => '',
'client_id' => '',
'iban' => '',
'name' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'street' => [
]
],
'bacs' => '',
'client_id' => '',
'iban' => '',
'name' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/recipient/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/recipient/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/recipient/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/recipient/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/recipient/create"
payload = {
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/recipient/create"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/recipient/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/recipient/create') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"street\": []\n },\n \"bacs\": \"\",\n \"client_id\": \"\",\n \"iban\": \"\",\n \"name\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/recipient/create";
let payload = json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"street": ()
}),
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/recipient/create \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}'
echo '{
"address": {
"city": "",
"country": "",
"postal_code": "",
"street": []
},
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/recipient/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "street": []\n },\n "bacs": "",\n "client_id": "",\n "iban": "",\n "name": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/recipient/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"country": "",
"postal_code": "",
"street": []
],
"bacs": "",
"client_id": "",
"iban": "",
"name": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/recipient/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"recipient_id": "recipient-id-sandbox-9b6b4679-914b-445b-9450-efbdb80296f6",
"request_id": "4zlKapIkTm8p5KM"
}
POST
Create payment token
{{baseUrl}}/payment_initiation/payment/token/create
BODY json
{
"client_id": "",
"payment_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/payment/token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/payment/token/create" {:content-type :json
:form-params {:client_id ""
:payment_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/payment/token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/payment/token/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/payment/token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/payment/token/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/payment/token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"payment_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/payment/token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/payment/token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/payment/token/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
payment_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/payment/token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/payment/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/payment/token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "payment_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/payment/token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', payment_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/token/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', payment_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/payment/token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
payment_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/token/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/payment/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"payment_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/payment/token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/payment/token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/payment/token/create",
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([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/payment/token/create', [
'body' => '{
"client_id": "",
"payment_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/payment/token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/payment/token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/payment/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/payment/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/payment/token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/payment/token/create"
payload = {
"client_id": "",
"payment_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/payment/token/create"
payload <- "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/payment/token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/payment/token/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/payment/token/create";
let payload = json!({
"client_id": "",
"payment_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/payment/token/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"payment_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/payment/token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "payment_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/payment/token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"payment_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/payment/token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"payment_token": "payment-token-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"payment_token_expiration_time": "2020-01-01T00:00:00Z",
"request_id": "4ciYVmesrySiUAB"
}
POST
Create processor token
{{baseUrl}}/processor/token/create
BODY json
{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/token/create" {:content-type :json
:form-params {:access_token ""
:account_id ""
:client_id ""
:processor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/token/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/token/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 98
{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/token/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
processor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', processor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","processor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "processor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', account_id: '', client_id: '', processor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/token/create',
headers: {'content-type': 'application/json'},
body: {access_token: '', account_id: '', client_id: '', processor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
client_id: '',
processor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', account_id: '', client_id: '', processor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","processor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"client_id": @"",
@"processor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/token/create",
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([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'processor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/token/create', [
'body' => '{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'processor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'processor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/token/create"
payload = {
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/token/create"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/token/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"processor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/token/create";
let payload = json!({
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/token/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}'
echo '{
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "processor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"client_id": "",
"processor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"processor_token": "processor-sandbox-0asd1-a92nc",
"request_id": "xrQNYZ7Zoh6R7gV"
}
POST
Create public token
{{baseUrl}}/item/public_token/create
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/public_token/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/public_token/create" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/public_token/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/public_token/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/public_token/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/public_token/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/public_token/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/public_token/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/public_token/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/public_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/public_token/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/public_token/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/public_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/public_token/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/public_token/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/public_token/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/create',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/public_token/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/create',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/public_token/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/public_token/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/public_token/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/public_token/create",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/public_token/create', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/public_token/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/public_token/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/public_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/public_token/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/public_token/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/public_token/create"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/public_token/create"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/public_token/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/public_token/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/public_token/create";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/public_token/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/public_token/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/public_token/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/public_token/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"public_token": "public-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d",
"request_id": "Aim3b"
}
POST
Create transaction category rule
{{baseUrl}}/beta/transactions/rules/v1/create
BODY json
{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/beta/transactions/rules/v1/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/beta/transactions/rules/v1/create" {:content-type :json
:form-params {:access_token ""
:client_id ""
:personal_finance_category ""
:rule_details {:field ""
:query ""
:type ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/beta/transactions/rules/v1/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/beta/transactions/rules/v1/create"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/beta/transactions/rules/v1/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/beta/transactions/rules/v1/create"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/beta/transactions/rules/v1/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 168
{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/beta/transactions/rules/v1/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/beta/transactions/rules/v1/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/beta/transactions/rules/v1/create")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {
field: '',
query: '',
type: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/beta/transactions/rules/v1/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {field: '', query: '', type: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/beta/transactions/rules/v1/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","personal_finance_category":"","rule_details":{"field":"","query":"","type":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/beta/transactions/rules/v1/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "personal_finance_category": "",\n "rule_details": {\n "field": "",\n "query": "",\n "type": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/beta/transactions/rules/v1/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {field: '', query: '', type: ''},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/create',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {field: '', query: '', type: ''},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/beta/transactions/rules/v1/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {
field: '',
query: '',
type: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/create',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
personal_finance_category: '',
rule_details: {field: '', query: '', type: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/beta/transactions/rules/v1/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","personal_finance_category":"","rule_details":{"field":"","query":"","type":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"personal_finance_category": @"",
@"rule_details": @{ @"field": @"", @"query": @"", @"type": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/beta/transactions/rules/v1/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/beta/transactions/rules/v1/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/beta/transactions/rules/v1/create",
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([
'access_token' => '',
'client_id' => '',
'personal_finance_category' => '',
'rule_details' => [
'field' => '',
'query' => '',
'type' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/beta/transactions/rules/v1/create', [
'body' => '{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/beta/transactions/rules/v1/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'personal_finance_category' => '',
'rule_details' => [
'field' => '',
'query' => '',
'type' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'personal_finance_category' => '',
'rule_details' => [
'field' => '',
'query' => '',
'type' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/beta/transactions/rules/v1/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/beta/transactions/rules/v1/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/beta/transactions/rules/v1/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/beta/transactions/rules/v1/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/beta/transactions/rules/v1/create"
payload = {
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/beta/transactions/rules/v1/create"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/beta/transactions/rules/v1/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/beta/transactions/rules/v1/create') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"personal_finance_category\": \"\",\n \"rule_details\": {\n \"field\": \"\",\n \"query\": \"\",\n \"type\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/beta/transactions/rules/v1/create";
let payload = json!({
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": json!({
"field": "",
"query": "",
"type": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/beta/transactions/rules/v1/create \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": {
"field": "",
"query": "",
"type": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/beta/transactions/rules/v1/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "personal_finance_category": "",\n "rule_details": {\n "field": "",\n "query": "",\n "type": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/beta/transactions/rules/v1/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"personal_finance_category": "",
"rule_details": [
"field": "",
"query": "",
"type": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/beta/transactions/rules/v1/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM",
"rule": {
"created_at": "2022-02-28T11:00:00Z",
"id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNo",
"item_id": "wz666MBjYWTp2PDzzggYhM6oWWmBb",
"personal_finance_category": "FOOD_AND_DRINK_FAST_FOOD",
"rule_details": {
"field": "NAME",
"query": "Burger Shack",
"type": "SUBSTRING_MATCH"
}
}
}
POST
Create user
{{baseUrl}}/user/create
BODY json
{
"client_id": "",
"client_user_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/user/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/user/create" {:content-type :json
:form-params {:client_id ""
:client_user_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/user/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/user/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/user/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/user/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/user/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 61
{
"client_id": "",
"client_user_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/user/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/user/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/user/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/user/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_user_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/user/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/user/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', client_user_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/user/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/user/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_user_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/user/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/user/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', client_user_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/user/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', client_user_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/user/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_user_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/user/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', client_user_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/user/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_user_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/user/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/user/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/user/create",
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([
'client_id' => '',
'client_user_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/user/create', [
'body' => '{
"client_id": "",
"client_user_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/user/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_user_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_user_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/user/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/user/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/user/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/user/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/user/create"
payload = {
"client_id": "",
"client_user_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/user/create"
payload <- "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/user/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/user/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/user/create";
let payload = json!({
"client_id": "",
"client_user_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/user/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_user_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"client_user_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/user/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_user_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/user/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_user_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/user/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "Aim3b",
"user_id": "wz666MBjYWTp2PDzzggYhM6oWWmBb",
"user_token": "user-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d"
}
POST
Creates a new end customer for a Plaid reseller.
{{baseUrl}}/partner/customer/create
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partner/customer/create");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/partner/customer/create")
require "http/client"
url = "{{baseUrl}}/partner/customer/create"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/partner/customer/create"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partner/customer/create");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/partner/customer/create"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/partner/customer/create HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partner/customer/create")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/partner/customer/create"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/partner/customer/create")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partner/customer/create")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/partner/customer/create');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/create'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/partner/customer/create';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/partner/customer/create',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/partner/customer/create")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/partner/customer/create',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/create'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/partner/customer/create');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/create'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/partner/customer/create';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partner/customer/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/partner/customer/create" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/partner/customer/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/partner/customer/create');
echo $response->getBody();
setUrl('{{baseUrl}}/partner/customer/create');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/partner/customer/create');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partner/customer/create' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partner/customer/create' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/partner/customer/create", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/partner/customer/create"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/partner/customer/create"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/partner/customer/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/partner/customer/create') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/partner/customer/create";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/partner/customer/create
http POST {{baseUrl}}/partner/customer/create
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/partner/customer/create
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partner/customer/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"end_customer": {
"client_id": "7f57eb3d2a9j6480121fx361",
"company_name": "Plaid",
"secrets": {
"development": "95e56a510204f293d3bebd4b9cf5c7",
"sandbox": "b60b5201d006ca5a7081d27c824d77"
},
"status": "ACTIVE"
},
"request_id": "4zlKapIkTm8p5KM"
}
POST
Delete an Asset Report
{{baseUrl}}/asset_report/remove
BODY json
{
"asset_report_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/remove" {:content-type :json
:form-params {:asset_report_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/remove"),
Content = new StringContent("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/remove"
payload := strings.NewReader("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 65
{
"asset_report_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/remove")
.header("content-type", "application/json")
.body("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
asset_report_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/remove',
headers: {'content-type': 'application/json'},
data: {asset_report_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "asset_report_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({asset_report_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/remove',
headers: {'content-type': 'application/json'},
body: {asset_report_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
asset_report_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/remove',
headers: {'content-type': 'application/json'},
data: {asset_report_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"asset_report_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/remove",
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([
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/remove', [
'body' => '{
"asset_report_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/remove"
payload = {
"asset_report_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/remove"
payload <- "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/remove') do |req|
req.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/remove";
let payload = json!({
"asset_report_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/remove \
--header 'content-type: application/json' \
--data '{
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"asset_report_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "asset_report_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"asset_report_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"removed": true,
"request_id": "I6zHN"
}
POST
Enables a Plaid reseller's end customer in the Production environment.
{{baseUrl}}/partner/customer/enable
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partner/customer/enable");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/partner/customer/enable")
require "http/client"
url = "{{baseUrl}}/partner/customer/enable"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/partner/customer/enable"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partner/customer/enable");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/partner/customer/enable"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/partner/customer/enable HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partner/customer/enable")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/partner/customer/enable"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/partner/customer/enable")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partner/customer/enable")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/partner/customer/enable');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/enable'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/partner/customer/enable';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/partner/customer/enable',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/partner/customer/enable")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/partner/customer/enable',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/enable'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/partner/customer/enable');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/enable'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/partner/customer/enable';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partner/customer/enable"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/partner/customer/enable" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/partner/customer/enable",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/partner/customer/enable');
echo $response->getBody();
setUrl('{{baseUrl}}/partner/customer/enable');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/partner/customer/enable');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partner/customer/enable' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partner/customer/enable' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/partner/customer/enable", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/partner/customer/enable"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/partner/customer/enable"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/partner/customer/enable")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/partner/customer/enable') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/partner/customer/enable";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/partner/customer/enable
http POST {{baseUrl}}/partner/customer/enable
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/partner/customer/enable
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partner/customer/enable")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"production_secret": "79g03eoofwl8240v776r2h667442119",
"request_id": "4zlKapIkTm8p5KM"
}
POST
Enrich locally-held transaction data
{{baseUrl}}/transactions/enrich
BODY json
{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactions/enrich");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactions/enrich" {:content-type :json
:form-params {:account_type ""
:client_id ""
:options {:include_legacy_category false}
:secret ""
:transactions [{:amount ""
:date_posted ""
:description ""
:direction ""
:id ""
:iso_currency_code ""
:location {:address ""
:city ""
:country ""
:postal_code ""
:region ""}
:mcc ""}]}})
require "http/client"
url = "{{baseUrl}}/transactions/enrich"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transactions/enrich"),
Content = new StringContent("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactions/enrich");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactions/enrich"
payload := strings.NewReader("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transactions/enrich HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 452
{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactions/enrich")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactions/enrich"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactions/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactions/enrich")
.header("content-type", "application/json")
.body("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
account_type: '',
client_id: '',
options: {
include_legacy_category: false
},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {
address: '',
city: '',
country: '',
postal_code: '',
region: ''
},
mcc: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transactions/enrich');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/enrich',
headers: {'content-type': 'application/json'},
data: {
account_type: '',
client_id: '',
options: {include_legacy_category: false},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {address: '', city: '', country: '', postal_code: '', region: ''},
mcc: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactions/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_type":"","client_id":"","options":{"include_legacy_category":false},"secret":"","transactions":[{"amount":"","date_posted":"","description":"","direction":"","id":"","iso_currency_code":"","location":{"address":"","city":"","country":"","postal_code":"","region":""},"mcc":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transactions/enrich',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_type": "",\n "client_id": "",\n "options": {\n "include_legacy_category": false\n },\n "secret": "",\n "transactions": [\n {\n "amount": "",\n "date_posted": "",\n "description": "",\n "direction": "",\n "id": "",\n "iso_currency_code": "",\n "location": {\n "address": "",\n "city": "",\n "country": "",\n "postal_code": "",\n "region": ""\n },\n "mcc": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactions/enrich")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactions/enrich',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_type: '',
client_id: '',
options: {include_legacy_category: false},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {address: '', city: '', country: '', postal_code: '', region: ''},
mcc: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/enrich',
headers: {'content-type': 'application/json'},
body: {
account_type: '',
client_id: '',
options: {include_legacy_category: false},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {address: '', city: '', country: '', postal_code: '', region: ''},
mcc: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transactions/enrich');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_type: '',
client_id: '',
options: {
include_legacy_category: false
},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {
address: '',
city: '',
country: '',
postal_code: '',
region: ''
},
mcc: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/enrich',
headers: {'content-type': 'application/json'},
data: {
account_type: '',
client_id: '',
options: {include_legacy_category: false},
secret: '',
transactions: [
{
amount: '',
date_posted: '',
description: '',
direction: '',
id: '',
iso_currency_code: '',
location: {address: '', city: '', country: '', postal_code: '', region: ''},
mcc: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactions/enrich';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_type":"","client_id":"","options":{"include_legacy_category":false},"secret":"","transactions":[{"amount":"","date_posted":"","description":"","direction":"","id":"","iso_currency_code":"","location":{"address":"","city":"","country":"","postal_code":"","region":""},"mcc":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_type": @"",
@"client_id": @"",
@"options": @{ @"include_legacy_category": @NO },
@"secret": @"",
@"transactions": @[ @{ @"amount": @"", @"date_posted": @"", @"description": @"", @"direction": @"", @"id": @"", @"iso_currency_code": @"", @"location": @{ @"address": @"", @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"" }, @"mcc": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactions/enrich"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transactions/enrich" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactions/enrich",
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([
'account_type' => '',
'client_id' => '',
'options' => [
'include_legacy_category' => null
],
'secret' => '',
'transactions' => [
[
'amount' => '',
'date_posted' => '',
'description' => '',
'direction' => '',
'id' => '',
'iso_currency_code' => '',
'location' => [
'address' => '',
'city' => '',
'country' => '',
'postal_code' => '',
'region' => ''
],
'mcc' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transactions/enrich', [
'body' => '{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactions/enrich');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_type' => '',
'client_id' => '',
'options' => [
'include_legacy_category' => null
],
'secret' => '',
'transactions' => [
[
'amount' => '',
'date_posted' => '',
'description' => '',
'direction' => '',
'id' => '',
'iso_currency_code' => '',
'location' => [
'address' => '',
'city' => '',
'country' => '',
'postal_code' => '',
'region' => ''
],
'mcc' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_type' => '',
'client_id' => '',
'options' => [
'include_legacy_category' => null
],
'secret' => '',
'transactions' => [
[
'amount' => '',
'date_posted' => '',
'description' => '',
'direction' => '',
'id' => '',
'iso_currency_code' => '',
'location' => [
'address' => '',
'city' => '',
'country' => '',
'postal_code' => '',
'region' => ''
],
'mcc' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/transactions/enrich');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactions/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactions/enrich' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactions/enrich", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactions/enrich"
payload = {
"account_type": "",
"client_id": "",
"options": { "include_legacy_category": False },
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactions/enrich"
payload <- "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactions/enrich")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transactions/enrich') do |req|
req.body = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"include_legacy_category\": false\n },\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"date_posted\": \"\",\n \"description\": \"\",\n \"direction\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\",\n \"location\": {\n \"address\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\"\n },\n \"mcc\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactions/enrich";
let payload = json!({
"account_type": "",
"client_id": "",
"options": json!({"include_legacy_category": false}),
"secret": "",
"transactions": (
json!({
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": json!({
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
}),
"mcc": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transactions/enrich \
--header 'content-type: application/json' \
--data '{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}'
echo '{
"account_type": "",
"client_id": "",
"options": {
"include_legacy_category": false
},
"secret": "",
"transactions": [
{
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": {
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
},
"mcc": ""
}
]
}' | \
http POST {{baseUrl}}/transactions/enrich \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_type": "",\n "client_id": "",\n "options": {\n "include_legacy_category": false\n },\n "secret": "",\n "transactions": [\n {\n "amount": "",\n "date_posted": "",\n "description": "",\n "direction": "",\n "id": "",\n "iso_currency_code": "",\n "location": {\n "address": "",\n "city": "",\n "country": "",\n "postal_code": "",\n "region": ""\n },\n "mcc": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/transactions/enrich
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_type": "",
"client_id": "",
"options": ["include_legacy_category": false],
"secret": "",
"transactions": [
[
"amount": "",
"date_posted": "",
"description": "",
"direction": "",
"id": "",
"iso_currency_code": "",
"location": [
"address": "",
"city": "",
"country": "",
"postal_code": "",
"region": ""
],
"mcc": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactions/enrich")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"enriched_transactions": [
{
"amount": 72.1,
"description": "PURCHASE WM SUPERCENTER #1700",
"direction": "OUTFLOW",
"enrichments": {
"counterparties": [
{
"entity_id": "plaid_6f2d35f96f1b2ec4af99222c23f70c35",
"logo_url": "https://plaid-merchant-logos.plaid.com/walmart_1100.png",
"name": "Walmart",
"type": "merchant",
"website": "walmart.com"
}
],
"entity_id": "plaid_6f2d35f96f1b2ec4af99222c23f70c35",
"location": {
"address": "13425 Community Rd",
"city": "Poway",
"country": "US",
"lat": null,
"lon": null,
"postal_code": "92064",
"region": "CA",
"store_number": "1700"
},
"logo_url": "https://plaid-merchant-logos.plaid.com/walmart_1100.png",
"merchant_name": "Walmart",
"payment_channel": "in store",
"personal_finance_category": {
"detailed": "GENERAL_MERCHANDISE_SUPERSTORES",
"primary": "GENERAL_MERCHANDISE"
},
"personal_finance_category_icon_url": "https://plaid-category-icons.plaid.com/PFC_GENERAL_MERCHANDISE.png",
"website": "walmart.com"
},
"id": "6135818adda16500147e7c1d",
"iso_currency_code": "USD"
},
{
"amount": 28.34,
"description": "DD DOORDASH BURGERKIN 855-123-4567 CA",
"direction": "OUTFLOW",
"enrichments": {
"counterparties": [
{
"entity_id": "plaid_3fefe2ae8fc45d84d9038b6bb5cd1094",
"logo_url": "https://plaid-counterparty-logos.plaid.com/doordash_1.png",
"name": "DoorDash",
"type": "marketplace",
"website": "doordash.com"
},
{
"entity_id": "plaid_086ef08062de7018e3c74c28a82cb812",
"logo_url": "https://plaid-merchant-logos.plaid.com/burger_king_155.png",
"name": "Burger King",
"type": "merchant",
"website": "burgerking.com"
}
],
"entity_id": "plaid_086ef08062de7018e3c74c28a82cb812",
"location": {
"address": null,
"city": null,
"country": null,
"lat": null,
"lon": null,
"postal_code": null,
"region": null,
"store_number": null
},
"logo_url": "https://plaid-merchant-logos.plaid.com/burger_king_155.png",
"merchant_name": "Burger King",
"payment_channel": "online",
"personal_finance_category": {
"detailed": "FOOD_AND_DRINK_FAST_FOOD",
"primary": "FOOD_AND_DRINK"
},
"personal_finance_category_icon_url": "https://plaid-category-icons.plaid.com/PFC_FOOD_AND_DRINK.png",
"website": "burgerking.com"
},
"id": "3958434bhde9384bcmeo3401",
"iso_currency_code": "USD"
}
],
"request_id": "Wvhy9PZHQLV8njG"
}
POST
Evaluate a planned ACH transaction (POST)
{{baseUrl}}/signal/evaluate
BODY json
{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signal/evaluate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signal/evaluate" {:content-type :json
:form-params {:access_token ""
:account_id ""
:amount ""
:client_id ""
:client_transaction_id ""
:client_user_id ""
:default_payment_method ""
:device {:ip_address ""
:user_agent ""}
:is_recurring false
:secret ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:name {:family_name ""
:given_name ""
:middle_name ""
:prefix ""
:suffix ""}
:phone_number ""}
:user_present false}})
require "http/client"
url = "{{baseUrl}}/signal/evaluate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/signal/evaluate"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signal/evaluate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signal/evaluate"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/signal/evaluate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 620
{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signal/evaluate")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signal/evaluate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signal/evaluate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signal/evaluate")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {
ip_address: '',
user_agent: ''
},
is_recurring: false,
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
name: {
family_name: '',
given_name: '',
middle_name: '',
prefix: '',
suffix: ''
},
phone_number: ''
},
user_present: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/signal/evaluate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/evaluate',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signal/evaluate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","amount":"","client_id":"","client_transaction_id":"","client_user_id":"","default_payment_method":"","device":{"ip_address":"","user_agent":""},"is_recurring":false,"secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","name":{"family_name":"","given_name":"","middle_name":"","prefix":"","suffix":""},"phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signal/evaluate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "amount": "",\n "client_id": "",\n "client_transaction_id": "",\n "client_user_id": "",\n "default_payment_method": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "is_recurring": false,\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "name": {\n "family_name": "",\n "given_name": "",\n "middle_name": "",\n "prefix": "",\n "suffix": ""\n },\n "phone_number": ""\n },\n "user_present": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signal/evaluate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/signal/evaluate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/evaluate',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/signal/evaluate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {
ip_address: '',
user_agent: ''
},
is_recurring: false,
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
name: {
family_name: '',
given_name: '',
middle_name: '',
prefix: '',
suffix: ''
},
phone_number: ''
},
user_present: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/evaluate',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signal/evaluate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","amount":"","client_id":"","client_transaction_id":"","client_user_id":"","default_payment_method":"","device":{"ip_address":"","user_agent":""},"is_recurring":false,"secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","name":{"family_name":"","given_name":"","middle_name":"","prefix":"","suffix":""},"phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"amount": @"",
@"client_id": @"",
@"client_transaction_id": @"",
@"client_user_id": @"",
@"default_payment_method": @"",
@"device": @{ @"ip_address": @"", @"user_agent": @"" },
@"is_recurring": @NO,
@"secret": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"name": @{ @"family_name": @"", @"given_name": @"", @"middle_name": @"", @"prefix": @"", @"suffix": @"" }, @"phone_number": @"" },
@"user_present": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signal/evaluate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signal/evaluate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signal/evaluate",
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([
'access_token' => '',
'account_id' => '',
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/signal/evaluate', [
'body' => '{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signal/evaluate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]));
$request->setRequestUrl('{{baseUrl}}/signal/evaluate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signal/evaluate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signal/evaluate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/signal/evaluate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signal/evaluate"
payload = {
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": False,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signal/evaluate"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signal/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/signal/evaluate') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signal/evaluate";
let payload = json!({
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": json!({
"ip_address": "",
"user_agent": ""
}),
"is_recurring": false,
"secret": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"name": json!({
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
}),
"phone_number": ""
}),
"user_present": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signal/evaluate \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
echo '{
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}' | \
http POST {{baseUrl}}/signal/evaluate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "amount": "",\n "client_id": "",\n "client_transaction_id": "",\n "client_user_id": "",\n "default_payment_method": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "is_recurring": false,\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "name": {\n "family_name": "",\n "given_name": "",\n "middle_name": "",\n "prefix": "",\n "suffix": ""\n },\n "phone_number": ""\n },\n "user_present": false\n}' \
--output-document \
- {{baseUrl}}/signal/evaluate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": [
"ip_address": "",
"user_agent": ""
],
"is_recurring": false,
"secret": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"name": [
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
],
"phone_number": ""
],
"user_present": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signal/evaluate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"core_attributes": {
"days_since_first_plaid_connection": 510,
"is_savings_or_money_market_account": false,
"plaid_connections_count_30d": 7,
"plaid_connections_count_7d": 6,
"total_plaid_connections_count": 15
},
"request_id": "mdqfuVxeoza6mhu",
"scores": {
"bank_initiated_return_risk": {
"risk_tier": 7,
"score": 72
},
"customer_initiated_return_risk": {
"risk_tier": 1,
"score": 9
}
}
}
POST
Evaluate a planned ACH transaction
{{baseUrl}}/processor/signal/evaluate
BODY json
{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/signal/evaluate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/signal/evaluate" {:content-type :json
:form-params {:amount ""
:client_id ""
:client_transaction_id ""
:client_user_id ""
:default_payment_method ""
:device {:ip_address ""
:user_agent ""}
:is_recurring false
:processor_token ""
:secret ""
:user {:address {:city ""
:country ""
:postal_code ""
:region ""
:street ""}
:email_address ""
:name {:family_name ""
:given_name ""
:middle_name ""
:prefix ""
:suffix ""}
:phone_number ""}
:user_present false}})
require "http/client"
url = "{{baseUrl}}/processor/signal/evaluate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/signal/evaluate"),
Content = new StringContent("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/signal/evaluate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/signal/evaluate"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/signal/evaluate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 603
{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/signal/evaluate")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/signal/evaluate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/signal/evaluate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/signal/evaluate")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
.asString();
const data = JSON.stringify({
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {
ip_address: '',
user_agent: ''
},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
name: {
family_name: '',
given_name: '',
middle_name: '',
prefix: '',
suffix: ''
},
phone_number: ''
},
user_present: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/signal/evaluate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/evaluate',
headers: {'content-type': 'application/json'},
data: {
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/signal/evaluate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","client_transaction_id":"","client_user_id":"","default_payment_method":"","device":{"ip_address":"","user_agent":""},"is_recurring":false,"processor_token":"","secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","name":{"family_name":"","given_name":"","middle_name":"","prefix":"","suffix":""},"phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/signal/evaluate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "client_id": "",\n "client_transaction_id": "",\n "client_user_id": "",\n "default_payment_method": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "is_recurring": false,\n "processor_token": "",\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "name": {\n "family_name": "",\n "given_name": "",\n "middle_name": "",\n "prefix": "",\n "suffix": ""\n },\n "phone_number": ""\n },\n "user_present": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/signal/evaluate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/signal/evaluate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/evaluate',
headers: {'content-type': 'application/json'},
body: {
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/signal/evaluate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {
ip_address: '',
user_agent: ''
},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {
city: '',
country: '',
postal_code: '',
region: '',
street: ''
},
email_address: '',
name: {
family_name: '',
given_name: '',
middle_name: '',
prefix: '',
suffix: ''
},
phone_number: ''
},
user_present: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/evaluate',
headers: {'content-type': 'application/json'},
data: {
amount: '',
client_id: '',
client_transaction_id: '',
client_user_id: '',
default_payment_method: '',
device: {ip_address: '', user_agent: ''},
is_recurring: false,
processor_token: '',
secret: '',
user: {
address: {city: '', country: '', postal_code: '', region: '', street: ''},
email_address: '',
name: {family_name: '', given_name: '', middle_name: '', prefix: '', suffix: ''},
phone_number: ''
},
user_present: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/signal/evaluate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","client_transaction_id":"","client_user_id":"","default_payment_method":"","device":{"ip_address":"","user_agent":""},"is_recurring":false,"processor_token":"","secret":"","user":{"address":{"city":"","country":"","postal_code":"","region":"","street":""},"email_address":"","name":{"family_name":"","given_name":"","middle_name":"","prefix":"","suffix":""},"phone_number":""},"user_present":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"client_id": @"",
@"client_transaction_id": @"",
@"client_user_id": @"",
@"default_payment_method": @"",
@"device": @{ @"ip_address": @"", @"user_agent": @"" },
@"is_recurring": @NO,
@"processor_token": @"",
@"secret": @"",
@"user": @{ @"address": @{ @"city": @"", @"country": @"", @"postal_code": @"", @"region": @"", @"street": @"" }, @"email_address": @"", @"name": @{ @"family_name": @"", @"given_name": @"", @"middle_name": @"", @"prefix": @"", @"suffix": @"" }, @"phone_number": @"" },
@"user_present": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/signal/evaluate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/signal/evaluate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/signal/evaluate",
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([
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'processor_token' => '',
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/signal/evaluate', [
'body' => '{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/signal/evaluate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'processor_token' => '',
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'client_id' => '',
'client_transaction_id' => '',
'client_user_id' => '',
'default_payment_method' => '',
'device' => [
'ip_address' => '',
'user_agent' => ''
],
'is_recurring' => null,
'processor_token' => '',
'secret' => '',
'user' => [
'address' => [
'city' => '',
'country' => '',
'postal_code' => '',
'region' => '',
'street' => ''
],
'email_address' => '',
'name' => [
'family_name' => '',
'given_name' => '',
'middle_name' => '',
'prefix' => '',
'suffix' => ''
],
'phone_number' => ''
],
'user_present' => null
]));
$request->setRequestUrl('{{baseUrl}}/processor/signal/evaluate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/signal/evaluate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/signal/evaluate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/signal/evaluate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/signal/evaluate"
payload = {
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": False,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/signal/evaluate"
payload <- "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/signal/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/signal/evaluate') do |req|
req.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"client_user_id\": \"\",\n \"default_payment_method\": \"\",\n \"device\": {\n \"ip_address\": \"\",\n \"user_agent\": \"\"\n },\n \"is_recurring\": false,\n \"processor_token\": \"\",\n \"secret\": \"\",\n \"user\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"postal_code\": \"\",\n \"region\": \"\",\n \"street\": \"\"\n },\n \"email_address\": \"\",\n \"name\": {\n \"family_name\": \"\",\n \"given_name\": \"\",\n \"middle_name\": \"\",\n \"prefix\": \"\",\n \"suffix\": \"\"\n },\n \"phone_number\": \"\"\n },\n \"user_present\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/signal/evaluate";
let payload = json!({
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": json!({
"ip_address": "",
"user_agent": ""
}),
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": json!({
"address": json!({
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
}),
"email_address": "",
"name": json!({
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
}),
"phone_number": ""
}),
"user_present": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/signal/evaluate \
--header 'content-type: application/json' \
--data '{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}'
echo '{
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": {
"ip_address": "",
"user_agent": ""
},
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": {
"address": {
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
},
"email_address": "",
"name": {
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
},
"phone_number": ""
},
"user_present": false
}' | \
http POST {{baseUrl}}/processor/signal/evaluate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "client_id": "",\n "client_transaction_id": "",\n "client_user_id": "",\n "default_payment_method": "",\n "device": {\n "ip_address": "",\n "user_agent": ""\n },\n "is_recurring": false,\n "processor_token": "",\n "secret": "",\n "user": {\n "address": {\n "city": "",\n "country": "",\n "postal_code": "",\n "region": "",\n "street": ""\n },\n "email_address": "",\n "name": {\n "family_name": "",\n "given_name": "",\n "middle_name": "",\n "prefix": "",\n "suffix": ""\n },\n "phone_number": ""\n },\n "user_present": false\n}' \
--output-document \
- {{baseUrl}}/processor/signal/evaluate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"client_id": "",
"client_transaction_id": "",
"client_user_id": "",
"default_payment_method": "",
"device": [
"ip_address": "",
"user_agent": ""
],
"is_recurring": false,
"processor_token": "",
"secret": "",
"user": [
"address": [
"city": "",
"country": "",
"postal_code": "",
"region": "",
"street": ""
],
"email_address": "",
"name": [
"family_name": "",
"given_name": "",
"middle_name": "",
"prefix": "",
"suffix": ""
],
"phone_number": ""
],
"user_present": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/signal/evaluate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"core_attributes": {
"days_since_first_plaid_connection": 510,
"is_savings_or_money_market_account": false,
"plaid_connections_count_30d": 7,
"plaid_connections_count_7d": 6,
"total_plaid_connections_count": 15
},
"request_id": "mdqfuVxeoza6mhu",
"scores": {
"bank_initiated_return_risk": {
"risk_tier": 7,
"score": 72
},
"customer_initiated_return_risk": {
"risk_tier": 1,
"score": 9
}
}
}
POST
Exchange public token for an access token
{{baseUrl}}/item/public_token/exchange
BODY json
{
"client_id": "",
"public_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/public_token/exchange");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/public_token/exchange" {:content-type :json
:form-params {:client_id ""
:public_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/public_token/exchange"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/public_token/exchange"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/public_token/exchange");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/public_token/exchange"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/public_token/exchange HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"client_id": "",
"public_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/public_token/exchange")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/public_token/exchange"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/public_token/exchange")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/public_token/exchange")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
public_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/public_token/exchange');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/exchange',
headers: {'content-type': 'application/json'},
data: {client_id: '', public_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/public_token/exchange';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","public_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/public_token/exchange',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "public_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/public_token/exchange")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/public_token/exchange',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', public_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/exchange',
headers: {'content-type': 'application/json'},
body: {client_id: '', public_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/public_token/exchange');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
public_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/public_token/exchange',
headers: {'content-type': 'application/json'},
data: {client_id: '', public_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/public_token/exchange';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","public_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"public_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/public_token/exchange"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/public_token/exchange" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/public_token/exchange",
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([
'client_id' => '',
'public_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/public_token/exchange', [
'body' => '{
"client_id": "",
"public_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/public_token/exchange');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'public_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'public_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/public_token/exchange');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/public_token/exchange' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"public_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/public_token/exchange' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"public_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/public_token/exchange", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/public_token/exchange"
payload = {
"client_id": "",
"public_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/public_token/exchange"
payload <- "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/public_token/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/public_token/exchange') do |req|
req.body = "{\n \"client_id\": \"\",\n \"public_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/public_token/exchange";
let payload = json!({
"client_id": "",
"public_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/public_token/exchange \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"public_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"public_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/public_token/exchange \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "public_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/public_token/exchange
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"public_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/public_token/exchange")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"access_token": "access-sandbox-de3ce8ef-33f8-452c-a685-8671031fc0f6",
"item_id": "M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op",
"request_id": "Aim3b"
}
POST
Exchange the Link Correlation Id for a Link Token
{{baseUrl}}/link/oauth/correlation_id/exchange
BODY json
{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/link/oauth/correlation_id/exchange");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/link/oauth/correlation_id/exchange" {:content-type :json
:form-params {:client_id ""
:link_correlation_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/link/oauth/correlation_id/exchange"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/link/oauth/correlation_id/exchange"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/link/oauth/correlation_id/exchange");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/link/oauth/correlation_id/exchange"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/link/oauth/correlation_id/exchange HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/link/oauth/correlation_id/exchange")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/link/oauth/correlation_id/exchange"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/link/oauth/correlation_id/exchange")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/link/oauth/correlation_id/exchange")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
link_correlation_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/link/oauth/correlation_id/exchange');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/link/oauth/correlation_id/exchange',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_correlation_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/link/oauth/correlation_id/exchange';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_correlation_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/link/oauth/correlation_id/exchange',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "link_correlation_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/link/oauth/correlation_id/exchange")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/link/oauth/correlation_id/exchange',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', link_correlation_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/link/oauth/correlation_id/exchange',
headers: {'content-type': 'application/json'},
body: {client_id: '', link_correlation_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/link/oauth/correlation_id/exchange');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
link_correlation_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/link/oauth/correlation_id/exchange',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_correlation_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/link/oauth/correlation_id/exchange';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_correlation_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"link_correlation_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/link/oauth/correlation_id/exchange"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/link/oauth/correlation_id/exchange" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/link/oauth/correlation_id/exchange",
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([
'client_id' => '',
'link_correlation_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/link/oauth/correlation_id/exchange', [
'body' => '{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/link/oauth/correlation_id/exchange');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'link_correlation_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'link_correlation_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/link/oauth/correlation_id/exchange');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/link/oauth/correlation_id/exchange' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/link/oauth/correlation_id/exchange' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/link/oauth/correlation_id/exchange", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/link/oauth/correlation_id/exchange"
payload = {
"client_id": "",
"link_correlation_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/link/oauth/correlation_id/exchange"
payload <- "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/link/oauth/correlation_id/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/link/oauth/correlation_id/exchange') do |req|
req.body = "{\n \"client_id\": \"\",\n \"link_correlation_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/link/oauth/correlation_id/exchange";
let payload = json!({
"client_id": "",
"link_correlation_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/link/oauth/correlation_id/exchange \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"link_correlation_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/link/oauth/correlation_id/exchange \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "link_correlation_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/link/oauth/correlation_id/exchange
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"link_correlation_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/link/oauth/correlation_id/exchange")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"link_token": "link-sandbox-33792986-2b9c-4b80-b1f2-518caaac6183",
"request_id": "u0ydFs493XjyTYn"
}
POST
Execute a single payment using consent
{{baseUrl}}/payment_initiation/consent/payment/execute
BODY json
{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/consent/payment/execute");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/consent/payment/execute" {:content-type :json
:form-params {:amount {:currency ""
:value ""}
:client_id ""
:consent_id ""
:idempotency_key ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/consent/payment/execute"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/consent/payment/execute"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/consent/payment/execute");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/consent/payment/execute"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/consent/payment/execute HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 137
{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/consent/payment/execute")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/consent/payment/execute"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/payment/execute")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/consent/payment/execute")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: ''
},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/consent/payment/execute');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/payment/execute',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: ''},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/consent/payment/execute';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":""},"client_id":"","consent_id":"","idempotency_key":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/consent/payment/execute',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": ""\n },\n "client_id": "",\n "consent_id": "",\n "idempotency_key": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/payment/execute")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/consent/payment/execute',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: ''},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/payment/execute',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: ''},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/consent/payment/execute');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: ''
},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/payment/execute',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: ''},
client_id: '',
consent_id: '',
idempotency_key: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/consent/payment/execute';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":""},"client_id":"","consent_id":"","idempotency_key":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @"" },
@"client_id": @"",
@"consent_id": @"",
@"idempotency_key": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/consent/payment/execute"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/consent/payment/execute" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/consent/payment/execute",
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([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'consent_id' => '',
'idempotency_key' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/consent/payment/execute', [
'body' => '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/consent/payment/execute');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'consent_id' => '',
'idempotency_key' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => ''
],
'client_id' => '',
'consent_id' => '',
'idempotency_key' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/consent/payment/execute');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/consent/payment/execute' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/consent/payment/execute' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/consent/payment/execute", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/consent/payment/execute"
payload = {
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/consent/payment/execute"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/consent/payment/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/consent/payment/execute') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"idempotency_key\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/consent/payment/execute";
let payload = json!({
"amount": json!({
"currency": "",
"value": ""
}),
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/consent/payment/execute \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}'
echo '{
"amount": {
"currency": "",
"value": ""
},
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/consent/payment/execute \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": ""\n },\n "client_id": "",\n "consent_id": "",\n "idempotency_key": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/consent/payment/execute
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": ""
],
"client_id": "",
"consent_id": "",
"idempotency_key": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/consent/payment/execute")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"payment_id": "payment-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"request_id": "4ciYccesdqSiUAB",
"status": "PAYMENT_STATUS_INITIATED"
}
POST
Execute a transaction using an e-wallet
{{baseUrl}}/wallet/transaction/execute
BODY json
{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/transaction/execute");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/transaction/execute" {:content-type :json
:form-params {:amount {:iso_currency_code ""
:value ""}
:client_id ""
:counterparty {:name ""
:numbers {:bacs ""
:international {:iban ""}}}
:idempotency_key ""
:reference ""
:secret ""
:wallet_id ""}})
require "http/client"
url = "{{baseUrl}}/wallet/transaction/execute"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/transaction/execute"),
Content = new StringContent("{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/transaction/execute");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/transaction/execute"
payload := strings.NewReader("{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/transaction/execute HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 298
{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/transaction/execute")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/transaction/execute"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/transaction/execute")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/transaction/execute")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: {
iso_currency_code: '',
value: ''
},
client_id: '',
counterparty: {
name: '',
numbers: {
bacs: '',
international: {
iban: ''
}
}
},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/transaction/execute');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/execute',
headers: {'content-type': 'application/json'},
data: {
amount: {iso_currency_code: '', value: ''},
client_id: '',
counterparty: {name: '', numbers: {bacs: '', international: {iban: ''}}},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/transaction/execute';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"iso_currency_code":"","value":""},"client_id":"","counterparty":{"name":"","numbers":{"bacs":"","international":{"iban":""}}},"idempotency_key":"","reference":"","secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/transaction/execute',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "iso_currency_code": "",\n "value": ""\n },\n "client_id": "",\n "counterparty": {\n "name": "",\n "numbers": {\n "bacs": "",\n "international": {\n "iban": ""\n }\n }\n },\n "idempotency_key": "",\n "reference": "",\n "secret": "",\n "wallet_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/transaction/execute")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/transaction/execute',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {iso_currency_code: '', value: ''},
client_id: '',
counterparty: {name: '', numbers: {bacs: '', international: {iban: ''}}},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/execute',
headers: {'content-type': 'application/json'},
body: {
amount: {iso_currency_code: '', value: ''},
client_id: '',
counterparty: {name: '', numbers: {bacs: '', international: {iban: ''}}},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/transaction/execute');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
iso_currency_code: '',
value: ''
},
client_id: '',
counterparty: {
name: '',
numbers: {
bacs: '',
international: {
iban: ''
}
}
},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/execute',
headers: {'content-type': 'application/json'},
data: {
amount: {iso_currency_code: '', value: ''},
client_id: '',
counterparty: {name: '', numbers: {bacs: '', international: {iban: ''}}},
idempotency_key: '',
reference: '',
secret: '',
wallet_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/transaction/execute';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"iso_currency_code":"","value":""},"client_id":"","counterparty":{"name":"","numbers":{"bacs":"","international":{"iban":""}}},"idempotency_key":"","reference":"","secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"iso_currency_code": @"", @"value": @"" },
@"client_id": @"",
@"counterparty": @{ @"name": @"", @"numbers": @{ @"bacs": @"", @"international": @{ @"iban": @"" } } },
@"idempotency_key": @"",
@"reference": @"",
@"secret": @"",
@"wallet_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/transaction/execute"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/transaction/execute" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/transaction/execute",
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([
'amount' => [
'iso_currency_code' => '',
'value' => ''
],
'client_id' => '',
'counterparty' => [
'name' => '',
'numbers' => [
'bacs' => '',
'international' => [
'iban' => ''
]
]
],
'idempotency_key' => '',
'reference' => '',
'secret' => '',
'wallet_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/transaction/execute', [
'body' => '{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/transaction/execute');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'iso_currency_code' => '',
'value' => ''
],
'client_id' => '',
'counterparty' => [
'name' => '',
'numbers' => [
'bacs' => '',
'international' => [
'iban' => ''
]
]
],
'idempotency_key' => '',
'reference' => '',
'secret' => '',
'wallet_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'iso_currency_code' => '',
'value' => ''
],
'client_id' => '',
'counterparty' => [
'name' => '',
'numbers' => [
'bacs' => '',
'international' => [
'iban' => ''
]
]
],
'idempotency_key' => '',
'reference' => '',
'secret' => '',
'wallet_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/transaction/execute');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/transaction/execute' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/transaction/execute' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/transaction/execute", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/transaction/execute"
payload = {
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": { "iban": "" }
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/transaction/execute"
payload <- "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/transaction/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/transaction/execute') do |req|
req.body = "{\n \"amount\": {\n \"iso_currency_code\": \"\",\n \"value\": \"\"\n },\n \"client_id\": \"\",\n \"counterparty\": {\n \"name\": \"\",\n \"numbers\": {\n \"bacs\": \"\",\n \"international\": {\n \"iban\": \"\"\n }\n }\n },\n \"idempotency_key\": \"\",\n \"reference\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/transaction/execute";
let payload = json!({
"amount": json!({
"iso_currency_code": "",
"value": ""
}),
"client_id": "",
"counterparty": json!({
"name": "",
"numbers": json!({
"bacs": "",
"international": json!({"iban": ""})
})
}),
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/transaction/execute \
--header 'content-type: application/json' \
--data '{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}'
echo '{
"amount": {
"iso_currency_code": "",
"value": ""
},
"client_id": "",
"counterparty": {
"name": "",
"numbers": {
"bacs": "",
"international": {
"iban": ""
}
}
},
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
}' | \
http POST {{baseUrl}}/wallet/transaction/execute \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "iso_currency_code": "",\n "value": ""\n },\n "client_id": "",\n "counterparty": {\n "name": "",\n "numbers": {\n "bacs": "",\n "international": {\n "iban": ""\n }\n }\n },\n "idempotency_key": "",\n "reference": "",\n "secret": "",\n "wallet_id": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/transaction/execute
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"iso_currency_code": "",
"value": ""
],
"client_id": "",
"counterparty": [
"name": "",
"numbers": [
"bacs": "",
"international": ["iban": ""]
]
],
"idempotency_key": "",
"reference": "",
"secret": "",
"wallet_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/transaction/execute")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM",
"status": "EXECUTED",
"transaction_id": "wallet-transaction-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
POST
Fetch a list of e-wallets
{{baseUrl}}/wallet/list
BODY json
{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/list" {:content-type :json
:form-params {:client_id ""
:count 0
:cursor ""
:iso_currency_code ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/wallet/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 94
{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
cursor: '',
iso_currency_code: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, cursor: '', iso_currency_code: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"cursor":"","iso_currency_code":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "cursor": "",\n "iso_currency_code": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', count: 0, cursor: '', iso_currency_code: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', count: 0, cursor: '', iso_currency_code: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
cursor: '',
iso_currency_code: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, cursor: '', iso_currency_code: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"cursor":"","iso_currency_code":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"cursor": @"",
@"iso_currency_code": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/list",
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([
'client_id' => '',
'count' => 0,
'cursor' => '',
'iso_currency_code' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/list', [
'body' => '{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'cursor' => '',
'iso_currency_code' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'cursor' => '',
'iso_currency_code' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/list"
payload = {
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"iso_currency_code\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/list";
let payload = json!({
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}'
echo '{
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
}' | \
http POST {{baseUrl}}/wallet/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "cursor": "",\n "iso_currency_code": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"cursor": "",
"iso_currency_code": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM",
"wallets": [
{
"balance": {
"current": 123.12,
"iso_currency_code": "GBP"
},
"numbers": {
"bacs": {
"account": "12345678",
"sort_code": "123456"
}
},
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f6",
"status": "ACTIVE",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
},
{
"balance": {
"current": 456.78,
"iso_currency_code": "EUR"
},
"numbers": {
"international": {
"bic": "HBUKGB4B",
"iban": "GB22HBUK40221241555626"
}
},
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f7",
"status": "ACTIVE",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a999"
}
]
}
POST
Fetch an e-wallet transaction
{{baseUrl}}/wallet/transaction/get
BODY json
{
"client_id": "",
"secret": "",
"transaction_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/transaction/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/transaction/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:transaction_id ""}})
require "http/client"
url = "{{baseUrl}}/wallet/transaction/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/transaction/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/transaction/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/transaction/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/transaction/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 61
{
"client_id": "",
"secret": "",
"transaction_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/transaction/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/transaction/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/transaction/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/transaction/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
transaction_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/transaction/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transaction_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/transaction/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transaction_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/transaction/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "transaction_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/transaction/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/transaction/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', transaction_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', transaction_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/transaction/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
transaction_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transaction_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/transaction/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transaction_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"transaction_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/transaction/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/transaction/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/transaction/get",
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([
'client_id' => '',
'secret' => '',
'transaction_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/transaction/get', [
'body' => '{
"client_id": "",
"secret": "",
"transaction_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/transaction/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'transaction_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'transaction_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/transaction/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/transaction/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transaction_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/transaction/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transaction_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/transaction/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/transaction/get"
payload = {
"client_id": "",
"secret": "",
"transaction_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/transaction/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/transaction/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/transaction/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transaction_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/transaction/get";
let payload = json!({
"client_id": "",
"secret": "",
"transaction_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/transaction/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"transaction_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"transaction_id": ""
}' | \
http POST {{baseUrl}}/wallet/transaction/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "transaction_id": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/transaction/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"transaction_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/transaction/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"iso_currency_code": "GBP",
"value": 123.12
},
"counterparty": {
"name": "John Smith",
"numbers": {
"bacs": {
"account": "31926819",
"sort_code": "601613"
}
}
},
"created_at": "2020-12-02T21:14:54Z",
"last_status_update": "2020-12-02T21:15:01Z",
"reference": "Payout 99744",
"request_id": "4zlKapIkTm8p5KM",
"status": "EXECUTED",
"transaction_id": "wallet-transaction-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"type": "PAYOUT",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"iso_currency_code": "EUR",
"value": 456.78
},
"counterparty": {
"name": "John Smith",
"numbers": {
"international": {
"iban": "GB33BUKB20201555555555"
}
}
},
"created_at": "2020-12-02T21:14:54Z",
"last_status_update": "2020-12-02T21:15:01Z",
"reference": "Payout 99744",
"request_id": "4zlKapIkTm8p5KM",
"status": "EXECUTED",
"transaction_id": "wallet-transaction-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"type": "PAYOUT",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
POST
Fetch an e-wallet
{{baseUrl}}/wallet/get
BODY json
{
"client_id": "",
"secret": "",
"wallet_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:wallet_id ""}})
require "http/client"
url = "{{baseUrl}}/wallet/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"client_id": "",
"secret": "",
"wallet_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
wallet_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', wallet_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "wallet_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', wallet_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', wallet_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
wallet_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', wallet_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"wallet_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/get",
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([
'client_id' => '',
'secret' => '',
'wallet_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/get', [
'body' => '{
"client_id": "",
"secret": "",
"wallet_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'wallet_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'wallet_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"wallet_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"wallet_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/get"
payload = {
"client_id": "",
"secret": "",
"wallet_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/get";
let payload = json!({
"client_id": "",
"secret": "",
"wallet_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"wallet_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"wallet_id": ""
}' | \
http POST {{baseUrl}}/wallet/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "wallet_id": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"wallet_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balance": {
"current": 123.12,
"iso_currency_code": "GBP"
},
"numbers": {
"bacs": {
"account": "12345678",
"sort_code": "123456"
},
"international": {
"bic": "BUKBGB22",
"iban": "GB33BUKB20201555555555"
}
},
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f6",
"request_id": "4zlKapIkTm8p5KM",
"status": "ACTIVE",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balance": {
"current": 123.12,
"iso_currency_code": "EUR"
},
"numbers": {
"international": {
"bic": "ABNANL2A",
"iban": "NL91ABNA0417164300"
}
},
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f6",
"request_id": "4zlKapIkTm8p5KM",
"status": "ACTIVE",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
POST
Fetch recurring transaction streams
{{baseUrl}}/transactions/recurring/get
BODY json
{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactions/recurring/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactions/recurring/get" {:content-type :json
:form-params {:access_token ""
:account_ids []
:client_id ""
:options {:include_personal_finance_category false}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transactions/recurring/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transactions/recurring/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactions/recurring/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactions/recurring/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transactions/recurring/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 147
{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactions/recurring/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactions/recurring/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactions/recurring/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactions/recurring/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_ids: [],
client_id: '',
options: {
include_personal_finance_category: false
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transactions/recurring/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/recurring/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_ids: [],
client_id: '',
options: {include_personal_finance_category: false},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactions/recurring/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_ids":[],"client_id":"","options":{"include_personal_finance_category":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transactions/recurring/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_ids": [],\n "client_id": "",\n "options": {\n "include_personal_finance_category": false\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactions/recurring/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactions/recurring/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_ids: [],
client_id: '',
options: {include_personal_finance_category: false},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/recurring/get',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_ids: [],
client_id: '',
options: {include_personal_finance_category: false},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transactions/recurring/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_ids: [],
client_id: '',
options: {
include_personal_finance_category: false
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/recurring/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_ids: [],
client_id: '',
options: {include_personal_finance_category: false},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactions/recurring/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_ids":[],"client_id":"","options":{"include_personal_finance_category":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_ids": @[ ],
@"client_id": @"",
@"options": @{ @"include_personal_finance_category": @NO },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactions/recurring/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transactions/recurring/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactions/recurring/get",
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([
'access_token' => '',
'account_ids' => [
],
'client_id' => '',
'options' => [
'include_personal_finance_category' => null
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transactions/recurring/get', [
'body' => '{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactions/recurring/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_ids' => [
],
'client_id' => '',
'options' => [
'include_personal_finance_category' => null
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_ids' => [
],
'client_id' => '',
'options' => [
'include_personal_finance_category' => null
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactions/recurring/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactions/recurring/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactions/recurring/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactions/recurring/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactions/recurring/get"
payload = {
"access_token": "",
"account_ids": [],
"client_id": "",
"options": { "include_personal_finance_category": False },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactions/recurring/get"
payload <- "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactions/recurring/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transactions/recurring/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_ids\": [],\n \"client_id\": \"\",\n \"options\": {\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactions/recurring/get";
let payload = json!({
"access_token": "",
"account_ids": (),
"client_id": "",
"options": json!({"include_personal_finance_category": false}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transactions/recurring/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}'
echo '{
"access_token": "",
"account_ids": [],
"client_id": "",
"options": {
"include_personal_finance_category": false
},
"secret": ""
}' | \
http POST {{baseUrl}}/transactions/recurring/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_ids": [],\n "client_id": "",\n "options": {\n "include_personal_finance_category": false\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transactions/recurring/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_ids": [],
"client_id": "",
"options": ["include_personal_finance_category": false],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactions/recurring/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"inflow_streams": [
{
"account_id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNoSrzqDje",
"average_amount": {
"amount": -800,
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
"category": [
"Transfer",
"Payroll"
],
"category_id": "21009000",
"description": "Platypus Payroll",
"first_date": "2022-02-28",
"frequency": "SEMI_MONTHLY",
"is_active": true,
"last_amount": {
"amount": -1000,
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
"last_date": "2022-04-30",
"merchant_name": null,
"personal_finance_category": {
"detailed": "INCOME_WAGES",
"primary": "INCOME"
},
"status": "MATURE",
"stream_id": "no86Eox18VHMvaOVL7gPUM9ap3aR1LsAVZ5nc",
"transaction_ids": [
"nkeaNrDGrhdo6c4qZWDA8ekuIPuJ4Avg5nKfw",
"EfC5ekksdy30KuNzad2tQupW8WIPwvjXGbGHL",
"ozfvj3FFgp6frbXKJGitsDzck5eWQH7zOJBYd",
"QvdDE8AqVWo3bkBZ7WvCd7LskxVix8Q74iMoK",
"uQozFPfMzibBouS9h9tz4CsyvFll17jKLdPAF"
]
}
],
"outflow_streams": [
{
"account_id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNoSrzqDff",
"average_amount": {
"amount": 85,
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
"category": [
"Service",
"Utilities",
"Electric"
],
"category_id": "18068005",
"description": "ConEd Bill Payment",
"first_date": "2022-02-04",
"frequency": "MONTHLY",
"is_active": true,
"last_amount": {
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
"last_date": "2022-05-02",
"merchant_name": "ConEd",
"personal_finance_category": {
"detailed": "RENT_AND_UTILITIES_GAS_AND_ELECTRICITY",
"primary": "RENT_AND_UTILITIES"
},
"status": "MATURE",
"stream_id": "no86Eox18VHMvaOVL7gPUM9ap3aR1LsAVZ5nd",
"transaction_ids": [
"yhnUVvtcGGcCKU0bcz8PDQr5ZUxUXebUvbKC0",
"HPDnUVgI5Pa0YQSl0rxwYRwVXeLyJXTWDAvpR",
"jEPoSfF8xzMClE9Ohj1he91QnvYoSdwg7IT8L",
"CmdQTNgems8BT1B7ibkoUXVPyAeehT3Tmzk0l"
]
}
],
"request_id": "tbFyCEqkU775ZGG",
"updated_datetime": "2022-05-01T00:00:00Z"
}
POST
Filter Asset Report
{{baseUrl}}/asset_report/filter
BODY json
{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/filter");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/filter" {:content-type :json
:form-params {:account_ids_to_exclude []
:asset_report_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/filter"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/filter"),
Content = new StringContent("{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/filter");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/filter"
payload := strings.NewReader("{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/filter HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 97
{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/filter")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/filter"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/filter")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/filter")
.header("content-type", "application/json")
.body("{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
account_ids_to_exclude: [],
asset_report_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/filter');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/filter',
headers: {'content-type': 'application/json'},
data: {account_ids_to_exclude: [], asset_report_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/filter';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_ids_to_exclude":[],"asset_report_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/filter',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_ids_to_exclude": [],\n "asset_report_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/filter")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/filter',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({account_ids_to_exclude: [], asset_report_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/filter',
headers: {'content-type': 'application/json'},
body: {account_ids_to_exclude: [], asset_report_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/filter');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_ids_to_exclude: [],
asset_report_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/filter',
headers: {'content-type': 'application/json'},
data: {account_ids_to_exclude: [], asset_report_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/filter';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_ids_to_exclude":[],"asset_report_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_ids_to_exclude": @[ ],
@"asset_report_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/filter"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/filter" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/filter",
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([
'account_ids_to_exclude' => [
],
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/filter', [
'body' => '{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/filter');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_ids_to_exclude' => [
],
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_ids_to_exclude' => [
],
'asset_report_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/filter');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/filter' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/filter' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/filter", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/filter"
payload = {
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/filter"
payload <- "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/filter")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/filter') do |req|
req.body = "{\n \"account_ids_to_exclude\": [],\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/filter";
let payload = json!({
"account_ids_to_exclude": (),
"asset_report_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/filter \
--header 'content-type: application/json' \
--data '{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/filter \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_ids_to_exclude": [],\n "asset_report_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/filter
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_ids_to_exclude": [],
"asset_report_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/filter")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"asset_report_id": "fdc09207-0cef-4d88-b5eb-0d970758ebd9",
"asset_report_token": "assets-sandbox-bc410c6a-4653-4c75-985c-e757c3497c5c",
"request_id": "qEg07"
}
POST
Fire a test webhook
{{baseUrl}}/sandbox/item/fire_webhook
BODY json
{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/item/fire_webhook");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/item/fire_webhook" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""
:webhook_code ""
:webhook_type ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/item/fire_webhook"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/item/fire_webhook"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/item/fire_webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/item/fire_webhook"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/item/fire_webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 103
{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/item/fire_webhook")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/item/fire_webhook"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/item/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/item/fire_webhook")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/item/fire_webhook');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/fire_webhook',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/item/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":"","webhook_code":"","webhook_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/item/fire_webhook',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": "",\n "webhook_code": "",\n "webhook_type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/item/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/item/fire_webhook',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/fire_webhook',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/item/fire_webhook');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/fire_webhook',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
secret: '',
webhook_code: '',
webhook_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/item/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":"","webhook_code":"","webhook_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"",
@"webhook_code": @"",
@"webhook_type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/item/fire_webhook"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/item/fire_webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/item/fire_webhook",
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([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook_code' => '',
'webhook_type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/item/fire_webhook', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/item/fire_webhook');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook_code' => '',
'webhook_type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook_code' => '',
'webhook_type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/item/fire_webhook');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/item/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/item/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/item/fire_webhook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/item/fire_webhook"
payload = {
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/item/fire_webhook"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/item/fire_webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/item/fire_webhook') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook_code\": \"\",\n \"webhook_type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/item/fire_webhook";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/item/fire_webhook \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
}' | \
http POST {{baseUrl}}/sandbox/item/fire_webhook \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": "",\n "webhook_code": "",\n "webhook_type": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/item/fire_webhook
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": "",
"webhook_code": "",
"webhook_type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/item/fire_webhook")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "1vwmF5TBQwiqfwP",
"webhook_fired": true
}
POST
Force a Sandbox Item into an error state
{{baseUrl}}/sandbox/item/reset_login
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/item/reset_login");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/item/reset_login" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/item/reset_login"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/item/reset_login"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/item/reset_login");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/item/reset_login"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/item/reset_login HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/item/reset_login")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/item/reset_login"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/item/reset_login")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/item/reset_login")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/item/reset_login');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/reset_login',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/item/reset_login';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/item/reset_login',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/item/reset_login")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/item/reset_login',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/reset_login',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/item/reset_login');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/reset_login',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/item/reset_login';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/item/reset_login"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/item/reset_login" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/item/reset_login",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/item/reset_login', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/item/reset_login');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/item/reset_login');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/item/reset_login' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/item/reset_login' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/item/reset_login", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/item/reset_login"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/item/reset_login"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/item/reset_login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/item/reset_login') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/item/reset_login";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/item/reset_login \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/item/reset_login \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/item/reset_login
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/item/reset_login")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "m8MDnv9okwxFNBV",
"reset_login": true
}
POST
Generate a Plaid-hosted onboarding UI URL.
{{baseUrl}}/transfer/questionnaire/create
BODY json
{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/questionnaire/create");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/questionnaire/create" {:content-type :json
:form-params {:client_id ""
:originator_client_id ""
:redirect_uri ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/questionnaire/create"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/questionnaire/create"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/questionnaire/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/questionnaire/create"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/questionnaire/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 89
{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/questionnaire/create")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/questionnaire/create"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/questionnaire/create")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/questionnaire/create")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
originator_client_id: '',
redirect_uri: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/questionnaire/create');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/questionnaire/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', originator_client_id: '', redirect_uri: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/questionnaire/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","originator_client_id":"","redirect_uri":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/questionnaire/create',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "originator_client_id": "",\n "redirect_uri": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/questionnaire/create")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/questionnaire/create',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', originator_client_id: '', redirect_uri: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/questionnaire/create',
headers: {'content-type': 'application/json'},
body: {client_id: '', originator_client_id: '', redirect_uri: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/questionnaire/create');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
originator_client_id: '',
redirect_uri: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/questionnaire/create',
headers: {'content-type': 'application/json'},
data: {client_id: '', originator_client_id: '', redirect_uri: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/questionnaire/create';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","originator_client_id":"","redirect_uri":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"originator_client_id": @"",
@"redirect_uri": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/questionnaire/create"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/questionnaire/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/questionnaire/create",
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([
'client_id' => '',
'originator_client_id' => '',
'redirect_uri' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/questionnaire/create', [
'body' => '{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/questionnaire/create');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'originator_client_id' => '',
'redirect_uri' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'originator_client_id' => '',
'redirect_uri' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/questionnaire/create');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/questionnaire/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/questionnaire/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/questionnaire/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/questionnaire/create"
payload = {
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/questionnaire/create"
payload <- "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/questionnaire/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/questionnaire/create') do |req|
req.body = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"redirect_uri\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/questionnaire/create";
let payload = json!({
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/questionnaire/create \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}'
echo '{
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/questionnaire/create \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "originator_client_id": "",\n "redirect_uri": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/questionnaire/create
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"originator_client_id": "",
"redirect_uri": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/questionnaire/create")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"onboarding_url": "https://plaid.com/originator/hIFGXx1zM5pFerygu7lw",
"request_id": "saKrIBuEB9qJZno"
}
POST
Get Categories
{{baseUrl}}/categories/get
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/categories/get");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/categories/get")
require "http/client"
url = "{{baseUrl}}/categories/get"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/categories/get"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/categories/get");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/categories/get"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/categories/get HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/categories/get")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/categories/get"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/categories/get")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/categories/get")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/categories/get');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/categories/get'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/categories/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/categories/get',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/categories/get")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/categories/get',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/categories/get'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/categories/get');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/categories/get'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/categories/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/categories/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/categories/get" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/categories/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/categories/get');
echo $response->getBody();
setUrl('{{baseUrl}}/categories/get');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/categories/get');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/categories/get' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/categories/get' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/categories/get")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/categories/get"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/categories/get"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/categories/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/categories/get') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/categories/get";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/categories/get
http POST {{baseUrl}}/categories/get
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/categories/get
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/categories/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Get Investment holdings
{{baseUrl}}/investments/holdings/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/investments/holdings/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/investments/holdings/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/investments/holdings/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/investments/holdings/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/investments/holdings/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/investments/holdings/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/investments/holdings/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/investments/holdings/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/investments/holdings/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/investments/holdings/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/investments/holdings/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/investments/holdings/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/holdings/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/investments/holdings/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/investments/holdings/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/investments/holdings/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/investments/holdings/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', options: {account_ids: []}, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/holdings/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/investments/holdings/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/holdings/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/investments/holdings/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/investments/holdings/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/investments/holdings/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/investments/holdings/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/investments/holdings/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/investments/holdings/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/investments/holdings/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/investments/holdings/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/investments/holdings/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/investments/holdings/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/investments/holdings/get"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/investments/holdings/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/investments/holdings/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/investments/holdings/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/investments/holdings/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/investments/holdings/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/investments/holdings/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/investments/holdings/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/investments/holdings/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "5Bvpj4QknlhVWk7GygpwfVKdd133GoCxB814g",
"balances": {
"available": 43200,
"current": 43200,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "4444",
"name": "Plaid Money Market",
"official_name": "Plaid Platinum Standard 1.85% Interest Money Market",
"subtype": "money market",
"type": "depository"
},
{
"account_id": "JqMLm4rJwpF6gMPJwBqdh9ZjjPvvpDcb7kDK1",
"balances": {
"available": null,
"current": 320.76,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "5555",
"name": "Plaid IRA",
"official_name": null,
"subtype": "ira",
"type": "investment"
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"balances": {
"available": null,
"current": 23631.9805,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "6666",
"name": "Plaid 401k",
"official_name": null,
"subtype": "401k",
"type": "investment"
},
{
"account_id": "ax0xgOBYRAIqOOjeLZr0iZBb8r6K88HZXpvmq",
"balances": {
"available": 48200.03,
"current": 48200.03,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "4092",
"name": "Plaid Crypto Exchange Account",
"official_name": null,
"subtype": "crypto exchange",
"type": "investment"
}
],
"holdings": [
{
"account_id": "JqMLm4rJwpF6gMPJwBqdh9ZjjPvvpDcb7kDK1",
"cost_basis": 1,
"institution_price": 1,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 0.01,
"iso_currency_code": "USD",
"quantity": 0.01,
"security_id": "d6ePmbPxgWCWmMVv66q9iPV94n91vMtov5Are",
"unofficial_currency_code": null
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"cost_basis": 1.5,
"institution_price": 2.11,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 2.11,
"iso_currency_code": "USD",
"quantity": 1,
"security_id": "KDwjlXj1Rqt58dVvmzRguxJybmyQL8FgeWWAy",
"unofficial_currency_code": null
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"cost_basis": 10,
"institution_price": 10.42,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 20.84,
"iso_currency_code": "USD",
"quantity": 2,
"security_id": "NDVQrXQoqzt5v3bAe8qRt4A7mK7wvZCLEBBJk",
"unofficial_currency_code": null
},
{
"account_id": "JqMLm4rJwpF6gMPJwBqdh9ZjjPvvpDcb7kDK1",
"cost_basis": 0.01,
"institution_price": 0.011,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 110,
"iso_currency_code": "USD",
"quantity": 10000,
"security_id": "8E4L9XLl6MudjEpwPAAgivmdZRdBPJuvMPlPb",
"unofficial_currency_code": null
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"cost_basis": 23,
"institution_price": 27,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 636.309,
"iso_currency_code": "USD",
"quantity": 23.567,
"security_id": "JDdP7XPMklt5vwPmDN45t3KAoWAPmjtpaW7DP",
"unofficial_currency_code": null
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"cost_basis": 15,
"institution_price": 13.73,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 1373.6865,
"iso_currency_code": "USD",
"quantity": 100.05,
"security_id": "nnmo8doZ4lfKNEDe3mPJipLGkaGw3jfPrpxoN",
"unofficial_currency_code": null
},
{
"account_id": "k67E4xKvMlhmleEa4pg9hlwGGNnnEeixPolGm",
"cost_basis": 1,
"institution_price": 1,
"institution_price_as_of": "2021-04-13",
"institution_price_datetime": null,
"institution_value": 12345.67,
"iso_currency_code": "USD",
"quantity": 12345.67,
"security_id": "d6ePmbPxgWCWmMVv66q9iPV94n91vMtov5Are",
"unofficial_currency_code": null
},
{
"account_id": "ax0xgOBYRAIqOOjeLZr0iZBb8r6K88HZXpvmq",
"cost_basis": 92.47,
"institution_price": 0.177494362,
"institution_price_as_of": "2022-01-14",
"institution_price_datetime": "2022-06-07T23:01:00Z",
"institution_value": 4437.35905,
"iso_currency_code": "USD",
"quantity": 25000,
"security_id": "vLRMV3MvY1FYNP91on35CJD5QN5rw9Fpa9qOL",
"unofficial_currency_code": null
}
],
"item": {
"available_products": [
"balance",
"identity",
"liabilities",
"transactions"
],
"billed_products": [
"assets",
"auth",
"investments"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "4z9LPae1nRHWy8pvg9jrsgbRP4ZNQvIdbLq7g",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "l68wb8zpS0hqmsJ",
"securities": [
{
"close_price": 0.011,
"close_price_as_of": "2021-04-13",
"cusip": null,
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": null,
"iso_currency_code": "USD",
"name": "Nflx Feb 01'18 $355 Call",
"proxy_security_id": null,
"security_id": "8E4L9XLl6MudjEpwPAAgivmdZRdBPJuvMPlPb",
"sedol": null,
"ticker_symbol": "NFLX180201C00355000",
"type": "derivative",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 27,
"close_price_as_of": null,
"cusip": "577130834",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US5771308344",
"iso_currency_code": "USD",
"name": "Matthews Pacific Tiger Fund Insti Class",
"proxy_security_id": null,
"security_id": "JDdP7XPMklt5vwPmDN45t3KAoWAPmjtpaW7DP",
"sedol": null,
"ticker_symbol": "MIPTX",
"type": "mutual fund",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 2.11,
"close_price_as_of": null,
"cusip": "00448Q201",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US00448Q2012",
"iso_currency_code": "USD",
"name": "Achillion Pharmaceuticals Inc.",
"proxy_security_id": null,
"security_id": "KDwjlXj1Rqt58dVvmzRguxJybmyQL8FgeWWAy",
"sedol": null,
"ticker_symbol": "ACHN",
"type": "equity",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 10.42,
"close_price_as_of": null,
"cusip": "258620103",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US2586201038",
"iso_currency_code": "USD",
"name": "DoubleLine Total Return Bond Fund",
"proxy_security_id": null,
"security_id": "NDVQrXQoqzt5v3bAe8qRt4A7mK7wvZCLEBBJk",
"sedol": null,
"ticker_symbol": "DBLTX",
"type": "mutual fund",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 1,
"close_price_as_of": null,
"cusip": null,
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": true,
"isin": null,
"iso_currency_code": "USD",
"name": "U S Dollar",
"proxy_security_id": null,
"security_id": "d6ePmbPxgWCWmMVv66q9iPV94n91vMtov5Are",
"sedol": null,
"ticker_symbol": "USD",
"type": "cash",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 13.73,
"close_price_as_of": null,
"cusip": null,
"institution_id": "ins_3",
"institution_security_id": "NHX105509",
"is_cash_equivalent": false,
"isin": null,
"iso_currency_code": "USD",
"name": "NH PORTFOLIO 1055 (FIDELITY INDEX)",
"proxy_security_id": null,
"security_id": "nnmo8doZ4lfKNEDe3mPJipLGkaGw3jfPrpxoN",
"sedol": null,
"ticker_symbol": "NHX105509",
"type": "etf",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 0.140034616,
"close_price_as_of": "2022-01-24",
"cusip": null,
"institution_id": "ins_3",
"institution_security_id": null,
"is_cash_equivalent": true,
"isin": null,
"iso_currency_code": "USD",
"name": "Dogecoin",
"proxy_security_id": null,
"security_id": "vLRMV3MvY1FYNP91on35CJD5QN5rw9Fpa9qOL",
"sedol": null,
"ticker_symbol": "DOGE",
"type": "cryptocurrency",
"unofficial_currency_code": null,
"update_datetime": "2022-06-07T23:01:00Z"
}
]
}
POST
Get Link Delivery session
{{baseUrl}}/link_delivery/get
BODY json
{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/link_delivery/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/link_delivery/get" {:content-type :json
:form-params {:client_id ""
:link_delivery_session_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/link_delivery/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/link_delivery/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/link_delivery/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/link_delivery/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/link_delivery/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 71
{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/link_delivery/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/link_delivery/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/link_delivery/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/link_delivery/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
link_delivery_session_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/link_delivery/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_delivery_session_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/link_delivery/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_delivery_session_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/link_delivery/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "link_delivery_session_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/link_delivery/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/link_delivery/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', link_delivery_session_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', link_delivery_session_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/link_delivery/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
link_delivery_session_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/link_delivery/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_delivery_session_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/link_delivery/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_delivery_session_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"link_delivery_session_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/link_delivery/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/link_delivery/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/link_delivery/get",
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([
'client_id' => '',
'link_delivery_session_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/link_delivery/get', [
'body' => '{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/link_delivery/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'link_delivery_session_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'link_delivery_session_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/link_delivery/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/link_delivery/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/link_delivery/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/link_delivery/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/link_delivery/get"
payload = {
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/link_delivery/get"
payload <- "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/link_delivery/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/link_delivery/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"link_delivery_session_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/link_delivery/get";
let payload = json!({
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/link_delivery/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/link_delivery/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "link_delivery_session_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/link_delivery/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"link_delivery_session_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/link_delivery/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"completed_at": "2019-10-12T07:21:50.52Z",
"created_at": "2019-10-12T07:20:50.52Z",
"public_tokens": [
"public-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d"
],
"request_id": "4ciYmmesdqSiUAB",
"status": "COMPLETED"
}
POST
Get Link Token
{{baseUrl}}/link/token/get
BODY json
{
"client_id": "",
"link_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/link/token/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/link/token/get" {:content-type :json
:form-params {:client_id ""
:link_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/link/token/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/link/token/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/link/token/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/link/token/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/link/token/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"link_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/link/token/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/link/token/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/link/token/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/link/token/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
link_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/link/token/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/link/token/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/link/token/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "link_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/link/token/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/link/token/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', link_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', link_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/link/token/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
link_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/link/token/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', link_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/link/token/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","link_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"link_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/link/token/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/link/token/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/link/token/get",
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([
'client_id' => '',
'link_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/link/token/get', [
'body' => '{
"client_id": "",
"link_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/link/token/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'link_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'link_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/link/token/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/link/token/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/link/token/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"link_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/link/token/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/link/token/get"
payload = {
"client_id": "",
"link_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/link/token/get"
payload <- "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/link/token/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/link/token/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"link_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/link/token/get";
let payload = json!({
"client_id": "",
"link_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/link/token/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"link_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"link_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/link/token/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "link_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/link/token/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"link_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/link/token/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created_at": "2020-12-02T21:14:54Z",
"expiration": "2020-12-03T01:14:54Z",
"link_token": "link-sandbox-33792986-2b9c-4b80-b1f2-518caaac6183",
"metadata": {
"account_filters": {
"depository": {
"account_subtypes": [
"checking",
"savings"
]
}
},
"client_name": "Insert Client name here",
"country_codes": [
"US"
],
"initial_products": [
"auth"
],
"language": "en",
"redirect_uri": null,
"webhook": "https://www.example.com/webhook"
},
"request_id": "u0ydFs493XjyTYn"
}
POST
Get RTP eligibility information of a transfer
{{baseUrl}}/transfer/capabilities/get
BODY json
{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/capabilities/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/capabilities/get" {:content-type :json
:form-params {:access_token ""
:account_id ""
:client_id ""
:payment_profile_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/capabilities/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/capabilities/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/capabilities/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/capabilities/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/capabilities/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110
{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/capabilities/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/capabilities/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/capabilities/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/capabilities/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/capabilities/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/capabilities/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/capabilities/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/capabilities/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/capabilities/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/capabilities/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/capabilities/get',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/capabilities/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/capabilities/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
client_id: '',
payment_profile_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/capabilities/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"client_id": @"",
@"payment_profile_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/capabilities/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/capabilities/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/capabilities/get",
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([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/capabilities/get', [
'body' => '{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/capabilities/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/capabilities/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/capabilities/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/capabilities/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/capabilities/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/capabilities/get"
payload = {
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/capabilities/get"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/capabilities/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/capabilities/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/capabilities/get";
let payload = json!({
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/capabilities/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
echo '{
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/capabilities/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/capabilities/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"client_id": "",
"payment_profile_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/capabilities/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"institution_supported_networks": {
"rtp": {
"credit": true
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Get a test clock
{{baseUrl}}/sandbox/transfer/test_clock/get
BODY json
{
"client_id": "",
"secret": "",
"test_clock_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/test_clock/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/test_clock/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:test_clock_id ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/test_clock/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/test_clock/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/test_clock/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/test_clock/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/test_clock/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 60
{
"client_id": "",
"secret": "",
"test_clock_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/test_clock/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/test_clock/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/test_clock/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
test_clock_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/test_clock/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', test_clock_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/test_clock/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","test_clock_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/test_clock/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "test_clock_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/test_clock/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', test_clock_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', test_clock_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/test_clock/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
test_clock_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', test_clock_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/test_clock/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","test_clock_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"test_clock_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/test_clock/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/test_clock/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/test_clock/get",
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([
'client_id' => '',
'secret' => '',
'test_clock_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/test_clock/get', [
'body' => '{
"client_id": "",
"secret": "",
"test_clock_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/test_clock/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'test_clock_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'test_clock_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/test_clock/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/test_clock/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"test_clock_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/test_clock/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"test_clock_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/test_clock/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/test_clock/get"
payload = {
"client_id": "",
"secret": "",
"test_clock_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/test_clock/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/test_clock/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/test_clock/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"test_clock_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/test_clock/get";
let payload = json!({
"client_id": "",
"secret": "",
"test_clock_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/test_clock/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"test_clock_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"test_clock_id": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/test_clock/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "test_clock_id": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/test_clock/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"test_clock_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/test_clock/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"test_clock": {
"test_clock_id": "b33a6eda-5e97-5d64-244a-a9274110151c",
"virtual_time": "2006-01-02T15:04:05Z"
}
}
POST
Get an entity screening
{{baseUrl}}/watchlist_screening/entity/get
BODY json
{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/get" {:content-type :json
:form-params {:client_id ""
:entity_watchlist_screening_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
entity_watchlist_screening_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', entity_watchlist_screening_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', entity_watchlist_screening_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
entity_watchlist_screening_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"entity_watchlist_screening_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/get",
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([
'client_id' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/get', [
'body' => '{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/get"
payload = {
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/get"
payload <- "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/get";
let payload = json!({
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"entity_watchlist_screening_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "entscr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"document_number": "C31195855",
"email_address": "user@example.com",
"entity_watchlist_program_id": "entprg_2eRPsDnL66rZ7H",
"legal_name": "Al-Qaida",
"phone_number": "+14025671234",
"url": "https://example.com",
"version": 1
},
"status": "cleared"
}
POST
Get balance of your Bank Transfer account
{{baseUrl}}/bank_transfer/balance/get
BODY json
{
"client_id": "",
"origination_account_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/balance/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/balance/get" {:content-type :json
:form-params {:client_id ""
:origination_account_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/balance/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/balance/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/balance/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/balance/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/balance/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 69
{
"client_id": "",
"origination_account_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/balance/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/balance/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/balance/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
origination_account_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/balance/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/balance/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', origination_account_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","origination_account_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/balance/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "origination_account_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/balance/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', origination_account_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/balance/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', origination_account_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/balance/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
origination_account_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/balance/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', origination_account_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","origination_account_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"origination_account_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/balance/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/balance/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/balance/get",
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([
'client_id' => '',
'origination_account_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/balance/get', [
'body' => '{
"client_id": "",
"origination_account_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/balance/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'origination_account_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'origination_account_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/balance/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"origination_account_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"origination_account_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/balance/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/balance/get"
payload = {
"client_id": "",
"origination_account_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/balance/get"
payload <- "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/balance/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/balance/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/balance/get";
let payload = json!({
"client_id": "",
"origination_account_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/balance/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"origination_account_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"origination_account_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/bank_transfer/balance/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "origination_account_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/balance/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"origination_account_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/balance/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balance": {
"available": "1721.70",
"transactable": "721.70"
},
"origination_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"request_id": "mdqfuVxeoza6mhu"
}
POST
Get details of all supported institutions
{{baseUrl}}/institutions/get
BODY json
{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/institutions/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/institutions/get" {:content-type :json
:form-params {:client_id ""
:count 0
:country_codes []
:offset 0
:options {:include_auth_metadata false
:include_optional_metadata false
:include_payment_initiation_metadata false
:oauth false
:products []
:routing_numbers []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/institutions/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/institutions/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/institutions/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/institutions/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/institutions/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 301
{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/institutions/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/institutions/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/institutions/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/institutions/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/institutions/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/institutions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"country_codes":[],"offset":0,"options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"oauth":false,"products":[],"routing_numbers":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/institutions/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "country_codes": [],\n "offset": 0,\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "oauth": false,\n "products": [],\n "routing_numbers": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/institutions/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/institutions/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/institutions/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
country_codes: [],
offset: 0,
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
products: [],
routing_numbers: []
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/institutions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"country_codes":[],"offset":0,"options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"oauth":false,"products":[],"routing_numbers":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"country_codes": @[ ],
@"offset": @0,
@"options": @{ @"include_auth_metadata": @NO, @"include_optional_metadata": @NO, @"include_payment_initiation_metadata": @NO, @"oauth": @NO, @"products": @[ ], @"routing_numbers": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/institutions/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/institutions/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/institutions/get",
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([
'client_id' => '',
'count' => 0,
'country_codes' => [
],
'offset' => 0,
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'products' => [
],
'routing_numbers' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/institutions/get', [
'body' => '{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/institutions/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'country_codes' => [
],
'offset' => 0,
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'products' => [
],
'routing_numbers' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'country_codes' => [
],
'offset' => 0,
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'products' => [
],
'routing_numbers' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/institutions/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/institutions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/institutions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/institutions/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/institutions/get"
payload = {
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": False,
"include_optional_metadata": False,
"include_payment_initiation_metadata": False,
"oauth": False,
"products": [],
"routing_numbers": []
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/institutions/get"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/institutions/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/institutions/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"country_codes\": [],\n \"offset\": 0,\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"products\": [],\n \"routing_numbers\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/institutions/get";
let payload = json!({
"client_id": "",
"count": 0,
"country_codes": (),
"offset": 0,
"options": json!({
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": (),
"routing_numbers": ()
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/institutions/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}'
echo '{
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/institutions/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "country_codes": [],\n "offset": 0,\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "oauth": false,\n "products": [],\n "routing_numbers": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/institutions/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"country_codes": [],
"offset": 0,
"options": [
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"products": [],
"routing_numbers": []
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/institutions/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"institutions": [
{
"country_codes": [
"US"
],
"institution_id": "ins_1",
"name": "Bank of America",
"oauth": false,
"products": [
"assets",
"auth",
"balance",
"transactions",
"identity",
"liabilities"
],
"routing_numbers": [
"011000138",
"011200365",
"011400495"
],
"status": {
"auth": {
"breakdown": {
"error_institution": 0.08,
"error_plaid": 0.01,
"success": 0.91
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"identity": {
"breakdown": {
"error_institution": 0.5,
"error_plaid": 0.08,
"success": 0.42
},
"last_status_change": "2019-02-15T15:50:00Z",
"status": "DEGRADED"
},
"investments": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"liabilities": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"status": "HEALTHY"
},
"investments_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"item_logins": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.01,
"success": 0.9
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"liabilities_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"transactions_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
}
}
}
],
"request_id": "tbFyCEqkU774ZGG",
"total": 11384
}
POST
Get details of an institution
{{baseUrl}}/institutions/get_by_id
BODY json
{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/institutions/get_by_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/institutions/get_by_id" {:content-type :json
:form-params {:client_id ""
:country_codes []
:institution_id ""
:options {:include_auth_metadata false
:include_optional_metadata false
:include_payment_initiation_metadata false
:include_status false}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/institutions/get_by_id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/institutions/get_by_id"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/institutions/get_by_id");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/institutions/get_by_id"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/institutions/get_by_id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 258
{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/institutions/get_by_id")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/institutions/get_by_id"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/institutions/get_by_id")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/institutions/get_by_id")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/institutions/get_by_id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get_by_id',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/institutions/get_by_id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_codes":[],"institution_id":"","options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"include_status":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/institutions/get_by_id',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "country_codes": [],\n "institution_id": "",\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "include_status": false\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/institutions/get_by_id")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/institutions/get_by_id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get_by_id',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/institutions/get_by_id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/get_by_id',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_codes: [],
institution_id: '',
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
include_status: false
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/institutions/get_by_id';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_codes":[],"institution_id":"","options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"include_status":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"country_codes": @[ ],
@"institution_id": @"",
@"options": @{ @"include_auth_metadata": @NO, @"include_optional_metadata": @NO, @"include_payment_initiation_metadata": @NO, @"include_status": @NO },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/institutions/get_by_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/institutions/get_by_id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/institutions/get_by_id",
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([
'client_id' => '',
'country_codes' => [
],
'institution_id' => '',
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'include_status' => null
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/institutions/get_by_id', [
'body' => '{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/institutions/get_by_id');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'country_codes' => [
],
'institution_id' => '',
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'include_status' => null
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'country_codes' => [
],
'institution_id' => '',
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'include_status' => null
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/institutions/get_by_id');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/institutions/get_by_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/institutions/get_by_id' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/institutions/get_by_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/institutions/get_by_id"
payload = {
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": False,
"include_optional_metadata": False,
"include_payment_initiation_metadata": False,
"include_status": False
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/institutions/get_by_id"
payload <- "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/institutions/get_by_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/institutions/get_by_id') do |req|
req.body = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"institution_id\": \"\",\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"include_status\": false\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/institutions/get_by_id";
let payload = json!({
"client_id": "",
"country_codes": (),
"institution_id": "",
"options": json!({
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/institutions/get_by_id \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}'
echo '{
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
},
"secret": ""
}' | \
http POST {{baseUrl}}/institutions/get_by_id \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "country_codes": [],\n "institution_id": "",\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "include_status": false\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/institutions/get_by_id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"country_codes": [],
"institution_id": "",
"options": [
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"include_status": false
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/institutions/get_by_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"institution": {
"country_codes": [
"US"
],
"institution_id": "ins_109512",
"logo": null,
"name": "Houndstooth Bank",
"oauth": false,
"primary_color": "#004966",
"products": [
"auth",
"balance",
"identity",
"transactions"
],
"routing_numbers": [
"011000138",
"011200365",
"011400495"
],
"status": {
"auth": {
"breakdown": {
"error_institution": 0.08,
"error_plaid": 0.01,
"success": 0.91
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"identity": {
"breakdown": {
"error_institution": 0.5,
"error_plaid": 0.08,
"success": 0.42
},
"last_status_change": "2019-02-15T15:50:00Z",
"status": "DEGRADED"
},
"investments": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"liabilities": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"status": "HEALTHY"
},
"investments_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"item_logins": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.01,
"success": 0.9
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"liabilities_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"transactions_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
}
},
"url": "https://plaid.com"
},
"request_id": "m8MDnv9okwxFNBV"
}
POST
Get entity watchlist screening program
{{baseUrl}}/watchlist_screening/entity/program/get
BODY json
{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/program/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/program/get" {:content-type :json
:form-params {:client_id ""
:entity_watchlist_program_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/program/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/program/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/program/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/program/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/program/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 74
{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/program/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/program/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/program/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/program/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
entity_watchlist_program_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/program/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', entity_watchlist_program_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/program/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","entity_watchlist_program_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/program/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "entity_watchlist_program_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/program/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/program/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', entity_watchlist_program_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', entity_watchlist_program_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/program/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
entity_watchlist_program_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', entity_watchlist_program_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/program/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","entity_watchlist_program_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"entity_watchlist_program_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/program/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/program/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/program/get",
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([
'client_id' => '',
'entity_watchlist_program_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/program/get', [
'body' => '{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/program/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'entity_watchlist_program_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'entity_watchlist_program_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/program/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/program/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/program/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/program/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/program/get"
payload = {
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/program/get"
payload <- "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/program/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/program/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/program/get";
let payload = json!({
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/program/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/program/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "entity_watchlist_program_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/program/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"entity_watchlist_program_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/program/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"created_at": "2020-07-24T03:26:02Z",
"id": "entprg_2eRPsDnL66rZ7H",
"is_archived": false,
"is_rescanning_enabled": true,
"lists_enabled": [
"EU_CON"
],
"name": "Sample Program",
"name_sensitivity": "balanced",
"request_id": "saKrIBuEB9qJZng"
}
POST
Get incremental transaction updates on an Item
{{baseUrl}}/transactions/sync
BODY json
{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactions/sync");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactions/sync" {:content-type :json
:form-params {:access_token ""
:client_id ""
:count 0
:cursor ""
:options {:include_logo_and_counterparty_beta false
:include_original_description false
:include_personal_finance_category false}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transactions/sync"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transactions/sync"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactions/sync");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactions/sync"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transactions/sync HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 248
{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactions/sync")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactions/sync"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactions/sync")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactions/sync")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transactions/sync');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/sync',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactions/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","count":0,"cursor":"","options":{"include_logo_and_counterparty_beta":false,"include_original_description":false,"include_personal_finance_category":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transactions/sync',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "count": 0,\n "cursor": "",\n "options": {\n "include_logo_and_counterparty_beta": false,\n "include_original_description": false,\n "include_personal_finance_category": false\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactions/sync")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactions/sync',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/sync',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transactions/sync');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/sync',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
count: 0,
cursor: '',
options: {
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactions/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","count":0,"cursor":"","options":{"include_logo_and_counterparty_beta":false,"include_original_description":false,"include_personal_finance_category":false},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"count": @0,
@"cursor": @"",
@"options": @{ @"include_logo_and_counterparty_beta": @NO, @"include_original_description": @NO, @"include_personal_finance_category": @NO },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactions/sync"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transactions/sync" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactions/sync",
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([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transactions/sync', [
'body' => '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactions/sync');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactions/sync');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactions/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactions/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactions/sync", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactions/sync"
payload = {
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": False,
"include_original_description": False,
"include_personal_finance_category": False
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactions/sync"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactions/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transactions/sync') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactions/sync";
let payload = json!({
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": json!({
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transactions/sync \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
},
"secret": ""
}' | \
http POST {{baseUrl}}/transactions/sync \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "count": 0,\n "cursor": "",\n "options": {\n "include_logo_and_counterparty_beta": false,\n "include_original_description": false,\n "include_personal_finance_category": false\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transactions/sync
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"options": [
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactions/sync")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"added": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"account_owner": null,
"amount": 2307.21,
"authorized_date": "2022-02-03",
"authorized_datetime": "2022-02-03T10:34:50Z",
"category": [
"Shops",
"Computers and Electronics"
],
"category_id": "19013000",
"check_number": null,
"date": "2022-02-03",
"datetime": "2022-02-03T11:00:00Z",
"iso_currency_code": "USD",
"location": {
"address": "300 Post St",
"city": "San Francisco",
"country": "US",
"lat": 40.740352,
"lon": -74.001761,
"postal_code": "94108",
"region": "CA",
"store_number": "1235"
},
"merchant_name": "Apple",
"name": "Apple Store",
"payment_channel": "in store",
"payment_meta": {
"by_order_of": null,
"payee": null,
"payer": null,
"payment_method": null,
"payment_processor": null,
"ppd_id": null,
"reason": null,
"reference_number": null
},
"pending": false,
"pending_transaction_id": null,
"transaction_code": null,
"transaction_id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNoSrzqDje",
"unofficial_currency_code": null
}
],
"has_more": false,
"modified": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"account_owner": null,
"amount": 98.05,
"authorized_date": "2022-02-28",
"authorized_datetime": "2022-02-28T10:34:50Z",
"category": [
"Service",
"Utilities",
"Electric"
],
"category_id": "18068005",
"check_number": null,
"date": "2022-02-28",
"datetime": "2022-02-28T11:00:00Z",
"iso_currency_code": "USD",
"location": {
"address": null,
"city": null,
"country": null,
"lat": null,
"lon": null,
"postal_code": null,
"region": null,
"store_number": null
},
"merchant_name": "ConEd",
"name": "ConEd Bill Payment",
"payment_channel": "online",
"payment_meta": {
"by_order_of": null,
"payee": null,
"payer": null,
"payment_method": null,
"payment_processor": null,
"ppd_id": null,
"reason": null,
"reference_number": null
},
"pending": false,
"pending_transaction_id": null,
"transaction_code": null,
"transaction_id": "yhnUVvtcGGcCKU0bcz8PDQr5ZUxUXebUvbKC0",
"unofficial_currency_code": null
}
],
"next_cursor": "tVUUL15lYQN5rBnfDIc1I8xudpGdIlw9nsgeXWvhOfkECvUeR663i3Dt1uf/94S8ASkitgLcIiOSqNwzzp+bh89kirazha5vuZHBb2ZA5NtCDkkV",
"removed": [
{
"transaction_id": "CmdQTNgems8BT1B7ibkoUXVPyAeehT3Tmzk0l"
}
],
"request_id": "45QSn"
}
POST
Get individual watchlist screening program
{{baseUrl}}/watchlist_screening/individual/program/get
BODY json
{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/program/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/program/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:watchlist_program_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/program/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/program/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/program/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/program/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/program/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/program/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/program/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/program/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/program/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
watchlist_program_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/program/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', watchlist_program_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/program/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","watchlist_program_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/program/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "watchlist_program_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/program/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/program/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', watchlist_program_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', watchlist_program_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/program/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
watchlist_program_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', watchlist_program_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/program/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","watchlist_program_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"watchlist_program_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/program/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/program/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/program/get",
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([
'client_id' => '',
'secret' => '',
'watchlist_program_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/program/get', [
'body' => '{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/program/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'watchlist_program_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'watchlist_program_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/program/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/program/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/program/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/program/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/program/get"
payload = {
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/program/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/program/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/program/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_program_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/program/get";
let payload = json!({
"client_id": "",
"secret": "",
"watchlist_program_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/program/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"watchlist_program_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/program/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "watchlist_program_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/program/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"watchlist_program_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/program/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"created_at": "2020-07-24T03:26:02Z",
"id": "prg_2eRPsDnL66rZ7H",
"is_archived": false,
"is_rescanning_enabled": true,
"lists_enabled": [
"US_SDN"
],
"name": "Sample Program",
"name_sensitivity": "balanced",
"request_id": "saKrIBuEB9qJZng"
}
POST
Get investment transactions
{{baseUrl}}/investments/transactions/get
BODY json
{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/investments/transactions/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/investments/transactions/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:end_date ""
:options {:account_ids []
:count 0
:offset 0}
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/investments/transactions/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/investments/transactions/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/investments/transactions/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/investments/transactions/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/investments/transactions/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 172
{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/investments/transactions/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/investments/transactions/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/investments/transactions/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/investments/transactions/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
offset: 0
},
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/investments/transactions/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/transactions/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
end_date: '',
options: {account_ids: [], count: 0, offset: 0},
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/investments/transactions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","end_date":"","options":{"account_ids":[],"count":0,"offset":0},"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/investments/transactions/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "end_date": "",\n "options": {\n "account_ids": [],\n "count": 0,\n "offset": 0\n },\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/investments/transactions/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/investments/transactions/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
end_date: '',
options: {account_ids: [], count: 0, offset: 0},
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/transactions/get',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
end_date: '',
options: {account_ids: [], count: 0, offset: 0},
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/investments/transactions/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
offset: 0
},
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/investments/transactions/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
end_date: '',
options: {account_ids: [], count: 0, offset: 0},
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/investments/transactions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","end_date":"","options":{"account_ids":[],"count":0,"offset":0},"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"end_date": @"",
@"options": @{ @"account_ids": @[ ], @"count": @0, @"offset": @0 },
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/investments/transactions/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/investments/transactions/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/investments/transactions/get",
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([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/investments/transactions/get', [
'body' => '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/investments/transactions/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/investments/transactions/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/investments/transactions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/investments/transactions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/investments/transactions/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/investments/transactions/get"
payload = {
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/investments/transactions/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/investments/transactions/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/investments/transactions/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/investments/transactions/get";
let payload = json!({
"access_token": "",
"client_id": "",
"end_date": "",
"options": json!({
"account_ids": (),
"count": 0,
"offset": 0
}),
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/investments/transactions/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}'
echo '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"offset": 0
},
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/investments/transactions/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "end_date": "",\n "options": {\n "account_ids": [],\n "count": 0,\n "offset": 0\n },\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/investments/transactions/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"end_date": "",
"options": [
"account_ids": [],
"count": 0,
"offset": 0
],
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/investments/transactions/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "5e66Dl6jNatx3nXPGwZ7UkJed4z6KBcZA4Rbe",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"subtype": "checking",
"type": "depository"
},
{
"account_id": "KqZZMoZmBWHJlz7yKaZjHZb78VNpaxfVa7e5z",
"balances": {
"available": null,
"current": 320.76,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "5555",
"name": "Plaid IRA",
"official_name": null,
"subtype": "ira",
"type": "investment"
},
{
"account_id": "rz99ex9ZQotvnjXdgQLEsR81e3ArPgulVWjGj",
"balances": {
"available": null,
"current": 23631.9805,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "6666",
"name": "Plaid 401k",
"official_name": null,
"subtype": "401k",
"type": "investment"
}
],
"investment_transactions": [
{
"account_id": "rz99ex9ZQotvnjXdgQLEsR81e3ArPgulVWjGj",
"amount": -8.72,
"cancel_transaction_id": null,
"date": "2020-05-29",
"fees": 0,
"investment_transaction_id": "oq99Pz97joHQem4BNjXECev1E4B6L6sRzwANW",
"iso_currency_code": "USD",
"name": "INCOME DIV DIVIDEND RECEIVED",
"price": 0,
"quantity": 0,
"security_id": "eW4jmnjd6AtjxXVrjmj6SX1dNEdZp3Cy8RnRQ",
"subtype": "dividend",
"type": "cash",
"unofficial_currency_code": null
},
{
"account_id": "rz99ex9ZQotvnjXdgQLEsR81e3ArPgulVWjGj",
"amount": -1289.01,
"cancel_transaction_id": null,
"date": "2020-05-28",
"fees": 7.99,
"investment_transaction_id": "pK99jB9e7mtwjA435GpVuMvmWQKVbVFLWme57",
"iso_currency_code": "USD",
"name": "SELL Matthews Pacific Tiger Fund Insti Class",
"price": 27.53,
"quantity": -47.74104242992852,
"security_id": "JDdP7XPMklt5vwPmDN45t3KAoWAPmjtpaW7DP",
"subtype": "sell",
"type": "sell",
"unofficial_currency_code": null
},
{
"account_id": "rz99ex9ZQotvnjXdgQLEsR81e3ArPgulVWjGj",
"amount": 7.7,
"cancel_transaction_id": null,
"date": "2020-05-27",
"fees": 7.99,
"investment_transaction_id": "LKoo1ko93wtreBwM7yQnuQ3P5DNKbKSPRzBNv",
"iso_currency_code": "USD",
"name": "BUY DoubleLine Total Return Bond Fund",
"price": 10.42,
"quantity": 0.7388014749727547,
"security_id": "NDVQrXQoqzt5v3bAe8qRt4A7mK7wvZCLEBBJk",
"subtype": "buy",
"type": "buy",
"unofficial_currency_code": null
}
],
"item": {
"available_products": [
"assets",
"balance",
"identity",
"transactions"
],
"billed_products": [
"auth",
"investments"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_12",
"item_id": "8Mqq5rqQ7Pcxq9MGDv3JULZ6yzZDLMCwoxGDq",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "iv4q3ZlytOOthkv",
"securities": [
{
"close_price": 27,
"close_price_as_of": null,
"cusip": "577130834",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US5771308344",
"iso_currency_code": "USD",
"name": "Matthews Pacific Tiger Fund Insti Class",
"proxy_security_id": null,
"security_id": "JDdP7XPMklt5vwPmDN45t3KAoWAPmjtpaW7DP",
"sedol": null,
"ticker_symbol": "MIPTX",
"type": "mutual fund",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 10.42,
"close_price_as_of": null,
"cusip": "258620103",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US2586201038",
"iso_currency_code": "USD",
"name": "DoubleLine Total Return Bond Fund",
"proxy_security_id": null,
"security_id": "NDVQrXQoqzt5v3bAe8qRt4A7mK7wvZCLEBBJk",
"sedol": null,
"ticker_symbol": "DBLTX",
"type": "mutual fund",
"unofficial_currency_code": null,
"update_datetime": null
},
{
"close_price": 34.73,
"close_price_as_of": null,
"cusip": "84470P109",
"institution_id": null,
"institution_security_id": null,
"is_cash_equivalent": false,
"isin": "US84470P1093",
"iso_currency_code": "USD",
"name": "Southside Bancshares Inc.",
"proxy_security_id": null,
"security_id": "eW4jmnjd6AtjxXVrjmj6SX1dNEdZp3Cy8RnRQ",
"sedol": null,
"ticker_symbol": "SBSI",
"type": "equity",
"unofficial_currency_code": null,
"update_datetime": null
}
],
"total_investment_transactions": 3
}
POST
Get payment consent
{{baseUrl}}/payment_initiation/consent/get
BODY json
{
"client_id": "",
"consent_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/consent/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/consent/get" {:content-type :json
:form-params {:client_id ""
:consent_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/consent/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/consent/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/consent/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/consent/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/consent/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"consent_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/consent/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/consent/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/consent/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
consent_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/consent/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/consent/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/consent/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "consent_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/consent/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', consent_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', consent_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/consent/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
consent_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/consent/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"consent_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/consent/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/consent/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/consent/get",
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([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/consent/get', [
'body' => '{
"client_id": "",
"consent_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/consent/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/consent/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/consent/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/consent/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/consent/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/consent/get"
payload = {
"client_id": "",
"consent_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/consent/get"
payload <- "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/consent/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/consent/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/consent/get";
let payload = json!({
"client_id": "",
"consent_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/consent/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"consent_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/consent/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "consent_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/consent/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"consent_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/consent/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"consent_id": "consent-id-production-feca8a7a-5491-4aef-9298-f3062bb735d3",
"constraints": {
"max_payment_amount": {
"currency": "GBP",
"value": 100
},
"periodic_amounts": [
{
"alignment": "CALENDAR",
"amount": {
"currency": "GBP",
"value": 300
},
"interval": "WEEK"
}
],
"valid_date_time": {
"from": "2021-12-25T11:12:13Z",
"to": "2022-12-31T15:26:48Z"
}
},
"created_at": "2021-10-30T15:26:48Z",
"recipient_id": "recipient-id-production-9b6b4679-914b-445b-9450-efbdb80296f6",
"reference": "ref-00001",
"request_id": "4ciYuuesdqSiUAB",
"scopes": [
"ME_TO_ME"
],
"status": "AUTHORISED"
}
POST
Get payment details
{{baseUrl}}/payment_initiation/payment/get
BODY json
{
"client_id": "",
"payment_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/payment/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/payment/get" {:content-type :json
:form-params {:client_id ""
:payment_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/payment/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/payment/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/payment/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/payment/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/payment/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"payment_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/payment/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/payment/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/payment/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
payment_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/payment/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/payment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/payment/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "payment_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/payment/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', payment_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', payment_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/payment/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
payment_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/payment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"payment_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/payment/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/payment/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/payment/get",
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([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/payment/get', [
'body' => '{
"client_id": "",
"payment_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/payment/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'payment_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/payment/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/payment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/payment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/payment/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/payment/get"
payload = {
"client_id": "",
"payment_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/payment/get"
payload <- "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/payment/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/payment/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"payment_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/payment/get";
let payload = json!({
"client_id": "",
"payment_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/payment/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"payment_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"payment_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/payment/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "payment_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/payment/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"payment_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/payment/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "GBP",
"value": 100
},
"bacs": {
"account": "31926819",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"sort_code": "601613"
},
"iban": null,
"last_status_update": "2019-11-06T21:10:52Z",
"payment_expiration_time": "2019-11-06T21:25:52Z",
"payment_id": "payment-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"payment_token": "payment-token-sandbox-c6a26505-42b4-46fe-8ecf-bf9edcafbebb",
"recipient_id": "recipient-id-sandbox-9b6b4679-914b-445b-9450-efbdb80296f6",
"reference": "Account Funding 99744",
"request_id": "aEAQmewMzlVa1k6",
"status": "PAYMENT_STATUS_INPUT_NEEDED"
}
POST
Get payment profile
{{baseUrl}}/payment_profile/get
BODY json
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_profile/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_profile/get" {:content-type :json
:form-params {:client_id ""
:payment_profile_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_profile/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_profile/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_profile/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_profile/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_profile/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_profile/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_profile/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_profile/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_profile/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
payment_profile_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_profile/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_profile/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_profile/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_profile/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_profile/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', payment_profile_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', payment_profile_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_profile/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
payment_profile_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_profile/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"payment_profile_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_profile/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_profile/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_profile/get",
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([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_profile/get', [
'body' => '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_profile/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_profile/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_profile/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_profile/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_profile/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_profile/get"
payload = {
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_profile/get"
payload <- "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_profile/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_profile/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_profile/get";
let payload = json!({
"client_id": "",
"payment_profile_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_profile/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_profile/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_profile/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"payment_profile_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_profile/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created_at": "2022-07-05T12:48:37Z",
"deleted_at": null,
"request_id": "4ciYmmesdqSiUAB",
"status": "READY",
"updated_at": "2022-07-07T12:48:37Z"
}
POST
Get payment recipient
{{baseUrl}}/payment_initiation/recipient/get
BODY json
{
"client_id": "",
"recipient_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/recipient/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/recipient/get" {:content-type :json
:form-params {:client_id ""
:recipient_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/recipient/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/recipient/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/recipient/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/recipient/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/recipient/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"client_id": "",
"recipient_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/recipient/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/recipient/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/recipient/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
recipient_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/recipient/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', recipient_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/recipient/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recipient_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/recipient/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "recipient_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/recipient/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', recipient_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', recipient_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/recipient/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
recipient_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', recipient_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/recipient/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recipient_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"recipient_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/recipient/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/recipient/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/recipient/get",
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([
'client_id' => '',
'recipient_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/recipient/get', [
'body' => '{
"client_id": "",
"recipient_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/recipient/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'recipient_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'recipient_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/recipient/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/recipient/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recipient_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/recipient/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recipient_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/recipient/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/recipient/get"
payload = {
"client_id": "",
"recipient_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/recipient/get"
payload <- "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/recipient/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/recipient/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"recipient_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/recipient/get";
let payload = json!({
"client_id": "",
"recipient_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/recipient/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"recipient_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"recipient_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/recipient/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "recipient_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/recipient/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"recipient_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/recipient/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"address": {
"city": "London",
"country": "GB",
"postal_code": "SE14 8JW",
"street": [
"96 Guild Street",
"9th Floor"
]
},
"iban": "GB29NWBK60161331926819",
"name": "Wonder Wallet",
"recipient_id": "recipient-id-sandbox-9b6b4679-914b-445b-9450-efbdb80296f6",
"request_id": "4zlKapIkTm8p5KM"
}
POST
Get status of all originators' onboarding
{{baseUrl}}/transfer/originator/list
BODY json
{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/originator/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/originator/list" {:content-type :json
:form-params {:client_id ""
:count 0
:offset 0
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/originator/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/originator/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/originator/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/originator/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/originator/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 66
{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/originator/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/originator/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/originator/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/originator/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
offset: 0,
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/originator/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, offset: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/originator/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"offset":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/originator/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "offset": 0,\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/originator/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/originator/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', count: 0, offset: 0, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', count: 0, offset: 0, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/originator/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
offset: 0,
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, offset: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/originator/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"offset":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"offset": @0,
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/originator/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/originator/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/originator/list",
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([
'client_id' => '',
'count' => 0,
'offset' => 0,
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/originator/list', [
'body' => '{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/originator/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'offset' => 0,
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'offset' => 0,
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/originator/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/originator/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/originator/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/originator/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/originator/list"
payload = {
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/originator/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/originator/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/originator/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/originator/list";
let payload = json!({
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/originator/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}'
echo '{
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/originator/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "offset": 0,\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/originator/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"offset": 0,
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/originator/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"originators": [
{
"client_id": "6a65dh3d1h0d1027121ak184",
"transfer_diligence_status": "approved"
},
{
"client_id": "8g89as4d2k1d9852938ba019",
"transfer_diligence_status": "denied"
}
],
"request_id": "4zlKapIkTm8p5KM"
}
POST
Get status of an originator's onboarding
{{baseUrl}}/transfer/originator/get
BODY json
{
"client_id": "",
"originator_client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/originator/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/originator/get" {:content-type :json
:form-params {:client_id ""
:originator_client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/originator/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/originator/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/originator/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/originator/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/originator/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"client_id": "",
"originator_client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/originator/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/originator/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/originator/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/originator/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
originator_client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/originator/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', originator_client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/originator/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","originator_client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/originator/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "originator_client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/originator/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/originator/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', originator_client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', originator_client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/originator/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
originator_client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/originator/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', originator_client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/originator/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","originator_client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"originator_client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/originator/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/originator/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/originator/get",
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([
'client_id' => '',
'originator_client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/originator/get', [
'body' => '{
"client_id": "",
"originator_client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/originator/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'originator_client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'originator_client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/originator/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/originator/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"originator_client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/originator/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"originator_client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/originator/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/originator/get"
payload = {
"client_id": "",
"originator_client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/originator/get"
payload <- "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/originator/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/originator/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/originator/get";
let payload = json!({
"client_id": "",
"originator_client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/originator/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"originator_client_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"originator_client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/originator/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "originator_client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/originator/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"originator_client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/originator/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"originator": {
"client_id": "6a65dh3d1h0d1027121ak184",
"company_name": "Plaid",
"transfer_diligence_status": "approved"
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Get transaction data
{{baseUrl}}/transactions/get
BODY json
{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactions/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactions/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:end_date ""
:options {:account_ids []
:count 0
:include_logo_and_counterparty_beta false
:include_original_description false
:include_personal_finance_category false
:include_personal_finance_category_beta false
:offset 0}
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/transactions/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transactions/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactions/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactions/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transactions/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 365
{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactions/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactions/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactions/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactions/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transactions/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","end_date":"","options":{"account_ids":[],"count":0,"include_logo_and_counterparty_beta":false,"include_original_description":false,"include_personal_finance_category":false,"include_personal_finance_category_beta":false,"offset":0},"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transactions/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "end_date": "",\n "options": {\n "account_ids": [],\n "count": 0,\n "include_logo_and_counterparty_beta": false,\n "include_original_description": false,\n "include_personal_finance_category": false,\n "include_personal_finance_category_beta": false,\n "offset": 0\n },\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactions/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactions/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/get',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transactions/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
end_date: '',
options: {
account_ids: [],
count: 0,
include_logo_and_counterparty_beta: false,
include_original_description: false,
include_personal_finance_category: false,
include_personal_finance_category_beta: false,
offset: 0
},
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","end_date":"","options":{"account_ids":[],"count":0,"include_logo_and_counterparty_beta":false,"include_original_description":false,"include_personal_finance_category":false,"include_personal_finance_category_beta":false,"offset":0},"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"end_date": @"",
@"options": @{ @"account_ids": @[ ], @"count": @0, @"include_logo_and_counterparty_beta": @NO, @"include_original_description": @NO, @"include_personal_finance_category": @NO, @"include_personal_finance_category_beta": @NO, @"offset": @0 },
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactions/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transactions/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactions/get",
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([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null,
'include_personal_finance_category_beta' => null,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transactions/get', [
'body' => '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactions/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null,
'include_personal_finance_category_beta' => null,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'end_date' => '',
'options' => [
'account_ids' => [
],
'count' => 0,
'include_logo_and_counterparty_beta' => null,
'include_original_description' => null,
'include_personal_finance_category' => null,
'include_personal_finance_category_beta' => null,
'offset' => 0
],
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactions/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactions/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactions/get"
payload = {
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": False,
"include_original_description": False,
"include_personal_finance_category": False,
"include_personal_finance_category_beta": False,
"offset": 0
},
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactions/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactions/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transactions/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"end_date\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"count\": 0,\n \"include_logo_and_counterparty_beta\": false,\n \"include_original_description\": false,\n \"include_personal_finance_category\": false,\n \"include_personal_finance_category_beta\": false,\n \"offset\": 0\n },\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactions/get";
let payload = json!({
"access_token": "",
"client_id": "",
"end_date": "",
"options": json!({
"account_ids": (),
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
}),
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transactions/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}'
echo '{
"access_token": "",
"client_id": "",
"end_date": "",
"options": {
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
},
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/transactions/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "end_date": "",\n "options": {\n "account_ids": [],\n "count": 0,\n "include_logo_and_counterparty_beta": false,\n "include_original_description": false,\n "include_personal_finance_category": false,\n "include_personal_finance_category_beta": false,\n "offset": 0\n },\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/transactions/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"end_date": "",
"options": [
"account_ids": [],
"count": 0,
"include_logo_and_counterparty_beta": false,
"include_original_description": false,
"include_personal_finance_category": false,
"include_personal_finance_category_beta": false,
"offset": 0
],
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactions/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 110,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"subtype": "checking",
"type": "depository"
}
],
"item": {
"available_products": [
"balance",
"identity",
"investments"
],
"billed_products": [
"assets",
"auth",
"liabilities",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "45QSn",
"total_transactions": 1,
"transactions": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"account_owner": null,
"amount": 2307.21,
"authorized_date": "2017-01-27",
"authorized_datetime": "2017-01-27T10:34:50Z",
"category": [
"Shops",
"Computers and Electronics"
],
"category_id": "19013000",
"check_number": null,
"date": "2017-01-29",
"datetime": "2017-01-27T11:00:00Z",
"iso_currency_code": "USD",
"location": {
"address": "300 Post St",
"city": "San Francisco",
"country": "US",
"lat": 40.740352,
"lon": -74.001761,
"postal_code": "94108",
"region": "CA",
"store_number": "1235"
},
"merchant_name": "Apple",
"name": "Apple Store",
"payment_channel": "in store",
"payment_meta": {
"by_order_of": null,
"payee": null,
"payer": null,
"payment_method": null,
"payment_processor": null,
"ppd_id": null,
"reason": null,
"reference_number": null
},
"pending": false,
"pending_transaction_id": null,
"transaction_code": null,
"transaction_id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNoSrzqDje",
"transaction_type": "place",
"unofficial_currency_code": null
}
]
}
POST
Get webhook verification key
{{baseUrl}}/webhook_verification_key/get
BODY json
{
"client_id": "",
"key_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/webhook_verification_key/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/webhook_verification_key/get" {:content-type :json
:form-params {:client_id ""
:key_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/webhook_verification_key/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/webhook_verification_key/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/webhook_verification_key/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/webhook_verification_key/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/webhook_verification_key/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"client_id": "",
"key_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/webhook_verification_key/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/webhook_verification_key/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/webhook_verification_key/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/webhook_verification_key/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
key_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/webhook_verification_key/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/webhook_verification_key/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', key_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/webhook_verification_key/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","key_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/webhook_verification_key/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "key_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/webhook_verification_key/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/webhook_verification_key/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', key_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/webhook_verification_key/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', key_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/webhook_verification_key/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
key_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/webhook_verification_key/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', key_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/webhook_verification_key/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","key_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"key_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/webhook_verification_key/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/webhook_verification_key/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/webhook_verification_key/get",
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([
'client_id' => '',
'key_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/webhook_verification_key/get', [
'body' => '{
"client_id": "",
"key_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/webhook_verification_key/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'key_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'key_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/webhook_verification_key/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/webhook_verification_key/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"key_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/webhook_verification_key/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"key_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/webhook_verification_key/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/webhook_verification_key/get"
payload = {
"client_id": "",
"key_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/webhook_verification_key/get"
payload <- "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/webhook_verification_key/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/webhook_verification_key/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"key_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/webhook_verification_key/get";
let payload = json!({
"client_id": "",
"key_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/webhook_verification_key/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"key_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"key_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/webhook_verification_key/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "key_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/webhook_verification_key/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"key_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/webhook_verification_key/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"key": {
"alg": "ES256",
"created_at": 1560466150,
"crv": "P-256",
"expired_at": null,
"kid": "bfbd5111-8e33-4643-8ced-b2e642a72f3c",
"kty": "EC",
"use": "sig",
"x": "hKXLGIjWvCBv-cP5euCTxl8g9GLG9zHo_3pO5NN1DwQ",
"y": "shhexqPB7YffGn6fR6h2UhTSuCtPmfzQJ6ENVIoO4Ys"
},
"request_id": "RZ6Omi1bzzwDaLo"
}
POST
Import Item
{{baseUrl}}/item/import
BODY json
{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/import");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/import" {:content-type :json
:form-params {:client_id ""
:options {:webhook ""}
:products []
:secret ""
:user_auth {:auth_token ""
:user_id ""}}})
require "http/client"
url = "{{baseUrl}}/item/import"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/import"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/import");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/import"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/import HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 155
{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/import")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/import"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/import")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/import")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
client_id: '',
options: {
webhook: ''
},
products: [],
secret: '',
user_auth: {
auth_token: '',
user_id: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/import');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/import',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {webhook: ''},
products: [],
secret: '',
user_auth: {auth_token: '', user_id: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"webhook":""},"products":[],"secret":"","user_auth":{"auth_token":"","user_id":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/import',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "options": {\n "webhook": ""\n },\n "products": [],\n "secret": "",\n "user_auth": {\n "auth_token": "",\n "user_id": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/import")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/import',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
options: {webhook: ''},
products: [],
secret: '',
user_auth: {auth_token: '', user_id: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/import',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
options: {webhook: ''},
products: [],
secret: '',
user_auth: {auth_token: '', user_id: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/import');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
options: {
webhook: ''
},
products: [],
secret: '',
user_auth: {
auth_token: '',
user_id: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/import',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {webhook: ''},
products: [],
secret: '',
user_auth: {auth_token: '', user_id: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/import';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"webhook":""},"products":[],"secret":"","user_auth":{"auth_token":"","user_id":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"options": @{ @"webhook": @"" },
@"products": @[ ],
@"secret": @"",
@"user_auth": @{ @"auth_token": @"", @"user_id": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/import"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/import" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/import",
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([
'client_id' => '',
'options' => [
'webhook' => ''
],
'products' => [
],
'secret' => '',
'user_auth' => [
'auth_token' => '',
'user_id' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/import', [
'body' => '{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/import');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'options' => [
'webhook' => ''
],
'products' => [
],
'secret' => '',
'user_auth' => [
'auth_token' => '',
'user_id' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'options' => [
'webhook' => ''
],
'products' => [
],
'secret' => '',
'user_auth' => [
'auth_token' => '',
'user_id' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/item/import');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/import' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/import", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/import"
payload = {
"client_id": "",
"options": { "webhook": "" },
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/import"
payload <- "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/import') do |req|
req.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"webhook\": \"\"\n },\n \"products\": [],\n \"secret\": \"\",\n \"user_auth\": {\n \"auth_token\": \"\",\n \"user_id\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/import";
let payload = json!({
"client_id": "",
"options": json!({"webhook": ""}),
"products": (),
"secret": "",
"user_auth": json!({
"auth_token": "",
"user_id": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/import \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}'
echo '{
"client_id": "",
"options": {
"webhook": ""
},
"products": [],
"secret": "",
"user_auth": {
"auth_token": "",
"user_id": ""
}
}' | \
http POST {{baseUrl}}/item/import \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "options": {\n "webhook": ""\n },\n "products": [],\n "secret": "",\n "user_auth": {\n "auth_token": "",\n "user_id": ""\n }\n}' \
--output-document \
- {{baseUrl}}/item/import
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"options": ["webhook": ""],
"products": [],
"secret": "",
"user_auth": [
"auth_token": "",
"user_id": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/import")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"access_token": "access-sandbox-99ace160-3cf7-4e51-a083-403633425815",
"request_id": "ewIBAn6RZirsk4W"
}
POST
Invalidate access_token
{{baseUrl}}/item/access_token/invalidate
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/access_token/invalidate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/access_token/invalidate" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/access_token/invalidate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/access_token/invalidate"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/access_token/invalidate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/access_token/invalidate"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/access_token/invalidate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/access_token/invalidate")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/access_token/invalidate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/access_token/invalidate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/access_token/invalidate")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/access_token/invalidate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/access_token/invalidate',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/access_token/invalidate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/access_token/invalidate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/access_token/invalidate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/access_token/invalidate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/access_token/invalidate',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/access_token/invalidate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/access_token/invalidate',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/access_token/invalidate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/access_token/invalidate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/access_token/invalidate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/access_token/invalidate",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/access_token/invalidate', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/access_token/invalidate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/access_token/invalidate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/access_token/invalidate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/access_token/invalidate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/access_token/invalidate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/access_token/invalidate"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/access_token/invalidate"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/access_token/invalidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/access_token/invalidate') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/access_token/invalidate";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/access_token/invalidate \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/access_token/invalidate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/access_token/invalidate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/access_token/invalidate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"new_access_token": "access-sandbox-8ab976e6-64bc-4b38-98f7-731e7a349970",
"request_id": "m8MDnv9okwxFNBV"
}
POST
List Identity Verifications
{{baseUrl}}/identity_verification/list
BODY json
{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity_verification/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity_verification/list" {:content-type :json
:form-params {:client_id ""
:client_user_id ""
:cursor ""
:secret ""
:template_id ""}})
require "http/client"
url = "{{baseUrl}}/identity_verification/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity_verification/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity_verification/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity_verification/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity_verification/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 98
{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity_verification/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity_verification/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity_verification/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity_verification/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
template_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity_verification/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', client_user_id: '', cursor: '', secret: '', template_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity_verification/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","cursor":"","secret":"","template_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity_verification/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "secret": "",\n "template_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity_verification/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity_verification/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', client_user_id: '', cursor: '', secret: '', template_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', client_user_id: '', cursor: '', secret: '', template_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity_verification/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
template_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', client_user_id: '', cursor: '', secret: '', template_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity_verification/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","cursor":"","secret":"","template_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_user_id": @"",
@"cursor": @"",
@"secret": @"",
@"template_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity_verification/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity_verification/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity_verification/list",
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([
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'template_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity_verification/list', [
'body' => '{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity_verification/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'template_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'template_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identity_verification/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity_verification/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity_verification/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity_verification/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity_verification/list"
payload = {
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity_verification/list"
payload <- "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity_verification/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity_verification/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"template_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity_verification/list";
let payload = json!({
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity_verification/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}'
echo '{
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
}' | \
http POST {{baseUrl}}/identity_verification/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "secret": "",\n "template_id": ""\n}' \
--output-document \
- {{baseUrl}}/identity_verification/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"template_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity_verification/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"identity_verifications": [
{
"client_user_id": "your-db-id-3b24110",
"completed_at": "2020-07-24T03:26:02Z",
"created_at": "2020-07-24T03:26:02Z",
"documentary_verification": {
"documents": [
{
"analysis": {
"authenticity": "match",
"extracted_data": {
"date_of_birth": "match",
"expiration_date": "not_expired",
"issuing_country": "match",
"name": "match"
},
"image_quality": "high"
},
"attempt": 1,
"extracted_data": {
"category": "drivers_license",
"expiration_date": "1990-05-29",
"id_number": "AB123456",
"issuing_country": "US",
"issuing_region": "IN"
},
"images": {
"cropped_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_back.jpeg",
"cropped_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_front.jpeg",
"face": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/face.jpeg",
"original_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_back.jpeg",
"original_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_front.jpeg"
},
"redacted_at": "2020-07-24T03:26:02Z",
"status": "success"
}
],
"status": "success"
},
"id": "idv_52xR9LKo77r1Np",
"kyc_check": {
"address": {
"po_box": "yes",
"summary": "match",
"type": "residential"
},
"date_of_birth": {
"summary": "match"
},
"id_number": {
"summary": "match"
},
"name": {
"summary": "match"
},
"phone_number": {
"summary": "match"
},
"status": "success"
},
"previous_attempt_id": "idv_42cF1MNo42r9Xj",
"redacted_at": "2020-07-24T03:26:02Z",
"shareable_url": "https://flow.plaid.com/verify/idv_4FrXJvfQU3zGUR?key=e004115db797f7cc3083bff3167cba30644ef630fb46f5b086cde6cc3b86a36f",
"status": "success",
"steps": {
"accept_tos": "success",
"documentary_verification": "success",
"kyc_check": "success",
"risk_check": "success",
"selfie_check": "success",
"verify_sms": "success",
"watchlist_screening": "success"
},
"template": {
"id": "idvtmp_4FrXJvfQU3zGUR",
"version": 2
},
"user": {
"address": {
"city": "Pawnee",
"country": "US",
"postal_code": "46001",
"region": "IN",
"street": "123 Main St.",
"street2": "Unit 42"
},
"date_of_birth": "1990-05-29",
"email_address": "user@example.com",
"id_number": {
"type": "us_ssn",
"value": "123456789"
},
"ip_address": "192.0.2.42",
"name": {
"family_name": "Knope",
"given_name": "Leslie"
},
"phone_number": "+19876543212"
},
"watchlist_screening_id": "scr_52xR9LKo77r1Np"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List Individual Watchlist Screenings
{{baseUrl}}/watchlist_screening/individual/list
BODY json
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/list" {:content-type :json
:form-params {:assignee ""
:client_id ""
:client_user_id ""
:cursor ""
:secret ""
:status ""
:watchlist_program_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/list"),
Content = new StringContent("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/list"
payload := strings.NewReader("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 141
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/list")
.header("content-type", "application/json")
.body("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/list',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","cursor":"","secret":"","status":"","watchlist_program_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "secret": "",\n "status": "",\n "watchlist_program_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/list',
headers: {'content-type': 'application/json'},
body: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/list',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
secret: '',
status: '',
watchlist_program_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","cursor":"","secret":"","status":"","watchlist_program_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assignee": @"",
@"client_id": @"",
@"client_user_id": @"",
@"cursor": @"",
@"secret": @"",
@"status": @"",
@"watchlist_program_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/list",
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([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'status' => '',
'watchlist_program_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/list', [
'body' => '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'status' => '',
'watchlist_program_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'secret' => '',
'status' => '',
'watchlist_program_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/list"
payload = {
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/list"
payload <- "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/list') do |req|
req.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_program_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/list";
let payload = json!({
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/list \
--header 'content-type: application/json' \
--data '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}'
echo '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "secret": "",\n "status": "",\n "watchlist_program_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"secret": "",
"status": "",
"watchlist_program_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng",
"watchlist_screenings": [
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "scr_52xR9LKo77r1Np",
"search_terms": {
"country": "US",
"date_of_birth": "1990-05-29",
"document_number": "C31195855",
"legal_name": "Aleksey Potemkin",
"version": 1,
"watchlist_program_id": "prg_2eRPsDnL66rZ7H"
},
"status": "cleared"
}
]
}
POST
List a historical log of user consent events
{{baseUrl}}/item/activity/list
BODY json
{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/activity/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/activity/list" {:content-type :json
:form-params {:access_token ""
:client_id ""
:count 0
:cursor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/activity/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/activity/list"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/activity/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/activity/list"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/activity/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 89
{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/activity/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/activity/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/activity/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/activity/list")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
count: 0,
cursor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/activity/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/activity/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', count: 0, cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/activity/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","count":0,"cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/activity/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "count": 0,\n "cursor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/activity/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/activity/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', count: 0, cursor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/activity/list',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', count: 0, cursor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/activity/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
count: 0,
cursor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/activity/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', count: 0, cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/activity/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","count":0,"cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"count": @0,
@"cursor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/activity/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/activity/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/activity/list",
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([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/activity/list', [
'body' => '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/activity/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/activity/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/activity/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/activity/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/activity/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/activity/list"
payload = {
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/activity/list"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/activity/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/activity/list') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/activity/list";
let payload = json!({
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/activity/list \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/activity/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "count": 0,\n "cursor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/activity/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"count": 0,
"cursor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/activity/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"activities": [],
"request_id": "m8MDnv9okwxFNBV"
}
POST
List a user’s connected applications
{{baseUrl}}/item/application/list
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/application/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/application/list" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/application/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/application/list"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/application/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/application/list"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/application/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/application/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/application/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/application/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/application/list")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/application/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/application/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/application/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/application/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/application/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/list',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/application/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/application/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/application/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/application/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/application/list",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/application/list', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/application/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/application/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/application/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/application/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/application/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/application/list"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/application/list"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/application/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/application/list') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/application/list";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/application/list \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/application/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/application/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/application/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
List bank transfer events
{{baseUrl}}/bank_transfer/event/list
BODY json
{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/event/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/event/list" {:content-type :json
:form-params {:account_id ""
:bank_transfer_id ""
:bank_transfer_type ""
:client_id ""
:count 0
:direction ""
:end_date ""
:event_types []
:offset 0
:origination_account_id ""
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/event/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/event/list"),
Content = new StringContent("{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/event/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/event/list"
payload := strings.NewReader("{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/event/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 250
{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/event/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/event/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/event/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/event/list")
.header("content-type", "application/json")
.body("{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/event/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/list',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/event/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","bank_transfer_id":"","bank_transfer_type":"","client_id":"","count":0,"direction":"","end_date":"","event_types":[],"offset":0,"origination_account_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/event/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_id": "",\n "bank_transfer_id": "",\n "bank_transfer_type": "",\n "client_id": "",\n "count": 0,\n "direction": "",\n "end_date": "",\n "event_types": [],\n "offset": 0,\n "origination_account_id": "",\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/event/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/event/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/list',
headers: {'content-type': 'application/json'},
body: {
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/event/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/list',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
bank_transfer_id: '',
bank_transfer_type: '',
client_id: '',
count: 0,
direction: '',
end_date: '',
event_types: [],
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/event/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","bank_transfer_id":"","bank_transfer_type":"","client_id":"","count":0,"direction":"","end_date":"","event_types":[],"offset":0,"origination_account_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_id": @"",
@"bank_transfer_id": @"",
@"bank_transfer_type": @"",
@"client_id": @"",
@"count": @0,
@"direction": @"",
@"end_date": @"",
@"event_types": @[ ],
@"offset": @0,
@"origination_account_id": @"",
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/event/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/event/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/event/list",
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([
'account_id' => '',
'bank_transfer_id' => '',
'bank_transfer_type' => '',
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'event_types' => [
],
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/event/list', [
'body' => '{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/event/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_id' => '',
'bank_transfer_id' => '',
'bank_transfer_type' => '',
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'event_types' => [
],
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_id' => '',
'bank_transfer_id' => '',
'bank_transfer_type' => '',
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'event_types' => [
],
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/event/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/event/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/event/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/event/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/event/list"
payload = {
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/event/list"
payload <- "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/event/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/event/list') do |req|
req.body = "{\n \"account_id\": \"\",\n \"bank_transfer_id\": \"\",\n \"bank_transfer_type\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"event_types\": [],\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/event/list";
let payload = json!({
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": (),
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/event/list \
--header 'content-type: application/json' \
--data '{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
echo '{
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/bank_transfer/event/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_id": "",\n "bank_transfer_id": "",\n "bank_transfer_type": "",\n "client_id": "",\n "count": 0,\n "direction": "",\n "end_date": "",\n "event_types": [],\n "offset": 0,\n "origination_account_id": "",\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/event/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_id": "",
"bank_transfer_id": "",
"bank_transfer_type": "",
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"event_types": [],
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/event/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfer_events": [
{
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"bank_transfer_amount": "12.34",
"bank_transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"bank_transfer_iso_currency_code": "USD",
"bank_transfer_type": "credit",
"direction": "outbound",
"event_id": 1,
"event_type": "pending",
"failure_reason": null,
"origination_account_id": "",
"timestamp": "2020-08-06T17:27:15Z"
}
],
"request_id": "mdqfuVxeoza6mhu"
}
POST
List bank transfers
{{baseUrl}}/bank_transfer/list
BODY json
{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/list" {:content-type :json
:form-params {:client_id ""
:count 0
:direction ""
:end_date ""
:offset 0
:origination_account_id ""
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 155
{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"direction":"","end_date":"","offset":0,"origination_account_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "direction": "",\n "end_date": "",\n "offset": 0,\n "origination_account_id": "",\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
direction: '',
end_date: '',
offset: 0,
origination_account_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"direction":"","end_date":"","offset":0,"origination_account_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"direction": @"",
@"end_date": @"",
@"offset": @0,
@"origination_account_id": @"",
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/list",
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([
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/list', [
'body' => '{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'direction' => '',
'end_date' => '',
'offset' => 0,
'origination_account_id' => '',
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/list"
payload = {
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"direction\": \"\",\n \"end_date\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/list";
let payload = json!({
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}'
echo '{
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/bank_transfer/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "direction": "",\n "end_date": "",\n "offset": 0,\n "origination_account_id": "",\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"direction": "",
"end_date": "",
"offset": 0,
"origination_account_id": "",
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfers": [
{
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"custom_tag": "my tag",
"description": "Testing2",
"direction": "outbound",
"failure_reason": {
"ach_return_code": "R13",
"description": "Invalid ACH routing number"
},
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"originator_client_id": "569ed2f36b3a3a021713abc1",
"status": "pending",
"type": "credit",
"user": {
"email_address": "plaid@plaid.com",
"legal_name": "John Smith",
"routing_number": "111111111"
}
}
],
"request_id": "saKrIBuEB9qJZno"
}
POST
List dashboard users
{{baseUrl}}/dashboard_user/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboard_user/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/dashboard_user/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/dashboard_user/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/dashboard_user/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboard_user/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboard_user/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/dashboard_user/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"client_id": "",
"cursor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/dashboard_user/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboard_user/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/dashboard_user/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/dashboard_user/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/dashboard_user/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboard_user/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/dashboard_user/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/dashboard_user/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboard_user/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/dashboard_user/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboard_user/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/dashboard_user/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/dashboard_user/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboard_user/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/dashboard_user/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/dashboard_user/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/dashboard_user/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboard_user/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboard_user/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/dashboard_user/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboard_user/list"
payload = {
"client_id": "",
"cursor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboard_user/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboard_user/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/dashboard_user/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboard_user/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/dashboard_user/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/dashboard_user/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/dashboard_user/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboard_user/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"dashboard_users": [
{
"created_at": "2020-07-24T03:26:02Z",
"email_address": "user@example.com",
"id": "54350110fedcbaf01234ffee",
"status": "active"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List e-wallet transactions
{{baseUrl}}/wallet/transaction/list
BODY json
{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/wallet/transaction/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/wallet/transaction/list" {:content-type :json
:form-params {:client_id ""
:count 0
:cursor ""
:options {:end_time ""
:start_time ""}
:secret ""
:wallet_id ""}})
require "http/client"
url = "{{baseUrl}}/wallet/transaction/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/wallet/transaction/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/wallet/transaction/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/wallet/transaction/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/wallet/transaction/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 147
{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/wallet/transaction/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/wallet/transaction/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/wallet/transaction/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/wallet/transaction/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
cursor: '',
options: {
end_time: '',
start_time: ''
},
secret: '',
wallet_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/wallet/transaction/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
cursor: '',
options: {end_time: '', start_time: ''},
secret: '',
wallet_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/wallet/transaction/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"cursor":"","options":{"end_time":"","start_time":""},"secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/wallet/transaction/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "cursor": "",\n "options": {\n "end_time": "",\n "start_time": ""\n },\n "secret": "",\n "wallet_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/wallet/transaction/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/wallet/transaction/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
cursor: '',
options: {end_time: '', start_time: ''},
secret: '',
wallet_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
cursor: '',
options: {end_time: '', start_time: ''},
secret: '',
wallet_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/wallet/transaction/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
cursor: '',
options: {
end_time: '',
start_time: ''
},
secret: '',
wallet_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/wallet/transaction/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
cursor: '',
options: {end_time: '', start_time: ''},
secret: '',
wallet_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/wallet/transaction/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"cursor":"","options":{"end_time":"","start_time":""},"secret":"","wallet_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"cursor": @"",
@"options": @{ @"end_time": @"", @"start_time": @"" },
@"secret": @"",
@"wallet_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/wallet/transaction/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/wallet/transaction/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/wallet/transaction/list",
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([
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'end_time' => '',
'start_time' => ''
],
'secret' => '',
'wallet_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/wallet/transaction/list', [
'body' => '{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/wallet/transaction/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'end_time' => '',
'start_time' => ''
],
'secret' => '',
'wallet_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'cursor' => '',
'options' => [
'end_time' => '',
'start_time' => ''
],
'secret' => '',
'wallet_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/wallet/transaction/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/wallet/transaction/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/wallet/transaction/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/wallet/transaction/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/wallet/transaction/list"
payload = {
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/wallet/transaction/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/wallet/transaction/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/wallet/transaction/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"options\": {\n \"end_time\": \"\",\n \"start_time\": \"\"\n },\n \"secret\": \"\",\n \"wallet_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/wallet/transaction/list";
let payload = json!({
"client_id": "",
"count": 0,
"cursor": "",
"options": json!({
"end_time": "",
"start_time": ""
}),
"secret": "",
"wallet_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/wallet/transaction/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}'
echo '{
"client_id": "",
"count": 0,
"cursor": "",
"options": {
"end_time": "",
"start_time": ""
},
"secret": "",
"wallet_id": ""
}' | \
http POST {{baseUrl}}/wallet/transaction/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "cursor": "",\n "options": {\n "end_time": "",\n "start_time": ""\n },\n "secret": "",\n "wallet_id": ""\n}' \
--output-document \
- {{baseUrl}}/wallet/transaction/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"cursor": "",
"options": [
"end_time": "",
"start_time": ""
],
"secret": "",
"wallet_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/wallet/transaction/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "YWJjMTIzIT8kKiYoKSctPUB",
"request_id": "4zlKapIkTm8p5KM",
"transactions": [
{
"amount": {
"iso_currency_code": "GBP",
"value": 123.12
},
"counterparty": {
"name": "John Smith",
"numbers": {
"bacs": {
"account": "31926819",
"sort_code": "601613"
}
}
},
"created_at": "2020-12-02T21:14:54Z",
"last_status_update": "2020-12-02T21:15:01Z",
"reference": "Payout 99744",
"status": "EXECUTED",
"transaction_id": "wallet-transaction-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"type": "PAYOUT",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
},
{
"amount": {
"iso_currency_code": "EUR",
"value": 456.78
},
"counterparty": {
"name": "John Smith",
"numbers": {
"international": {
"iban": "GB33BUKB20201555555555"
}
}
},
"created_at": "2020-12-02T21:14:54Z",
"last_status_update": "2020-12-02T21:15:01Z",
"reference": "Payout 99744",
"status": "EXECUTED",
"transaction_id": "wallet-transaction-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"type": "PAYOUT",
"wallet_id": "wallet-id-production-53e58b32-fc1c-46fe-bbd6-e584b27a88"
}
]
}
POST
List entity watchlist screening programs
{{baseUrl}}/watchlist_screening/entity/program/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/program/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/program/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/program/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/program/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/program/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/program/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/program/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"client_id": "",
"cursor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/program/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/program/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/program/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/program/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/program/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/program/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/program/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/program/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/program/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/program/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/program/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/program/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/program/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/program/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/program/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/program/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/program/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/program/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/program/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/program/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/program/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/program/list"
payload = {
"client_id": "",
"cursor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/program/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/program/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/program/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/program/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/program/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/program/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/program/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/program/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"entity_watchlist_programs": [
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"created_at": "2020-07-24T03:26:02Z",
"id": "entprg_2eRPsDnL66rZ7H",
"is_archived": false,
"is_rescanning_enabled": true,
"lists_enabled": [
"EU_CON"
],
"name": "Sample Program",
"name_sensitivity": "balanced"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List entity watchlist screenings
{{baseUrl}}/watchlist_screening/entity/list
BODY json
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/list" {:content-type :json
:form-params {:assignee ""
:client_id ""
:client_user_id ""
:cursor ""
:entity_watchlist_program_id ""
:secret ""
:status ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/list"),
Content = new StringContent("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/list"
payload := strings.NewReader("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 148
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/list")
.header("content-type", "application/json")
.body("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/list',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","cursor":"","entity_watchlist_program_id":"","secret":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "entity_watchlist_program_id": "",\n "secret": "",\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/list',
headers: {'content-type': 'application/json'},
body: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/list',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
cursor: '',
entity_watchlist_program_id: '',
secret: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","cursor":"","entity_watchlist_program_id":"","secret":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assignee": @"",
@"client_id": @"",
@"client_user_id": @"",
@"cursor": @"",
@"entity_watchlist_program_id": @"",
@"secret": @"",
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/list",
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([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'entity_watchlist_program_id' => '',
'secret' => '',
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/list', [
'body' => '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'entity_watchlist_program_id' => '',
'secret' => '',
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'cursor' => '',
'entity_watchlist_program_id' => '',
'secret' => '',
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/list"
payload = {
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/list"
payload <- "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/list') do |req|
req.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"secret\": \"\",\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/list";
let payload = json!({
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/list \
--header 'content-type: application/json' \
--data '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}'
echo '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "cursor": "",\n "entity_watchlist_program_id": "",\n "secret": "",\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assignee": "",
"client_id": "",
"client_user_id": "",
"cursor": "",
"entity_watchlist_program_id": "",
"secret": "",
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"entity_watchlist_screenings": [
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "entscr_52xR9LKo77r1Np",
"search_terms": {
"country": "US",
"document_number": "C31195855",
"email_address": "user@example.com",
"entity_watchlist_program_id": "entprg_2eRPsDnL66rZ7H",
"legal_name": "Al-Qaida",
"phone_number": "+14025671234",
"url": "https://example.com",
"version": 1
},
"status": "cleared"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List history for entity watchlist screenings
{{baseUrl}}/watchlist_screening/entity/history/list
BODY json
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/history/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/history/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:entity_watchlist_screening_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/history/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/history/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/history/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/history/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/history/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/history/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/history/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/history/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/history/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/history/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/history/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/history/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/history/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/history/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/history/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/history/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/history/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/history/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/history/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"entity_watchlist_screening_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/history/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/history/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/history/list",
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([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/history/list', [
'body' => '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/history/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/history/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/history/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/history/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/history/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/history/list"
payload = {
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/history/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/history/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/history/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/history/list";
let payload = json!({
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/history/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/history/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/history/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/history/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"entity_watchlist_screenings": [
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "entscr_52xR9LKo77r1Np",
"search_terms": {
"country": "US",
"document_number": "C31195855",
"email_address": "user@example.com",
"entity_watchlist_program_id": "entprg_2eRPsDnL66rZ7H",
"legal_name": "Al-Qaida",
"phone_number": "+14025671234",
"url": "https://example.com",
"version": 1
},
"status": "cleared"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List history for individual watchlist screenings
{{baseUrl}}/watchlist_screening/individual/history/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/history/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/history/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/history/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/history/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/history/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/history/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/history/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 85
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/history/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/history/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/history/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/history/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/history/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/history/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/history/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/history/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/history/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/history/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/history/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/history/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/history/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/history/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/history/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/history/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/history/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/history/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/history/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/history/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/history/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/history/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/history/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/history/list"
payload = {
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/history/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/history/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/history/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/history/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/history/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/history/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/history/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/history/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng",
"watchlist_screenings": [
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "scr_52xR9LKo77r1Np",
"search_terms": {
"country": "US",
"date_of_birth": "1990-05-29",
"document_number": "C31195855",
"legal_name": "Aleksey Potemkin",
"version": 1,
"watchlist_program_id": "prg_2eRPsDnL66rZ7H"
},
"status": "cleared"
}
]
}
POST
List hits for entity watchlist screenings
{{baseUrl}}/watchlist_screening/entity/hit/list
BODY json
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/hit/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/hit/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:entity_watchlist_screening_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/hit/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/hit/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/hit/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/hit/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/hit/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/hit/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/hit/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/hit/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/hit/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/hit/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/hit/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/hit/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/hit/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/hit/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/hit/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/hit/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/hit/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/hit/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/hit/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"entity_watchlist_screening_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/hit/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/hit/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/hit/list",
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([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/hit/list', [
'body' => '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/hit/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/hit/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/hit/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/hit/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/hit/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/hit/list"
payload = {
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/hit/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/hit/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/hit/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/hit/list";
let payload = json!({
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/hit/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/hit/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/hit/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/hit/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"entity_watchlist_screening_hits": [
{
"analysis": {
"documents": "match",
"email_addresses": "match",
"locations": "match",
"names": "match",
"phone_numbers": "match",
"search_terms_version": 1,
"urls": "match"
},
"data": {
"documents": [
{
"analysis": {
"summary": "match"
},
"data": {
"number": "C31195855",
"type": "swift"
}
}
],
"email_addresses": [
{
"analysis": {
"summary": "match"
},
"data": {
"email_address": "user@example.com"
}
}
],
"locations": [
{
"analysis": {
"summary": "match"
},
"data": {
"country": "US",
"full": "Florida, US"
}
}
],
"names": [
{
"analysis": {
"summary": "match"
},
"data": {
"full": "Al Qaida",
"is_primary": false,
"weak_alias_determination": "none"
}
}
],
"phone_numbers": [
{
"analysis": {
"summary": "match"
},
"data": {
"phone_number": "+14025671234",
"type": "phone"
}
}
],
"urls": [
{
"analysis": {
"summary": "match"
},
"data": {
"url": "https://example.com"
}
}
]
},
"first_active": "2020-07-24T03:26:02Z",
"historical_since": "2020-07-24T03:26:02Z",
"id": "enthit_52xR9LKo77r1Np",
"inactive_since": "2020-07-24T03:26:02Z",
"list_code": "EU_CON",
"plaid_uid": "uid_3NggckTimGSJHS",
"review_status": "pending_review",
"source_uid": "26192ABC"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List hits for individual watchlist screening
{{baseUrl}}/watchlist_screening/individual/hit/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/hit/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/hit/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/hit/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/hit/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/hit/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/hit/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/hit/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 85
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/hit/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/hit/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/hit/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/hit/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/hit/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/hit/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/hit/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/hit/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/hit/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/hit/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/hit/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/hit/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/hit/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/hit/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/hit/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/hit/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/hit/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/hit/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/hit/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/hit/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/hit/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/hit/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/hit/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/hit/list"
payload = {
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/hit/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/hit/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/hit/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/hit/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/hit/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/hit/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/hit/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/hit/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng",
"watchlist_screening_hits": [
{
"analysis": {
"dates_of_birth": "match",
"documents": "match",
"locations": "match",
"names": "match",
"search_terms_version": 1
},
"data": {
"dates_of_birth": [
{
"analysis": {
"summary": "match"
},
"data": {
"beginning": "1990-05-29",
"ending": "1990-05-29"
}
}
],
"documents": [
{
"analysis": {
"summary": "match"
},
"data": {
"number": "C31195855",
"type": "passport"
}
}
],
"locations": [
{
"analysis": {
"summary": "match"
},
"data": {
"country": "US",
"full": "Florida, US"
}
}
],
"names": [
{
"analysis": {
"summary": "match"
},
"data": {
"full": "Aleksey Potemkin",
"is_primary": false,
"weak_alias_determination": "none"
}
}
]
},
"first_active": "2020-07-24T03:26:02Z",
"historical_since": "2020-07-24T03:26:02Z",
"id": "scrhit_52xR9LKo77r1Np",
"inactive_since": "2020-07-24T03:26:02Z",
"list_code": "US_SDN",
"plaid_uid": "uid_3NggckTimGSJHS",
"review_status": "pending_review",
"source_uid": "26192ABC"
}
]
}
POST
List individual watchlist screening programs
{{baseUrl}}/watchlist_screening/individual/program/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/program/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/program/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/program/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/program/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/program/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/program/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/program/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 53
{
"client_id": "",
"cursor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/program/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/program/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/program/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/program/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/program/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/program/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/program/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/program/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/program/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/program/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/program/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/program/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/program/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/program/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/program/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/program/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/program/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/program/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/program/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/program/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/program/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/program/list"
payload = {
"client_id": "",
"cursor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/program/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/program/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/program/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/program/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/program/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/program/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/program/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/program/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng",
"watchlist_programs": [
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"created_at": "2020-07-24T03:26:02Z",
"id": "prg_2eRPsDnL66rZ7H",
"is_archived": false,
"is_rescanning_enabled": true,
"lists_enabled": [
"US_SDN"
],
"name": "Sample Program",
"name_sensitivity": "balanced"
}
]
}
POST
List payment recipients
{{baseUrl}}/payment_initiation/recipient/list
BODY json
{
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/recipient/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/recipient/list" {:content-type :json
:form-params {:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/recipient/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/recipient/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/recipient/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/recipient/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/recipient/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/recipient/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/recipient/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/recipient/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/recipient/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/recipient/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/recipient/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/recipient/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/recipient/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/recipient/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/recipient/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/recipient/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/recipient/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/recipient/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/recipient/list",
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([
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/recipient/list', [
'body' => '{
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/recipient/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/recipient/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/recipient/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/recipient/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/recipient/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/recipient/list"
payload = {
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/recipient/list"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/recipient/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/recipient/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/recipient/list";
let payload = json!({
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/recipient/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/recipient/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/recipient/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/recipient/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"recipients": [
{
"address": {
"city": "London",
"country": "GB",
"postal_code": "SE14 8JW",
"street": [
"96 Guild Street",
"9th Floor"
]
},
"iban": "GB29NWBK60161331926819",
"name": "Wonder Wallet",
"recipient_id": "recipient-id-sandbox-9b6b4679-914b-445b-9450-efbdb80296f6"
}
],
"request_id": "4zlKapIkTm8p5KM"
}
POST
List payments
{{baseUrl}}/payment_initiation/payment/list
BODY json
{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/payment/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/payment/list" {:content-type :json
:form-params {:client_id ""
:consent_id ""
:count 0
:cursor ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/payment/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/payment/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/payment/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/payment/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/payment/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 87
{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/payment/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/payment/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/payment/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
consent_id: '',
count: 0,
cursor: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/payment/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', count: 0, cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/payment/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","count":0,"cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/payment/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "consent_id": "",\n "count": 0,\n "cursor": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/payment/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', consent_id: '', count: 0, cursor: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', consent_id: '', count: 0, cursor: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/payment/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
consent_id: '',
count: 0,
cursor: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', count: 0, cursor: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/payment/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","count":0,"cursor":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"consent_id": @"",
@"count": @0,
@"cursor": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/payment/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/payment/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/payment/list",
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([
'client_id' => '',
'consent_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/payment/list', [
'body' => '{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/payment/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'consent_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'consent_id' => '',
'count' => 0,
'cursor' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/payment/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/payment/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/payment/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/payment/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/payment/list"
payload = {
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/payment/list"
payload <- "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/payment/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/payment/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"count\": 0,\n \"cursor\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/payment/list";
let payload = json!({
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/payment/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}'
echo '{
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/payment/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "consent_id": "",\n "count": 0,\n "cursor": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/payment/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"consent_id": "",
"count": 0,
"cursor": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/payment/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "2020-01-01T00:00:00Z",
"payments": [
{
"amount": {
"currency": "GBP",
"value": 100
},
"bacs": {
"account": "31926819",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"sort_code": "601613"
},
"iban": null,
"last_status_update": "2019-11-06T21:10:52Z",
"payment_id": "payment-id-sandbox-feca8a7a-5591-4aef-9297-f3062bb735d3",
"recipient_id": "recipient-id-sandbox-9b6b4679-914b-445b-9450-efbdb80296f6",
"reference": "Account Funding 99744",
"status": "PAYMENT_STATUS_INPUT_NEEDED"
}
],
"request_id": "aEAQmewMzlVa1k6"
}
POST
List recurring transfers
{{baseUrl}}/transfer/recurring/list
BODY json
{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/recurring/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/recurring/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_time ""
:funding_account_id ""
:offset 0
:secret ""
:start_time ""}})
require "http/client"
url = "{{baseUrl}}/transfer/recurring/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/recurring/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/recurring/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/recurring/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/recurring/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 132
{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/recurring/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/recurring/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/recurring/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/recurring/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/recurring/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/recurring/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_time":"","funding_account_id":"","offset":0,"secret":"","start_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/recurring/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_time": "",\n "funding_account_id": "",\n "offset": 0,\n "secret": "",\n "start_time": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/recurring/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/recurring/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/recurring/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_time: '',
funding_account_id: '',
offset: 0,
secret: '',
start_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/recurring/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_time":"","funding_account_id":"","offset":0,"secret":"","start_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_time": @"",
@"funding_account_id": @"",
@"offset": @0,
@"secret": @"",
@"start_time": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/recurring/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/recurring/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/recurring/list",
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([
'client_id' => '',
'count' => 0,
'end_time' => '',
'funding_account_id' => '',
'offset' => 0,
'secret' => '',
'start_time' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/recurring/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/recurring/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_time' => '',
'funding_account_id' => '',
'offset' => 0,
'secret' => '',
'start_time' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_time' => '',
'funding_account_id' => '',
'offset' => 0,
'secret' => '',
'start_time' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/recurring/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/recurring/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/recurring/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/recurring/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/recurring/list"
payload = {
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/recurring/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/recurring/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/recurring/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/recurring/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/recurring/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
}' | \
http POST {{baseUrl}}/transfer/recurring/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_time": "",\n "funding_account_id": "",\n "offset": 0,\n "secret": "",\n "start_time": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/recurring/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_time": "",
"funding_account_id": "",
"offset": 0,
"secret": "",
"start_time": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/recurring/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"recurring_transfers": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"created": "2022-07-05T12:48:37Z",
"description": "payment",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"iso_currency_code": "USD",
"network": "ach",
"next_origination_date": "2022-10-28",
"origination_account_id": "",
"recurring_transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"schedule": {
"end_date": "2023-10-01",
"interval_count": 1,
"interval_execution_day": 5,
"interval_unit": "week",
"start_date": "2022-10-01"
},
"status": "active",
"test_clock_id": null,
"transfer_ids": [
"4242fc8d-3ec6-fb38-fa0c-a8e37d03cd57"
],
"type": "debit",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
],
"request_id": "saKrIBuEB9qJZno"
}
POST
List reviews for entity watchlist screenings
{{baseUrl}}/watchlist_screening/entity/review/list
BODY json
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/review/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/review/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:entity_watchlist_screening_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/review/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/review/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/review/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/review/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/review/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92
{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/review/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/review/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/review/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/review/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/review/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/review/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/review/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/review/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/review/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/review/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
entity_watchlist_screening_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/review/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', entity_watchlist_screening_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/review/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","entity_watchlist_screening_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"entity_watchlist_screening_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/review/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/review/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/review/list",
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([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/review/list', [
'body' => '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/review/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'entity_watchlist_screening_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/review/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/review/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/review/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/review/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/review/list"
payload = {
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/review/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/review/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/review/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/review/list";
let payload = json!({
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/review/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/review/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "entity_watchlist_screening_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/review/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"entity_watchlist_screening_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/review/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"entity_watchlist_screening_reviews": [
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"comment": "These look like legitimate matches, rejecting the customer.",
"confirmed_hits": [
"enthit_52xR9LKo77r1Np"
],
"dismissed_hits": [
"enthit_52xR9LKo77r1Np"
],
"id": "entrev_aCLNRxK3UVzn2r"
}
],
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng"
}
POST
List reviews for individual watchlist screenings
{{baseUrl}}/watchlist_screening/individual/review/list
BODY json
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/review/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/review/list" {:content-type :json
:form-params {:client_id ""
:cursor ""
:secret ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/review/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/review/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/review/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/review/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/review/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 85
{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/review/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/review/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/review/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/review/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/review/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/review/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/review/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/review/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/review/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/review/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
cursor: '',
secret: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/review/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', cursor: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/review/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","cursor":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"cursor": @"",
@"secret": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/review/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/review/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/review/list",
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([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/review/list', [
'body' => '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/review/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'cursor' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/review/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/review/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/review/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/review/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/review/list"
payload = {
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/review/list"
payload <- "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/review/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/review/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"cursor\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/review/list";
let payload = json!({
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/review/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}'
echo '{
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/review/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "cursor": "",\n "secret": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/review/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"cursor": "",
"secret": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/review/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"next_cursor": "eyJkaXJlY3Rpb24iOiJuZXh0Iiwib2Zmc2V0IjoiMTU5NDM",
"request_id": "saKrIBuEB9qJZng",
"watchlist_screening_reviews": [
{
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"comment": "These look like legitimate matches, rejecting the customer.",
"confirmed_hits": [
"scrhit_52xR9LKo77r1Np"
],
"dismissed_hits": [
"scrhit_52xR9LKo77r1Np"
],
"id": "rev_aCLNRxK3UVzn2r"
}
]
}
POST
List sweeps (POST)
{{baseUrl}}/transfer/sweep/list
BODY json
{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/sweep/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/sweep/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_date ""
:funding_account_id ""
:offset 0
:originator_client_id ""
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/transfer/sweep/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/sweep/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/sweep/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/sweep/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/sweep/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 162
{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/sweep/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/sweep/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/sweep/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/sweep/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/sweep/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/sweep/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","funding_account_id":"","offset":0,"originator_client_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/sweep/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "funding_account_id": "",\n "offset": 0,\n "originator_client_id": "",\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/sweep/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/sweep/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/sweep/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
originator_client_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/sweep/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","funding_account_id":"","offset":0,"originator_client_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_date": @"",
@"funding_account_id": @"",
@"offset": @0,
@"originator_client_id": @"",
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/sweep/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/sweep/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/sweep/list",
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([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/sweep/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/sweep/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/sweep/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/sweep/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/sweep/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/sweep/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/sweep/list"
payload = {
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/sweep/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/sweep/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/sweep/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/sweep/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/sweep/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/transfer/sweep/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "funding_account_id": "",\n "offset": 0,\n "originator_client_id": "",\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/sweep/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"originator_client_id": "",
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/sweep/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"sweeps": [
{
"amount": "-12.34",
"created": "2019-12-09T17:27:15Z",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"id": "d5394a4d-0b04-4a02-9f4a-7ca5c0f52f9d",
"iso_currency_code": "USD",
"originator_client_id": null,
"settled": "2019-12-10"
}
]
}
POST
List sweeps
{{baseUrl}}/bank_transfer/sweep/list
BODY json
{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/sweep/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/sweep/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_time ""
:origination_account_id ""
:secret ""
:start_time ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/sweep/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/sweep/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/sweep/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/sweep/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/sweep/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 121
{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/sweep/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/sweep/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/sweep/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/sweep/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/sweep/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/sweep/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_time":"","origination_account_id":"","secret":"","start_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/sweep/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_time": "",\n "origination_account_id": "",\n "secret": "",\n "start_time": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/sweep/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/sweep/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/sweep/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_time: '',
origination_account_id: '',
secret: '',
start_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/sweep/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_time":"","origination_account_id":"","secret":"","start_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_time": @"",
@"origination_account_id": @"",
@"secret": @"",
@"start_time": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/sweep/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/sweep/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/sweep/list",
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([
'client_id' => '',
'count' => 0,
'end_time' => '',
'origination_account_id' => '',
'secret' => '',
'start_time' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/sweep/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/sweep/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_time' => '',
'origination_account_id' => '',
'secret' => '',
'start_time' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_time' => '',
'origination_account_id' => '',
'secret' => '',
'start_time' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/sweep/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/sweep/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/sweep/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/sweep/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/sweep/list"
payload = {
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/sweep/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/sweep/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/sweep/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_time\": \"\",\n \"origination_account_id\": \"\",\n \"secret\": \"\",\n \"start_time\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/sweep/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/sweep/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
}' | \
http POST {{baseUrl}}/bank_transfer/sweep/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_time": "",\n "origination_account_id": "",\n "secret": "",\n "start_time": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/sweep/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_time": "",
"origination_account_id": "",
"secret": "",
"start_time": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/sweep/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"sweeps": [
{
"amount": "12.34",
"created_at": "2020-08-06T17:27:15Z",
"id": "d5394a4d-0b04-4a02-9f4a-7ca5c0f52f9d",
"iso_currency_code": "USD"
}
]
}
POST
List test clocks
{{baseUrl}}/sandbox/transfer/test_clock/list
BODY json
{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/test_clock/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/test_clock/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_virtual_time ""
:offset 0
:secret ""
:start_virtual_time ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/test_clock/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/test_clock/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/test_clock/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/test_clock/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/test_clock/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/test_clock/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/test_clock/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/test_clock/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/test_clock/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/test_clock/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_virtual_time":"","offset":0,"secret":"","start_virtual_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/test_clock/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_virtual_time": "",\n "offset": 0,\n "secret": "",\n "start_virtual_time": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/test_clock/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/test_clock/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/test_clock/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/test_clock/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_virtual_time: '',
offset: 0,
secret: '',
start_virtual_time: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/test_clock/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_virtual_time":"","offset":0,"secret":"","start_virtual_time":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_virtual_time": @"",
@"offset": @0,
@"secret": @"",
@"start_virtual_time": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/test_clock/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/test_clock/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/test_clock/list",
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([
'client_id' => '',
'count' => 0,
'end_virtual_time' => '',
'offset' => 0,
'secret' => '',
'start_virtual_time' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/test_clock/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/test_clock/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_virtual_time' => '',
'offset' => 0,
'secret' => '',
'start_virtual_time' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_virtual_time' => '',
'offset' => 0,
'secret' => '',
'start_virtual_time' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/test_clock/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/test_clock/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/test_clock/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/test_clock/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/test_clock/list"
payload = {
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/test_clock/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/test_clock/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/test_clock/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_virtual_time\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_virtual_time\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/test_clock/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/test_clock/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/test_clock/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_virtual_time": "",\n "offset": 0,\n "secret": "",\n "start_virtual_time": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/test_clock/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_virtual_time": "",
"offset": 0,
"secret": "",
"start_virtual_time": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/test_clock/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"test_clocks": [
{
"test_clock_id": "b33a6eda-5e97-5d64-244a-a9274110151c",
"virtual_time": "2006-01-02T15:04:05Z"
},
{
"test_clock_id": "a33a6eda-5e97-5d64-244a-a9274110152d",
"virtual_time": "2006-02-02T15:04:05Z"
}
]
}
POST
List the returns included in a repayment
{{baseUrl}}/transfer/repayment/return/list
BODY json
{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/repayment/return/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/repayment/return/list" {:content-type :json
:form-params {:client_id ""
:count 0
:offset 0
:repayment_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/repayment/return/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/repayment/return/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/repayment/return/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/repayment/return/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/repayment/return/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 88
{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/repayment/return/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/repayment/return/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/repayment/return/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/repayment/return/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
offset: 0,
repayment_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/repayment/return/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/return/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, offset: 0, repayment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/repayment/return/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"offset":0,"repayment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/repayment/return/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "offset": 0,\n "repayment_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/repayment/return/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/repayment/return/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', count: 0, offset: 0, repayment_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/return/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', count: 0, offset: 0, repayment_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/repayment/return/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
offset: 0,
repayment_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/return/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, offset: 0, repayment_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/repayment/return/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"offset":0,"repayment_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"offset": @0,
@"repayment_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/repayment/return/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/repayment/return/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/repayment/return/list",
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([
'client_id' => '',
'count' => 0,
'offset' => 0,
'repayment_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/repayment/return/list', [
'body' => '{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/repayment/return/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'offset' => 0,
'repayment_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'offset' => 0,
'repayment_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/repayment/return/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/repayment/return/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/repayment/return/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/repayment/return/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/repayment/return/list"
payload = {
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/repayment/return/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/repayment/return/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/repayment/return/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"offset\": 0,\n \"repayment_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/repayment/return/list";
let payload = json!({
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/repayment/return/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/repayment/return/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "offset": 0,\n "repayment_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/repayment/return/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"offset": 0,
"repayment_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/repayment/return/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"repayment_returns": [
{
"amount": "12.34",
"event_id": 5,
"iso_currency_code": "USD",
"transfer_id": "d4bfce70-2470-4298-ae87-5e9b3e18bfaf"
}
],
"request_id": "Ay70UHyBmbY0wUf"
}
POST
List transfer events
{{baseUrl}}/transfer/event/list
BODY json
{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/event/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/event/list" {:content-type :json
:form-params {:account_id ""
:client_id ""
:count 0
:end_date ""
:event_types []
:funding_account_id ""
:offset 0
:origination_account_id ""
:originator_client_id ""
:secret ""
:start_date ""
:sweep_id ""
:transfer_id ""
:transfer_type ""}})
require "http/client"
url = "{{baseUrl}}/transfer/event/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/event/list"),
Content = new StringContent("{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/event/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/event/list"
payload := strings.NewReader("{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/event/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 297
{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/event/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/event/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/event/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/event/list")
.header("content-type", "application/json")
.body("{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}")
.asString();
const data = JSON.stringify({
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/event/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/list',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/event/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","client_id":"","count":0,"end_date":"","event_types":[],"funding_account_id":"","offset":0,"origination_account_id":"","originator_client_id":"","secret":"","start_date":"","sweep_id":"","transfer_id":"","transfer_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/event/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_id": "",\n "client_id": "",\n "count": 0,\n "end_date": "",\n "event_types": [],\n "funding_account_id": "",\n "offset": 0,\n "origination_account_id": "",\n "originator_client_id": "",\n "secret": "",\n "start_date": "",\n "sweep_id": "",\n "transfer_id": "",\n "transfer_type": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/event/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/event/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/list',
headers: {'content-type': 'application/json'},
body: {
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/event/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/list',
headers: {'content-type': 'application/json'},
data: {
account_id: '',
client_id: '',
count: 0,
end_date: '',
event_types: [],
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: '',
sweep_id: '',
transfer_id: '',
transfer_type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/event/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_id":"","client_id":"","count":0,"end_date":"","event_types":[],"funding_account_id":"","offset":0,"origination_account_id":"","originator_client_id":"","secret":"","start_date":"","sweep_id":"","transfer_id":"","transfer_type":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_id": @"",
@"client_id": @"",
@"count": @0,
@"end_date": @"",
@"event_types": @[ ],
@"funding_account_id": @"",
@"offset": @0,
@"origination_account_id": @"",
@"originator_client_id": @"",
@"secret": @"",
@"start_date": @"",
@"sweep_id": @"",
@"transfer_id": @"",
@"transfer_type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/event/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/event/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/event/list",
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([
'account_id' => '',
'client_id' => '',
'count' => 0,
'end_date' => '',
'event_types' => [
],
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => '',
'sweep_id' => '',
'transfer_id' => '',
'transfer_type' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/event/list', [
'body' => '{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/event/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_id' => '',
'client_id' => '',
'count' => 0,
'end_date' => '',
'event_types' => [
],
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => '',
'sweep_id' => '',
'transfer_id' => '',
'transfer_type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_id' => '',
'client_id' => '',
'count' => 0,
'end_date' => '',
'event_types' => [
],
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => '',
'sweep_id' => '',
'transfer_id' => '',
'transfer_type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/event/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/event/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/event/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/event/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/event/list"
payload = {
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/event/list"
payload <- "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/event/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/event/list') do |req|
req.body = "{\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"event_types\": [],\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\",\n \"sweep_id\": \"\",\n \"transfer_id\": \"\",\n \"transfer_type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/event/list";
let payload = json!({
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": (),
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/event/list \
--header 'content-type: application/json' \
--data '{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}'
echo '{
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
}' | \
http POST {{baseUrl}}/transfer/event/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_id": "",\n "client_id": "",\n "count": 0,\n "end_date": "",\n "event_types": [],\n "funding_account_id": "",\n "offset": 0,\n "origination_account_id": "",\n "originator_client_id": "",\n "secret": "",\n "start_date": "",\n "sweep_id": "",\n "transfer_id": "",\n "transfer_type": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/event/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_id": "",
"client_id": "",
"count": 0,
"end_date": "",
"event_types": [],
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": "",
"sweep_id": "",
"transfer_id": "",
"transfer_type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/event/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"transfer_events": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"event_id": 1,
"event_type": "posted",
"failure_reason": null,
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"origination_account_id": "",
"originator_client_id": "569ed2f36b3a3a021713abc1",
"refund_id": null,
"sweep_amount": null,
"sweep_id": null,
"timestamp": "2019-12-09T17:27:15Z",
"transfer_amount": "12.34",
"transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"transfer_type": "credit"
}
]
}
POST
List transfers
{{baseUrl}}/transfer/list
BODY json
{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_date ""
:funding_account_id ""
:offset 0
:origination_account_id ""
:originator_client_id ""
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/transfer/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 194
{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","funding_account_id":"","offset":0,"origination_account_id":"","originator_client_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "funding_account_id": "",\n "offset": 0,\n "origination_account_id": "",\n "originator_client_id": "",\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/list',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/list',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
count: 0,
end_date: '',
funding_account_id: '',
offset: 0,
origination_account_id: '',
originator_client_id: '',
secret: '',
start_date: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","funding_account_id":"","offset":0,"origination_account_id":"","originator_client_id":"","secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_date": @"",
@"funding_account_id": @"",
@"offset": @0,
@"origination_account_id": @"",
@"originator_client_id": @"",
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/list",
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([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'funding_account_id' => '',
'offset' => 0,
'origination_account_id' => '',
'originator_client_id' => '',
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/list"
payload = {
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"funding_account_id\": \"\",\n \"offset\": 0,\n \"origination_account_id\": \"\",\n \"originator_client_id\": \"\",\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/transfer/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "funding_account_id": "",\n "offset": 0,\n "origination_account_id": "",\n "originator_client_id": "",\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_date": "",
"funding_account_id": "",
"offset": 0,
"origination_account_id": "",
"originator_client_id": "",
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"transfers": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2019-12-09T17:27:15Z",
"description": "Desc",
"expected_settlement_date": "2020-08-04",
"failure_reason": {
"ach_return_code": "R13",
"description": "Invalid ACH routing number"
},
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"guarantee_decision": null,
"guarantee_decision_rationale": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "",
"originator_client_id": null,
"recurring_transfer_id": null,
"refunds": [],
"standard_return_window": "2020-08-07",
"status": "pending",
"type": "credit",
"unauthorized_return_window": "2020-10-07",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
]
}
POST
Lists historical repayments
{{baseUrl}}/transfer/repayment/list
BODY json
{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/repayment/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/repayment/list" {:content-type :json
:form-params {:client_id ""
:count 0
:end_date ""
:offset 0
:secret ""
:start_date ""}})
require "http/client"
url = "{{baseUrl}}/transfer/repayment/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/repayment/list"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/repayment/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/repayment/list"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/repayment/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104
{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/repayment/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/repayment/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/repayment/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/repayment/list")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
count: 0,
end_date: '',
offset: 0,
secret: '',
start_date: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/repayment/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, end_date: '', offset: 0, secret: '', start_date: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/repayment/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","offset":0,"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/repayment/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "offset": 0,\n "secret": "",\n "start_date": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/repayment/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/repayment/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', count: 0, end_date: '', offset: 0, secret: '', start_date: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/list',
headers: {'content-type': 'application/json'},
body: {client_id: '', count: 0, end_date: '', offset: 0, secret: '', start_date: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/repayment/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
count: 0,
end_date: '',
offset: 0,
secret: '',
start_date: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/repayment/list',
headers: {'content-type': 'application/json'},
data: {client_id: '', count: 0, end_date: '', offset: 0, secret: '', start_date: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/repayment/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","count":0,"end_date":"","offset":0,"secret":"","start_date":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"count": @0,
@"end_date": @"",
@"offset": @0,
@"secret": @"",
@"start_date": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/repayment/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/repayment/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/repayment/list",
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([
'client_id' => '',
'count' => 0,
'end_date' => '',
'offset' => 0,
'secret' => '',
'start_date' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/repayment/list', [
'body' => '{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/repayment/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'offset' => 0,
'secret' => '',
'start_date' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'count' => 0,
'end_date' => '',
'offset' => 0,
'secret' => '',
'start_date' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/repayment/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/repayment/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/repayment/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/repayment/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/repayment/list"
payload = {
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/repayment/list"
payload <- "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/repayment/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/repayment/list') do |req|
req.body = "{\n \"client_id\": \"\",\n \"count\": 0,\n \"end_date\": \"\",\n \"offset\": 0,\n \"secret\": \"\",\n \"start_date\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/repayment/list";
let payload = json!({
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/repayment/list \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}'
echo '{
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
}' | \
http POST {{baseUrl}}/transfer/repayment/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "count": 0,\n "end_date": "",\n "offset": 0,\n "secret": "",\n "start_date": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/repayment/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"count": 0,
"end_date": "",
"offset": 0,
"secret": "",
"start_date": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/repayment/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"repayments": [
{
"amount": "12.34",
"created": "2019-12-09T12:34:56Z",
"iso_currency_code": "USD",
"repayment_id": "d4bfce70-2470-4298-ae87-5e9b3e18bfaf"
}
],
"request_id": "h0dvmW8g4r2Z0KX"
}
POST
Manually fire a Bank Transfer webhook
{{baseUrl}}/sandbox/bank_transfer/fire_webhook
BODY json
{
"client_id": "",
"secret": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/bank_transfer/fire_webhook");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/bank_transfer/fire_webhook" {:content-type :json
:form-params {:client_id ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/bank_transfer/fire_webhook"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/bank_transfer/fire_webhook"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/bank_transfer/fire_webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/bank_transfer/fire_webhook"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/bank_transfer/fire_webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"client_id": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/bank_transfer/fire_webhook")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/bank_transfer/fire_webhook"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/bank_transfer/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/bank_transfer/fire_webhook")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/bank_transfer/fire_webhook');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/fire_webhook',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/bank_transfer/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/bank_transfer/fire_webhook',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/bank_transfer/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/bank_transfer/fire_webhook',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', webhook: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/fire_webhook',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', webhook: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/bank_transfer/fire_webhook');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/fire_webhook',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/bank_transfer/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/bank_transfer/fire_webhook"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/bank_transfer/fire_webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/bank_transfer/fire_webhook",
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([
'client_id' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/bank_transfer/fire_webhook', [
'body' => '{
"client_id": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/bank_transfer/fire_webhook');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/bank_transfer/fire_webhook');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/bank_transfer/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/bank_transfer/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/bank_transfer/fire_webhook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/bank_transfer/fire_webhook"
payload = {
"client_id": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/bank_transfer/fire_webhook"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/bank_transfer/fire_webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/bank_transfer/fire_webhook') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/bank_transfer/fire_webhook";
let payload = json!({
"client_id": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/bank_transfer/fire_webhook \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"webhook": ""
}'
echo '{
"client_id": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/sandbox/bank_transfer/fire_webhook \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/bank_transfer/fire_webhook
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/bank_transfer/fire_webhook")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Manually fire a Transfer webhook
{{baseUrl}}/sandbox/transfer/fire_webhook
BODY json
{
"client_id": "",
"secret": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/fire_webhook");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/fire_webhook" {:content-type :json
:form-params {:client_id ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/fire_webhook"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/fire_webhook"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/fire_webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/fire_webhook"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/fire_webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54
{
"client_id": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/fire_webhook")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/fire_webhook"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/fire_webhook")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/fire_webhook');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/fire_webhook',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/fire_webhook',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/fire_webhook',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', webhook: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/fire_webhook',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', webhook: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/fire_webhook');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/fire_webhook',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/fire_webhook"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/fire_webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/fire_webhook",
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([
'client_id' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/fire_webhook', [
'body' => '{
"client_id": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/fire_webhook');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/fire_webhook');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/fire_webhook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/fire_webhook"
payload = {
"client_id": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/fire_webhook"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/fire_webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/fire_webhook') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/fire_webhook";
let payload = json!({
"client_id": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/fire_webhook \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"webhook": ""
}'
echo '{
"client_id": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/fire_webhook \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/fire_webhook
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/fire_webhook")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Manually fire an Income webhook
{{baseUrl}}/sandbox/income/fire_webhook
BODY json
{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/income/fire_webhook");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/income/fire_webhook" {:content-type :json
:form-params {:client_id ""
:item_id ""
:secret ""
:user_id ""
:verification_status ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/income/fire_webhook"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/income/fire_webhook"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/income/fire_webhook");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/income/fire_webhook"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/income/fire_webhook HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 117
{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/income/fire_webhook")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/income/fire_webhook"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/income/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/income/fire_webhook")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/income/fire_webhook');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/income/fire_webhook',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/income/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","item_id":"","secret":"","user_id":"","verification_status":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/income/fire_webhook',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "item_id": "",\n "secret": "",\n "user_id": "",\n "verification_status": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/income/fire_webhook")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/income/fire_webhook',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/income/fire_webhook',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/income/fire_webhook');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/income/fire_webhook',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
item_id: '',
secret: '',
user_id: '',
verification_status: '',
webhook: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/income/fire_webhook';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","item_id":"","secret":"","user_id":"","verification_status":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"item_id": @"",
@"secret": @"",
@"user_id": @"",
@"verification_status": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/income/fire_webhook"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/income/fire_webhook" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/income/fire_webhook",
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([
'client_id' => '',
'item_id' => '',
'secret' => '',
'user_id' => '',
'verification_status' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/income/fire_webhook', [
'body' => '{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/income/fire_webhook');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'item_id' => '',
'secret' => '',
'user_id' => '',
'verification_status' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'item_id' => '',
'secret' => '',
'user_id' => '',
'verification_status' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/income/fire_webhook');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/income/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/income/fire_webhook' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/income/fire_webhook", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/income/fire_webhook"
payload = {
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/income/fire_webhook"
payload <- "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/income/fire_webhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/income/fire_webhook') do |req|
req.body = "{\n \"client_id\": \"\",\n \"item_id\": \"\",\n \"secret\": \"\",\n \"user_id\": \"\",\n \"verification_status\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/income/fire_webhook";
let payload = json!({
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/income/fire_webhook \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}'
echo '{
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/sandbox/income/fire_webhook \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "item_id": "",\n "secret": "",\n "user_id": "",\n "verification_status": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/income/fire_webhook
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"item_id": "",
"secret": "",
"user_id": "",
"verification_status": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/income/fire_webhook")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Migrate account into Bank Transfers
{{baseUrl}}/bank_transfer/migrate_account
BODY json
{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/migrate_account");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/migrate_account" {:content-type :json
:form-params {:account_number ""
:account_type ""
:client_id ""
:routing_number ""
:secret ""
:wire_routing_number ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/migrate_account"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/migrate_account"),
Content = new StringContent("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/migrate_account");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/migrate_account"
payload := strings.NewReader("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/migrate_account HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 136
{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/migrate_account")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/migrate_account"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/migrate_account")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/migrate_account")
.header("content-type", "application/json")
.body("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
.asString();
const data = JSON.stringify({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/migrate_account');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/migrate_account',
headers: {'content-type': 'application/json'},
data: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/migrate_account';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_number":"","account_type":"","client_id":"","routing_number":"","secret":"","wire_routing_number":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/migrate_account',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_number": "",\n "account_type": "",\n "client_id": "",\n "routing_number": "",\n "secret": "",\n "wire_routing_number": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/migrate_account")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/migrate_account',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/migrate_account',
headers: {'content-type': 'application/json'},
body: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/migrate_account');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/migrate_account',
headers: {'content-type': 'application/json'},
data: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/migrate_account';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_number":"","account_type":"","client_id":"","routing_number":"","secret":"","wire_routing_number":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_number": @"",
@"account_type": @"",
@"client_id": @"",
@"routing_number": @"",
@"secret": @"",
@"wire_routing_number": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/migrate_account"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/migrate_account" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/migrate_account",
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([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/migrate_account', [
'body' => '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/migrate_account');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/migrate_account');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/migrate_account' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/migrate_account' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/migrate_account", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/migrate_account"
payload = {
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/migrate_account"
payload <- "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/migrate_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/migrate_account') do |req|
req.body = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/migrate_account";
let payload = json!({
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/migrate_account \
--header 'content-type: application/json' \
--data '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
echo '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}' | \
http POST {{baseUrl}}/bank_transfer/migrate_account \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_number": "",\n "account_type": "",\n "client_id": "",\n "routing_number": "",\n "secret": "",\n "wire_routing_number": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/migrate_account
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/migrate_account")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"access_token": "access-sandbox-435beced-94e8-4df3-a181-1dde1cfa19f0",
"account_id": "zvyDgbeeDluZ43AJP6m5fAxDlgoZXDuoy5gjN",
"request_id": "mdqfuVxeoza6mhu"
}
POST
Migrate account into Transfers
{{baseUrl}}/transfer/migrate_account
BODY json
{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/migrate_account");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/migrate_account" {:content-type :json
:form-params {:account_number ""
:account_type ""
:client_id ""
:routing_number ""
:secret ""
:wire_routing_number ""}})
require "http/client"
url = "{{baseUrl}}/transfer/migrate_account"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/migrate_account"),
Content = new StringContent("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/migrate_account");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/migrate_account"
payload := strings.NewReader("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/migrate_account HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 136
{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/migrate_account")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/migrate_account"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/migrate_account")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/migrate_account")
.header("content-type", "application/json")
.body("{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
.asString();
const data = JSON.stringify({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/migrate_account');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/migrate_account',
headers: {'content-type': 'application/json'},
data: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/migrate_account';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_number":"","account_type":"","client_id":"","routing_number":"","secret":"","wire_routing_number":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/migrate_account',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_number": "",\n "account_type": "",\n "client_id": "",\n "routing_number": "",\n "secret": "",\n "wire_routing_number": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/migrate_account")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/migrate_account',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/migrate_account',
headers: {'content-type': 'application/json'},
body: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/migrate_account');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/migrate_account',
headers: {'content-type': 'application/json'},
data: {
account_number: '',
account_type: '',
client_id: '',
routing_number: '',
secret: '',
wire_routing_number: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/migrate_account';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_number":"","account_type":"","client_id":"","routing_number":"","secret":"","wire_routing_number":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_number": @"",
@"account_type": @"",
@"client_id": @"",
@"routing_number": @"",
@"secret": @"",
@"wire_routing_number": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/migrate_account"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/migrate_account" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/migrate_account",
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([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/migrate_account', [
'body' => '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/migrate_account');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_number' => '',
'account_type' => '',
'client_id' => '',
'routing_number' => '',
'secret' => '',
'wire_routing_number' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/migrate_account');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/migrate_account' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/migrate_account' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/migrate_account", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/migrate_account"
payload = {
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/migrate_account"
payload <- "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/migrate_account")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/migrate_account') do |req|
req.body = "{\n \"account_number\": \"\",\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"routing_number\": \"\",\n \"secret\": \"\",\n \"wire_routing_number\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/migrate_account";
let payload = json!({
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/migrate_account \
--header 'content-type: application/json' \
--data '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}'
echo '{
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
}' | \
http POST {{baseUrl}}/transfer/migrate_account \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_number": "",\n "account_type": "",\n "client_id": "",\n "routing_number": "",\n "secret": "",\n "wire_routing_number": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/migrate_account
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_number": "",
"account_type": "",
"client_id": "",
"routing_number": "",
"secret": "",
"wire_routing_number": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/migrate_account")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"access_token": "access-sandbox-435beced-94e8-4df3-a181-1dde1cfa19f0",
"account_id": "zvyDgbeeDluZ43AJP6m5fAxDlgoZXDuoy5gjN",
"request_id": "mdqfuVxeoza6mhu"
}
POST
Opt-in an Item to Signal
{{baseUrl}}/signal/prepare
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signal/prepare");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signal/prepare" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/signal/prepare"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/signal/prepare"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signal/prepare");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signal/prepare"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/signal/prepare HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signal/prepare")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signal/prepare"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signal/prepare")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signal/prepare")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/signal/prepare');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/prepare',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signal/prepare';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signal/prepare',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signal/prepare")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/signal/prepare',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/prepare',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/signal/prepare');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/prepare',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signal/prepare';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signal/prepare"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signal/prepare" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signal/prepare",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/signal/prepare', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signal/prepare');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/signal/prepare');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signal/prepare' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signal/prepare' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/signal/prepare", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signal/prepare"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signal/prepare"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signal/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/signal/prepare') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signal/prepare";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signal/prepare \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/signal/prepare \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/signal/prepare
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signal/prepare")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Refresh a digital payroll income verification
{{baseUrl}}/credit/payroll_income/refresh
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/payroll_income/refresh");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/payroll_income/refresh" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/payroll_income/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/payroll_income/refresh"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/payroll_income/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/payroll_income/refresh"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/payroll_income/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/payroll_income/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/payroll_income/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/payroll_income/refresh")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/payroll_income/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/refresh',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/payroll_income/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/payroll_income/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/payroll_income/refresh',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/refresh',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/payroll_income/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/refresh',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/payroll_income/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/payroll_income/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/payroll_income/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/payroll_income/refresh",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/payroll_income/refresh', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/payroll_income/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/payroll_income/refresh');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/payroll_income/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/payroll_income/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/payroll_income/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/payroll_income/refresh"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/payroll_income/refresh"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/payroll_income/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/payroll_income/refresh') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/payroll_income/refresh";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/payroll_income/refresh \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/payroll_income/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/payroll_income/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/payroll_income/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "nTkbCH41HYmpbm5",
"verification_refresh_status": "USER_PRESENCE_REQUIRED"
}
POST
Refresh a report of a relay token (beta)
{{baseUrl}}/credit/relay/refresh
BODY json
{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/relay/refresh");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/relay/refresh" {:content-type :json
:form-params {:client_id ""
:relay_token ""
:report_type ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/credit/relay/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/relay/refresh"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/relay/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/relay/refresh"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/relay/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 96
{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/relay/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/relay/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/relay/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/relay/refresh")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
relay_token: '',
report_type: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/relay/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/refresh',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', report_type: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/relay/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","report_type":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/relay/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "relay_token": "",\n "report_type": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/relay/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/relay/refresh',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', relay_token: '', report_type: '', secret: '', webhook: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/refresh',
headers: {'content-type': 'application/json'},
body: {client_id: '', relay_token: '', report_type: '', secret: '', webhook: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/relay/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
relay_token: '',
report_type: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/refresh',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', report_type: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/relay/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","report_type":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"relay_token": @"",
@"report_type": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/relay/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/relay/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/relay/refresh",
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([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/relay/refresh', [
'body' => '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/relay/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/relay/refresh');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/relay/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/relay/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/relay/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/relay/refresh"
payload = {
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/relay/refresh"
payload <- "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/relay/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/relay/refresh') do |req|
req.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/relay/refresh";
let payload = json!({
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/relay/refresh \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}'
echo '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/credit/relay/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "relay_token": "",\n "report_type": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/credit/relay/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/relay/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"asset_report_id": "bf3a0490-344c-4620-a219-2693162e4b1d",
"relay_token": "credit-relay-sandbox-8218d5f8-6d6d-403d-92f5-13a9afaa4398",
"request_id": "NBZaq"
}
POST
Refresh a user's bank income information
{{baseUrl}}/credit/bank_income/refresh
BODY json
{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/bank_income/refresh");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/bank_income/refresh" {:content-type :json
:form-params {:client_id ""
:options {:days_requested 0
:webhook ""}
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/bank_income/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/bank_income/refresh"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/bank_income/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/bank_income/refresh"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/bank_income/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/bank_income/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/bank_income/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/bank_income/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/bank_income/refresh")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
options: {
days_requested: 0,
webhook: ''
},
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/bank_income/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/refresh',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {days_requested: 0, webhook: ''},
secret: '',
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/bank_income/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"days_requested":0,"webhook":""},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/bank_income/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "options": {\n "days_requested": 0,\n "webhook": ""\n },\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/bank_income/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/bank_income/refresh',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
options: {days_requested: 0, webhook: ''},
secret: '',
user_token: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/refresh',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
options: {days_requested: 0, webhook: ''},
secret: '',
user_token: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/bank_income/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
options: {
days_requested: 0,
webhook: ''
},
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/refresh',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {days_requested: 0, webhook: ''},
secret: '',
user_token: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/bank_income/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"days_requested":0,"webhook":""},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"options": @{ @"days_requested": @0, @"webhook": @"" },
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/bank_income/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/bank_income/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/bank_income/refresh",
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([
'client_id' => '',
'options' => [
'days_requested' => 0,
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/bank_income/refresh', [
'body' => '{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/bank_income/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'options' => [
'days_requested' => 0,
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'options' => [
'days_requested' => 0,
'webhook' => ''
],
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/bank_income/refresh');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/bank_income/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/bank_income/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/bank_income/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/bank_income/refresh"
payload = {
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/bank_income/refresh"
payload <- "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/bank_income/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/bank_income/refresh') do |req|
req.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"days_requested\": 0,\n \"webhook\": \"\"\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/bank_income/refresh";
let payload = json!({
"client_id": "",
"options": json!({
"days_requested": 0,
"webhook": ""
}),
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/bank_income/refresh \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"options": {
"days_requested": 0,
"webhook": ""
},
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/bank_income/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "options": {\n "days_requested": 0,\n "webhook": ""\n },\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/bank_income/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"options": [
"days_requested": 0,
"webhook": ""
],
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/bank_income/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "LhQf0THi8SH1yJm"
}
POST
Refresh an Asset Report
{{baseUrl}}/asset_report/refresh
BODY json
{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/refresh");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/refresh" {:content-type :json
:form-params {:asset_report_token ""
:client_id ""
:days_requested 0
:options {:client_report_id ""
:user {:client_user_id ""
:email ""
:first_name ""
:last_name ""
:middle_name ""
:phone_number ""
:ssn ""}
:webhook ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/refresh"),
Content = new StringContent("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/refresh"
payload := strings.NewReader("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 336
{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/refresh")
.header("content-type", "application/json")
.body("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/refresh',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","days_requested":0,"options":{"client_report_id":"","user":{"client_user_id":"","email":"","first_name":"","last_name":"","middle_name":"","phone_number":"","ssn":""},"webhook":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "asset_report_token": "",\n "client_id": "",\n "days_requested": 0,\n "options": {\n "client_report_id": "",\n "user": {\n "client_user_id": "",\n "email": "",\n "first_name": "",\n "last_name": "",\n "middle_name": "",\n "phone_number": "",\n "ssn": ""\n },\n "webhook": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/refresh',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/refresh',
headers: {'content-type': 'application/json'},
body: {
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/refresh',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
days_requested: 0,
options: {
client_report_id: '',
user: {
client_user_id: '',
email: '',
first_name: '',
last_name: '',
middle_name: '',
phone_number: '',
ssn: ''
},
webhook: ''
},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","days_requested":0,"options":{"client_report_id":"","user":{"client_user_id":"","email":"","first_name":"","last_name":"","middle_name":"","phone_number":"","ssn":""},"webhook":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"asset_report_token": @"",
@"client_id": @"",
@"days_requested": @0,
@"options": @{ @"client_report_id": @"", @"user": @{ @"client_user_id": @"", @"email": @"", @"first_name": @"", @"last_name": @"", @"middle_name": @"", @"phone_number": @"", @"ssn": @"" }, @"webhook": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/refresh",
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([
'asset_report_token' => '',
'client_id' => '',
'days_requested' => 0,
'options' => [
'client_report_id' => '',
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/refresh', [
'body' => '{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'asset_report_token' => '',
'client_id' => '',
'days_requested' => 0,
'options' => [
'client_report_id' => '',
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'asset_report_token' => '',
'client_id' => '',
'days_requested' => 0,
'options' => [
'client_report_id' => '',
'user' => [
'client_user_id' => '',
'email' => '',
'first_name' => '',
'last_name' => '',
'middle_name' => '',
'phone_number' => '',
'ssn' => ''
],
'webhook' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/refresh');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/refresh"
payload = {
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/refresh"
payload <- "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/refresh') do |req|
req.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"days_requested\": 0,\n \"options\": {\n \"client_report_id\": \"\",\n \"user\": {\n \"client_user_id\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"middle_name\": \"\",\n \"phone_number\": \"\",\n \"ssn\": \"\"\n },\n \"webhook\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/refresh";
let payload = json!({
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": json!({
"client_report_id": "",
"user": json!({
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
}),
"webhook": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/refresh \
--header 'content-type: application/json' \
--data '{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}'
echo '{
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": {
"client_report_id": "",
"user": {
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
},
"webhook": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "asset_report_token": "",\n "client_id": "",\n "days_requested": 0,\n "options": {\n "client_report_id": "",\n "user": {\n "client_user_id": "",\n "email": "",\n "first_name": "",\n "last_name": "",\n "middle_name": "",\n "phone_number": "",\n "ssn": ""\n },\n "webhook": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"asset_report_token": "",
"client_id": "",
"days_requested": 0,
"options": [
"client_report_id": "",
"user": [
"client_user_id": "",
"email": "",
"first_name": "",
"last_name": "",
"middle_name": "",
"phone_number": "",
"ssn": ""
],
"webhook": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"asset_report_id": "c33ebe8b-6a63-4d74-a83d-d39791231ac0",
"asset_report_token": "assets-sandbox-8218d5f8-6d6d-403d-92f5-13a9afaa4398",
"request_id": "NBZaq"
}
POST
Refresh transaction data
{{baseUrl}}/transactions/refresh
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactions/refresh");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactions/refresh" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transactions/refresh"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transactions/refresh"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactions/refresh");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactions/refresh"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transactions/refresh HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactions/refresh")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactions/refresh"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactions/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactions/refresh")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transactions/refresh');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/refresh',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactions/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transactions/refresh',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactions/refresh")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactions/refresh',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/refresh',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transactions/refresh');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transactions/refresh',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactions/refresh';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactions/refresh"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transactions/refresh" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactions/refresh",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transactions/refresh', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactions/refresh');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactions/refresh');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactions/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactions/refresh' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactions/refresh", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactions/refresh"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactions/refresh"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactions/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transactions/refresh') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactions/refresh";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transactions/refresh \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transactions/refresh \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transactions/refresh
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactions/refresh")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "1vwmF5TBQwiqfwP"
}
POST
Remove Asset Report Audit Copy
{{baseUrl}}/asset_report/audit_copy/remove
BODY json
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/audit_copy/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/audit_copy/remove" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/audit_copy/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/audit_copy/remove"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/audit_copy/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/audit_copy/remove"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/audit_copy/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/audit_copy/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/audit_copy/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/audit_copy/remove")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/audit_copy/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/remove',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/audit_copy/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/audit_copy/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/audit_copy/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/remove',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/audit_copy/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/remove',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/audit_copy/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/audit_copy/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/audit_copy/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/audit_copy/remove",
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([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/audit_copy/remove', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/audit_copy/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/audit_copy/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/audit_copy/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/audit_copy/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/audit_copy/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/audit_copy/remove"
payload = {
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/audit_copy/remove"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/audit_copy/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/audit_copy/remove') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/audit_copy/remove";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/audit_copy/remove \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/audit_copy/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/audit_copy/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/audit_copy/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"removed": true,
"request_id": "m8MDnv9okwxFNBV"
}
POST
Remove an Audit Copy token
{{baseUrl}}/credit/audit_copy_token/remove
BODY json
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/audit_copy_token/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/audit_copy_token/remove" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/audit_copy_token/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/audit_copy_token/remove"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/audit_copy_token/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/audit_copy_token/remove"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/audit_copy_token/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/audit_copy_token/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/audit_copy_token/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/audit_copy_token/remove")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/audit_copy_token/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/remove',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/audit_copy_token/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/audit_copy_token/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/audit_copy_token/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/remove',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/audit_copy_token/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/remove',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/audit_copy_token/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/audit_copy_token/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/audit_copy_token/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/audit_copy_token/remove",
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([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/audit_copy_token/remove', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/audit_copy_token/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/audit_copy_token/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/audit_copy_token/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/audit_copy_token/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/audit_copy_token/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/audit_copy_token/remove"
payload = {
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/audit_copy_token/remove"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/audit_copy_token/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/audit_copy_token/remove') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/audit_copy_token/remove";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/audit_copy_token/remove \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/credit/audit_copy_token/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/audit_copy_token/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/audit_copy_token/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"removed": true,
"request_id": "m8MDnv9okwxFNBV"
}
POST
Remove an Item
{{baseUrl}}/item/remove
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/remove" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/remove"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/remove"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/remove")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/remove',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/remove',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/remove',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/remove",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/remove', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/remove"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/remove"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/remove') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/remove";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/remove \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "m8MDnv9okwxFNBV"
}
POST
Remove payment profile
{{baseUrl}}/payment_profile/remove
BODY json
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_profile/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_profile/remove" {:content-type :json
:form-params {:client_id ""
:payment_profile_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_profile/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_profile/remove"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_profile/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_profile/remove"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_profile/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_profile/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_profile/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_profile/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_profile/remove")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
payment_profile_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_profile/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/remove',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_profile/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_profile/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_profile/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_profile/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', payment_profile_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/remove',
headers: {'content-type': 'application/json'},
body: {client_id: '', payment_profile_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_profile/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
payment_profile_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_profile/remove',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_profile/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"payment_profile_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_profile/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_profile/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_profile/remove",
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([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_profile/remove', [
'body' => '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_profile/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_profile/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_profile/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_profile/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_profile/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_profile/remove"
payload = {
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_profile/remove"
payload <- "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_profile/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_profile/remove') do |req|
req.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_profile/remove";
let payload = json!({
"client_id": "",
"payment_profile_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_profile/remove \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_profile/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_profile/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"payment_profile_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_profile/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4ciYmmesdqSiUAB"
}
POST
Remove relay token (beta)
{{baseUrl}}/credit/relay/remove
BODY json
{
"client_id": "",
"relay_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/relay/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/relay/remove" {:content-type :json
:form-params {:client_id ""
:relay_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/relay/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/relay/remove"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/relay/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/relay/remove"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/relay/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"client_id": "",
"relay_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/relay/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/relay/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/relay/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/relay/remove")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
relay_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/relay/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/remove',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/relay/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/relay/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "relay_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/relay/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/relay/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', relay_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/remove',
headers: {'content-type': 'application/json'},
body: {client_id: '', relay_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/relay/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
relay_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/remove',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/relay/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"relay_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/relay/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/relay/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/relay/remove",
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([
'client_id' => '',
'relay_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/relay/remove', [
'body' => '{
"client_id": "",
"relay_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/relay/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'relay_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'relay_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/relay/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/relay/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/relay/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/relay/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/relay/remove"
payload = {
"client_id": "",
"relay_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/relay/remove"
payload <- "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/relay/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/relay/remove') do |req|
req.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/relay/remove";
let payload = json!({
"client_id": "",
"relay_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/relay/remove \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"relay_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"relay_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/credit/relay/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "relay_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/relay/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"relay_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/relay/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"removed": true,
"request_id": "m8MDnv9okwxFNBV"
}
POST
Remove transaction rule
{{baseUrl}}/beta/transactions/rules/v1/remove
BODY json
{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/beta/transactions/rules/v1/remove");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/beta/transactions/rules/v1/remove" {:content-type :json
:form-params {:access_token ""
:client_id ""
:rule_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/beta/transactions/rules/v1/remove"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/beta/transactions/rules/v1/remove"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/beta/transactions/rules/v1/remove");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/beta/transactions/rules/v1/remove"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/beta/transactions/rules/v1/remove HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/beta/transactions/rules/v1/remove")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/beta/transactions/rules/v1/remove"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/remove")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/beta/transactions/rules/v1/remove")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
rule_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/beta/transactions/rules/v1/remove');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/remove',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', rule_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/beta/transactions/rules/v1/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","rule_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/beta/transactions/rules/v1/remove',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "rule_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/remove")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/beta/transactions/rules/v1/remove',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', rule_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/remove',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', rule_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/beta/transactions/rules/v1/remove');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
rule_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/remove',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', rule_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/beta/transactions/rules/v1/remove';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","rule_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"rule_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/beta/transactions/rules/v1/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/beta/transactions/rules/v1/remove" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/beta/transactions/rules/v1/remove",
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([
'access_token' => '',
'client_id' => '',
'rule_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/beta/transactions/rules/v1/remove', [
'body' => '{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/beta/transactions/rules/v1/remove');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'rule_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'rule_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/beta/transactions/rules/v1/remove');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/beta/transactions/rules/v1/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/beta/transactions/rules/v1/remove' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/beta/transactions/rules/v1/remove", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/beta/transactions/rules/v1/remove"
payload = {
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/beta/transactions/rules/v1/remove"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/beta/transactions/rules/v1/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/beta/transactions/rules/v1/remove') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"rule_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/beta/transactions/rules/v1/remove";
let payload = json!({
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/beta/transactions/rules/v1/remove \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/beta/transactions/rules/v1/remove \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "rule_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/beta/transactions/rules/v1/remove
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"rule_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/beta/transactions/rules/v1/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM"
}
POST
Removes a Plaid reseller's end customer.
{{baseUrl}}/partner/customer/remove
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partner/customer/remove");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/partner/customer/remove")
require "http/client"
url = "{{baseUrl}}/partner/customer/remove"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/partner/customer/remove"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partner/customer/remove");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/partner/customer/remove"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/partner/customer/remove HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partner/customer/remove")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/partner/customer/remove"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/partner/customer/remove")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partner/customer/remove")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/partner/customer/remove');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/remove'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/partner/customer/remove';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/partner/customer/remove',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/partner/customer/remove")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/partner/customer/remove',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/remove'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/partner/customer/remove');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/remove'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/partner/customer/remove';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partner/customer/remove"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/partner/customer/remove" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/partner/customer/remove",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/partner/customer/remove');
echo $response->getBody();
setUrl('{{baseUrl}}/partner/customer/remove');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/partner/customer/remove');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partner/customer/remove' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partner/customer/remove' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/partner/customer/remove", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/partner/customer/remove"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/partner/customer/remove"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/partner/customer/remove")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/partner/customer/remove') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/partner/customer/remove";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/partner/customer/remove
http POST {{baseUrl}}/partner/customer/remove
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/partner/customer/remove
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partner/customer/remove")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM"
}
POST
Report a return for an ACH transaction (POST)
{{baseUrl}}/signal/return/report
BODY json
{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signal/return/report");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signal/return/report" {:content-type :json
:form-params {:client_id ""
:client_transaction_id ""
:return_code ""
:returned_at ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/signal/return/report"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/signal/return/report"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signal/return/report");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signal/return/report"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/signal/return/report HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110
{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signal/return/report")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signal/return/report"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signal/return/report")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signal/return/report")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/signal/return/report');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/return/report',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signal/return/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_transaction_id":"","return_code":"","returned_at":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signal/return/report',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_transaction_id": "",\n "return_code": "",\n "returned_at": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signal/return/report")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/signal/return/report',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/return/report',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/signal/return/report');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/return/report',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_transaction_id: '',
return_code: '',
returned_at: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signal/return/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_transaction_id":"","return_code":"","returned_at":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_transaction_id": @"",
@"return_code": @"",
@"returned_at": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signal/return/report"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signal/return/report" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signal/return/report",
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([
'client_id' => '',
'client_transaction_id' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/signal/return/report', [
'body' => '{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signal/return/report');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_transaction_id' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_transaction_id' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/signal/return/report');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signal/return/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signal/return/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/signal/return/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signal/return/report"
payload = {
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signal/return/report"
payload <- "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signal/return/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/signal/return/report') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signal/return/report";
let payload = json!({
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signal/return/report \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
echo '{
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
}' | \
http POST {{baseUrl}}/signal/return/report \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_transaction_id": "",\n "return_code": "",\n "returned_at": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/signal/return/report
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_transaction_id": "",
"return_code": "",
"returned_at": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signal/return/report")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Report a return for an ACH transaction
{{baseUrl}}/processor/signal/return/report
BODY json
{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/signal/return/report");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/signal/return/report" {:content-type :json
:form-params {:client_id ""
:client_transaction_id ""
:processor_token ""
:return_code ""
:returned_at ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/signal/return/report"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/signal/return/report"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/signal/return/report");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/signal/return/report"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/signal/return/report HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 135
{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/signal/return/report")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/signal/return/report"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/signal/return/report")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/signal/return/report")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/signal/return/report');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/return/report',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/signal/return/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_transaction_id":"","processor_token":"","return_code":"","returned_at":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/signal/return/report',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_transaction_id": "",\n "processor_token": "",\n "return_code": "",\n "returned_at": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/signal/return/report")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/signal/return/report',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/return/report',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/signal/return/report');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/return/report',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_transaction_id: '',
processor_token: '',
return_code: '',
returned_at: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/signal/return/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_transaction_id":"","processor_token":"","return_code":"","returned_at":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_transaction_id": @"",
@"processor_token": @"",
@"return_code": @"",
@"returned_at": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/signal/return/report"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/signal/return/report" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/signal/return/report",
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([
'client_id' => '',
'client_transaction_id' => '',
'processor_token' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/signal/return/report', [
'body' => '{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/signal/return/report');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_transaction_id' => '',
'processor_token' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_transaction_id' => '',
'processor_token' => '',
'return_code' => '',
'returned_at' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/signal/return/report');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/signal/return/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/signal/return/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/signal/return/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/signal/return/report"
payload = {
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/signal/return/report"
payload <- "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/signal/return/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/signal/return/report') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"processor_token\": \"\",\n \"return_code\": \"\",\n \"returned_at\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/signal/return/report";
let payload = json!({
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/signal/return/report \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}'
echo '{
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/signal/return/report \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_transaction_id": "",\n "processor_token": "",\n "return_code": "",\n "returned_at": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/signal/return/report
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_transaction_id": "",
"processor_token": "",
"return_code": "",
"returned_at": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/signal/return/report")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Report whether you initiated an ACH transaction (POST)
{{baseUrl}}/signal/decision/report
BODY json
{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/signal/decision/report");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/signal/decision/report" {:content-type :json
:form-params {:amount_instantly_available ""
:client_id ""
:client_transaction_id ""
:days_funds_on_hold 0
:decision_outcome ""
:initiated false
:payment_method ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/signal/decision/report"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/signal/decision/report"),
Content = new StringContent("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/signal/decision/report");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/signal/decision/report"
payload := strings.NewReader("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/signal/decision/report HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 203
{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/signal/decision/report")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/signal/decision/report"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/signal/decision/report")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/signal/decision/report")
.header("content-type", "application/json")
.body("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/signal/decision/report');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/decision/report',
headers: {'content-type': 'application/json'},
data: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/signal/decision/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount_instantly_available":"","client_id":"","client_transaction_id":"","days_funds_on_hold":0,"decision_outcome":"","initiated":false,"payment_method":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/signal/decision/report',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount_instantly_available": "",\n "client_id": "",\n "client_transaction_id": "",\n "days_funds_on_hold": 0,\n "decision_outcome": "",\n "initiated": false,\n "payment_method": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/signal/decision/report")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/signal/decision/report',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/decision/report',
headers: {'content-type': 'application/json'},
body: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/signal/decision/report');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/signal/decision/report',
headers: {'content-type': 'application/json'},
data: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/signal/decision/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount_instantly_available":"","client_id":"","client_transaction_id":"","days_funds_on_hold":0,"decision_outcome":"","initiated":false,"payment_method":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount_instantly_available": @"",
@"client_id": @"",
@"client_transaction_id": @"",
@"days_funds_on_hold": @0,
@"decision_outcome": @"",
@"initiated": @NO,
@"payment_method": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/signal/decision/report"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/signal/decision/report" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/signal/decision/report",
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([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/signal/decision/report', [
'body' => '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/signal/decision/report');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/signal/decision/report');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/signal/decision/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/signal/decision/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/signal/decision/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/signal/decision/report"
payload = {
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": False,
"payment_method": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/signal/decision/report"
payload <- "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/signal/decision/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/signal/decision/report') do |req|
req.body = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/signal/decision/report";
let payload = json!({
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/signal/decision/report \
--header 'content-type: application/json' \
--data '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}'
echo '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
}' | \
http POST {{baseUrl}}/signal/decision/report \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount_instantly_available": "",\n "client_id": "",\n "client_transaction_id": "",\n "days_funds_on_hold": 0,\n "decision_outcome": "",\n "initiated": false,\n "payment_method": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/signal/decision/report
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/signal/decision/report")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Report whether you initiated an ACH transaction
{{baseUrl}}/processor/signal/decision/report
BODY json
{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/signal/decision/report");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/signal/decision/report" {:content-type :json
:form-params {:amount_instantly_available ""
:client_id ""
:client_transaction_id ""
:days_funds_on_hold 0
:decision_outcome ""
:initiated false
:payment_method ""
:processor_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/signal/decision/report"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/signal/decision/report"),
Content = new StringContent("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/signal/decision/report");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/signal/decision/report"
payload := strings.NewReader("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/signal/decision/report HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 228
{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/signal/decision/report")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/signal/decision/report"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/signal/decision/report")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/signal/decision/report")
.header("content-type", "application/json")
.body("{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/signal/decision/report');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/decision/report',
headers: {'content-type': 'application/json'},
data: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/signal/decision/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount_instantly_available":"","client_id":"","client_transaction_id":"","days_funds_on_hold":0,"decision_outcome":"","initiated":false,"payment_method":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/signal/decision/report',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount_instantly_available": "",\n "client_id": "",\n "client_transaction_id": "",\n "days_funds_on_hold": 0,\n "decision_outcome": "",\n "initiated": false,\n "payment_method": "",\n "processor_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/signal/decision/report")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/signal/decision/report',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/decision/report',
headers: {'content-type': 'application/json'},
body: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/signal/decision/report');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/signal/decision/report',
headers: {'content-type': 'application/json'},
data: {
amount_instantly_available: '',
client_id: '',
client_transaction_id: '',
days_funds_on_hold: 0,
decision_outcome: '',
initiated: false,
payment_method: '',
processor_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/signal/decision/report';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount_instantly_available":"","client_id":"","client_transaction_id":"","days_funds_on_hold":0,"decision_outcome":"","initiated":false,"payment_method":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount_instantly_available": @"",
@"client_id": @"",
@"client_transaction_id": @"",
@"days_funds_on_hold": @0,
@"decision_outcome": @"",
@"initiated": @NO,
@"payment_method": @"",
@"processor_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/signal/decision/report"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/signal/decision/report" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/signal/decision/report",
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([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'processor_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/signal/decision/report', [
'body' => '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/signal/decision/report');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'processor_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount_instantly_available' => '',
'client_id' => '',
'client_transaction_id' => '',
'days_funds_on_hold' => 0,
'decision_outcome' => '',
'initiated' => null,
'payment_method' => '',
'processor_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/signal/decision/report');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/signal/decision/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/signal/decision/report' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/signal/decision/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/signal/decision/report"
payload = {
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": False,
"payment_method": "",
"processor_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/signal/decision/report"
payload <- "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/signal/decision/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/signal/decision/report') do |req|
req.body = "{\n \"amount_instantly_available\": \"\",\n \"client_id\": \"\",\n \"client_transaction_id\": \"\",\n \"days_funds_on_hold\": 0,\n \"decision_outcome\": \"\",\n \"initiated\": false,\n \"payment_method\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/signal/decision/report";
let payload = json!({
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/signal/decision/report \
--header 'content-type: application/json' \
--data '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}'
echo '{
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/signal/decision/report \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount_instantly_available": "",\n "client_id": "",\n "client_transaction_id": "",\n "days_funds_on_hold": 0,\n "decision_outcome": "",\n "initiated": false,\n "payment_method": "",\n "processor_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/signal/decision/report
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount_instantly_available": "",
"client_id": "",
"client_transaction_id": "",
"days_funds_on_hold": 0,
"decision_outcome": "",
"initiated": false,
"payment_method": "",
"processor_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/signal/decision/report")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Reset the login of a Payment Profile
{{baseUrl}}/sandbox/payment_profile/reset_login
BODY json
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/payment_profile/reset_login");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/payment_profile/reset_login" {:content-type :json
:form-params {:client_id ""
:payment_profile_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/payment_profile/reset_login"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/payment_profile/reset_login"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/payment_profile/reset_login");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/payment_profile/reset_login"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/payment_profile/reset_login HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/payment_profile/reset_login")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/payment_profile/reset_login"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/payment_profile/reset_login")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/payment_profile/reset_login")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
payment_profile_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/payment_profile/reset_login');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/payment_profile/reset_login',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/payment_profile/reset_login';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/payment_profile/reset_login',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/payment_profile/reset_login")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/payment_profile/reset_login',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', payment_profile_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/payment_profile/reset_login',
headers: {'content-type': 'application/json'},
body: {client_id: '', payment_profile_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/payment_profile/reset_login');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
payment_profile_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/payment_profile/reset_login',
headers: {'content-type': 'application/json'},
data: {client_id: '', payment_profile_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/payment_profile/reset_login';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","payment_profile_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"payment_profile_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/payment_profile/reset_login"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/payment_profile/reset_login" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/payment_profile/reset_login",
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([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/payment_profile/reset_login', [
'body' => '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/payment_profile/reset_login');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'payment_profile_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/payment_profile/reset_login');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/payment_profile/reset_login' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/payment_profile/reset_login' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/payment_profile/reset_login", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/payment_profile/reset_login"
payload = {
"client_id": "",
"payment_profile_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/payment_profile/reset_login"
payload <- "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/payment_profile/reset_login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/payment_profile/reset_login') do |req|
req.body = "{\n \"client_id\": \"\",\n \"payment_profile_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/payment_profile/reset_login";
let payload = json!({
"client_id": "",
"payment_profile_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/payment_profile/reset_login \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"payment_profile_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/payment_profile/reset_login \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "payment_profile_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/payment_profile/reset_login
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"payment_profile_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/payment_profile/reset_login")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "m8MDnv9okwxFNBV",
"reset_login": true
}
POST
Retrieve Auth data
{{baseUrl}}/processor/auth/get
BODY json
{
"client_id": "",
"processor_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/auth/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/auth/get" {:content-type :json
:form-params {:client_id ""
:processor_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/auth/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/auth/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/auth/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/auth/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/auth/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
{
"client_id": "",
"processor_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/auth/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/auth/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/auth/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/auth/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
processor_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/auth/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/auth/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', processor_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/auth/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/auth/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "processor_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/auth/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/auth/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', processor_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/auth/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', processor_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/auth/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
processor_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/auth/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', processor_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/auth/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"processor_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/auth/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/auth/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/auth/get",
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([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/auth/get', [
'body' => '{
"client_id": "",
"processor_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/auth/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/auth/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/auth/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/auth/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/auth/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/auth/get"
payload = {
"client_id": "",
"processor_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/auth/get"
payload <- "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/auth/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/auth/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/auth/get";
let payload = json!({
"client_id": "",
"processor_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/auth/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"processor_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/auth/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "processor_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/auth/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"processor_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/auth/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"account": {
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Checking",
"subtype": "checking",
"type": "depository"
},
"numbers": {
"ach": {
"account": "9900009606",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"routing": "011401533",
"wire_routing": "021000021"
},
"bacs": {
"account": "31926819",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"sort_code": "601613"
},
"eft": {
"account": "111122223333",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"branch": "01140",
"institution": "021"
},
"international": {
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"bic": "NWBKGB21",
"iban": "GB29NWBK60161331926819"
}
},
"request_id": "1zlMf"
}
POST
Retrieve Balance data
{{baseUrl}}/processor/balance/get
BODY json
{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/balance/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/balance/get" {:content-type :json
:form-params {:client_id ""
:options {:min_last_updated_datetime ""}
:processor_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/balance/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/balance/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/balance/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/balance/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/balance/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 118
{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/balance/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/balance/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/balance/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
options: {
min_last_updated_datetime: ''
},
processor_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/balance/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/balance/get',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {min_last_updated_datetime: ''},
processor_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"min_last_updated_datetime":""},"processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/balance/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "options": {\n "min_last_updated_datetime": ""\n },\n "processor_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/balance/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
options: {min_last_updated_datetime: ''},
processor_token: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/balance/get',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
options: {min_last_updated_datetime: ''},
processor_token: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/balance/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
options: {
min_last_updated_datetime: ''
},
processor_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/balance/get',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
options: {min_last_updated_datetime: ''},
processor_token: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"min_last_updated_datetime":""},"processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"options": @{ @"min_last_updated_datetime": @"" },
@"processor_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/balance/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/balance/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/balance/get",
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([
'client_id' => '',
'options' => [
'min_last_updated_datetime' => ''
],
'processor_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/balance/get', [
'body' => '{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/balance/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'options' => [
'min_last_updated_datetime' => ''
],
'processor_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'options' => [
'min_last_updated_datetime' => ''
],
'processor_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/balance/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/balance/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/balance/get"
payload = {
"client_id": "",
"options": { "min_last_updated_datetime": "" },
"processor_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/balance/get"
payload <- "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/balance/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/balance/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"min_last_updated_datetime\": \"\"\n },\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/balance/get";
let payload = json!({
"client_id": "",
"options": json!({"min_last_updated_datetime": ""}),
"processor_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/balance/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"options": {
"min_last_updated_datetime": ""
},
"processor_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/balance/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "options": {\n "min_last_updated_datetime": ""\n },\n "processor_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/balance/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"options": ["min_last_updated_datetime": ""],
"processor_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/balance/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"account": {
"account_id": "QKKzevvp33HxPWpoqn6rI13BxW4awNSjnw4xv",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Checking",
"subtype": "checking",
"type": "depository"
},
"request_id": "1zlMf"
}
POST
Retrieve Identity Verification
{{baseUrl}}/identity_verification/get
BODY json
{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity_verification/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity_verification/get" {:content-type :json
:form-params {:client_id ""
:identity_verification_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/identity_verification/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity_verification/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity_verification/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity_verification/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity_verification/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 71
{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity_verification/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity_verification/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity_verification/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity_verification/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
identity_verification_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity_verification/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', identity_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity_verification/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","identity_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity_verification/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "identity_verification_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity_verification/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity_verification/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', identity_verification_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', identity_verification_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity_verification/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
identity_verification_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', identity_verification_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity_verification/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","identity_verification_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"identity_verification_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity_verification/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity_verification/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity_verification/get",
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([
'client_id' => '',
'identity_verification_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity_verification/get', [
'body' => '{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity_verification/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'identity_verification_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'identity_verification_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identity_verification/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity_verification/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity_verification/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity_verification/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity_verification/get"
payload = {
"client_id": "",
"identity_verification_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity_verification/get"
payload <- "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity_verification/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity_verification/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"identity_verification_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity_verification/get";
let payload = json!({
"client_id": "",
"identity_verification_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity_verification/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"identity_verification_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/identity_verification/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "identity_verification_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/identity_verification/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"identity_verification_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity_verification/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"client_user_id": "your-db-id-3b24110",
"completed_at": "2020-07-24T03:26:02Z",
"created_at": "2020-07-24T03:26:02Z",
"documentary_verification": {
"documents": [
{
"analysis": {
"authenticity": "match",
"extracted_data": {
"date_of_birth": "match",
"expiration_date": "not_expired",
"issuing_country": "match",
"name": "match"
},
"image_quality": "high"
},
"attempt": 1,
"extracted_data": {
"category": "drivers_license",
"expiration_date": "1990-05-29",
"id_number": "AB123456",
"issuing_country": "US",
"issuing_region": "IN"
},
"images": {
"cropped_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_back.jpeg",
"cropped_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_front.jpeg",
"face": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/face.jpeg",
"original_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_back.jpeg",
"original_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_front.jpeg"
},
"redacted_at": "2020-07-24T03:26:02Z",
"status": "success"
}
],
"status": "success"
},
"id": "idv_52xR9LKo77r1Np",
"kyc_check": {
"address": {
"po_box": "yes",
"summary": "match",
"type": "residential"
},
"date_of_birth": {
"summary": "match"
},
"id_number": {
"summary": "match"
},
"name": {
"summary": "match"
},
"phone_number": {
"summary": "match"
},
"status": "success"
},
"previous_attempt_id": "idv_42cF1MNo42r9Xj",
"redacted_at": "2020-07-24T03:26:02Z",
"request_id": "saKrIBuEB9qJZng",
"shareable_url": "https://flow.plaid.com/verify/idv_4FrXJvfQU3zGUR?key=e004115db797f7cc3083bff3167cba30644ef630fb46f5b086cde6cc3b86a36f",
"status": "success",
"steps": {
"accept_tos": "success",
"documentary_verification": "success",
"kyc_check": "success",
"risk_check": "success",
"selfie_check": "success",
"verify_sms": "success",
"watchlist_screening": "success"
},
"template": {
"id": "idvtmp_4FrXJvfQU3zGUR",
"version": 2
},
"user": {
"address": {
"city": "Pawnee",
"country": "US",
"postal_code": "46001",
"region": "IN",
"street": "123 Main St.",
"street2": "Unit 42"
},
"date_of_birth": "1990-05-29",
"email_address": "user@example.com",
"id_number": {
"type": "us_ssn",
"value": "123456789"
},
"ip_address": "192.0.2.42",
"name": {
"family_name": "Knope",
"given_name": "Leslie"
},
"phone_number": "+19876543212"
},
"watchlist_screening_id": "scr_52xR9LKo77r1Np"
}
POST
Retrieve Identity data
{{baseUrl}}/processor/identity/get
BODY json
{
"client_id": "",
"processor_token": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/processor/identity/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/processor/identity/get" {:content-type :json
:form-params {:client_id ""
:processor_token ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/processor/identity/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/processor/identity/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/processor/identity/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/processor/identity/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/processor/identity/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
{
"client_id": "",
"processor_token": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/processor/identity/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/processor/identity/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/processor/identity/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/processor/identity/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
processor_token: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/processor/identity/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/identity/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', processor_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/processor/identity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/processor/identity/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "processor_token": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/processor/identity/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/processor/identity/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', processor_token: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/identity/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', processor_token: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/processor/identity/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
processor_token: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/processor/identity/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', processor_token: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/processor/identity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","processor_token":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"processor_token": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/processor/identity/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/processor/identity/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/processor/identity/get",
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([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/processor/identity/get', [
'body' => '{
"client_id": "",
"processor_token": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/processor/identity/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'processor_token' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/processor/identity/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/processor/identity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/processor/identity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/processor/identity/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/processor/identity/get"
payload = {
"client_id": "",
"processor_token": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/processor/identity/get"
payload <- "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/processor/identity/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/processor/identity/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"processor_token\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/processor/identity/get";
let payload = json!({
"client_id": "",
"processor_token": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/processor/identity/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"processor_token": "",
"secret": ""
}'
echo '{
"client_id": "",
"processor_token": "",
"secret": ""
}' | \
http POST {{baseUrl}}/processor/identity/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "processor_token": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/processor/identity/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"processor_token": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/processor/identity/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"account": {
"account_id": "XMGPJy4q1gsQoKd5z9R3tK8kJ9EWL8SdkgKMq",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile1"
}
]
}
],
"subtype": "checking",
"type": "depository"
},
"request_id": "eOPkBl6t33veI2J"
}
POST
Retrieve Liabilities data
{{baseUrl}}/liabilities/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/liabilities/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/liabilities/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/liabilities/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/liabilities/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/liabilities/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/liabilities/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/liabilities/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/liabilities/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/liabilities/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/liabilities/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/liabilities/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/liabilities/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/liabilities/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/liabilities/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/liabilities/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/liabilities/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/liabilities/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', options: {account_ids: []}, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/liabilities/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/liabilities/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/liabilities/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/liabilities/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/liabilities/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/liabilities/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/liabilities/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/liabilities/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/liabilities/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/liabilities/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/liabilities/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/liabilities/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/liabilities/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/liabilities/get"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/liabilities/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/liabilities/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/liabilities/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/liabilities/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/liabilities/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/liabilities/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/liabilities/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/liabilities/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"subtype": "checking",
"type": "depository"
},
{
"account_id": "dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK",
"balances": {
"available": null,
"current": 410,
"iso_currency_code": "USD",
"limit": 2000,
"unofficial_currency_code": null
},
"mask": "3333",
"name": "Plaid Credit Card",
"official_name": "Plaid Diamond 12.5% APR Interest Credit Card",
"subtype": "credit card",
"type": "credit"
},
{
"account_id": "Pp1Vpkl9w8sajvK6oEEKtr7vZxBnGpf7LxxLE",
"balances": {
"available": null,
"current": 65262,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "7777",
"name": "Plaid Student Loan",
"official_name": null,
"subtype": "student",
"type": "loan"
},
{
"account_id": "BxBXxLj1m4HMXBm9WZJyUg9XLd4rKEhw8Pb1J",
"balances": {
"available": null,
"current": 56302.06,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "8888",
"name": "Plaid Mortgage",
"official_name": null,
"subtype": "mortgage",
"type": "loan"
}
],
"item": {
"available_products": [
"balance",
"investments"
],
"billed_products": [
"assets",
"auth",
"identity",
"liabilities",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"liabilities": {
"credit": [
{
"account_id": "dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK",
"aprs": [
{
"apr_percentage": 15.24,
"apr_type": "balance_transfer_apr",
"balance_subject_to_apr": 1562.32,
"interest_charge_amount": 130.22
},
{
"apr_percentage": 27.95,
"apr_type": "cash_apr",
"balance_subject_to_apr": 56.22,
"interest_charge_amount": 14.81
},
{
"apr_percentage": 12.5,
"apr_type": "purchase_apr",
"balance_subject_to_apr": 157.01,
"interest_charge_amount": 25.66
},
{
"apr_percentage": 0,
"apr_type": "special",
"balance_subject_to_apr": 1000,
"interest_charge_amount": 0
}
],
"is_overdue": false,
"last_payment_amount": 168.25,
"last_payment_date": "2019-05-22",
"last_statement_balance": 1708.77,
"last_statement_issue_date": "2019-05-28",
"minimum_payment_amount": 20,
"next_payment_due_date": "2020-05-28"
}
],
"mortgage": [
{
"account_id": "BxBXxLj1m4HMXBm9WZJyUg9XLd4rKEhw8Pb1J",
"account_number": "3120194154",
"current_late_fee": 25,
"escrow_balance": 3141.54,
"has_pmi": true,
"has_prepayment_penalty": true,
"interest_rate": {
"percentage": 3.99,
"type": "fixed"
},
"last_payment_amount": 3141.54,
"last_payment_date": "2019-08-01",
"loan_term": "30 year",
"loan_type_description": "conventional",
"maturity_date": "2045-07-31",
"next_monthly_payment": 3141.54,
"next_payment_due_date": "2019-11-15",
"origination_date": "2015-08-01",
"origination_principal_amount": 425000,
"past_due_amount": 2304,
"property_address": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"ytd_interest_paid": 12300.4,
"ytd_principal_paid": 12340.5
}
],
"student": [
{
"account_id": "Pp1Vpkl9w8sajvK6oEEKtr7vZxBnGpf7LxxLE",
"account_number": "4277075694",
"disbursement_dates": [
"2002-08-28"
],
"expected_payoff_date": "2032-07-28",
"guarantor": "DEPT OF ED",
"interest_rate_percentage": 5.25,
"is_overdue": false,
"last_payment_amount": 138.05,
"last_payment_date": "2019-04-22",
"last_statement_issue_date": "2019-04-28",
"loan_name": "Consolidation",
"loan_status": {
"end_date": "2032-07-28",
"type": "repayment"
},
"minimum_payment_amount": 25,
"next_payment_due_date": "2019-05-28",
"origination_date": "2002-08-28",
"origination_principal_amount": 25000,
"outstanding_interest_amount": 6227.36,
"payment_reference_number": "4277075694",
"pslf_status": {
"estimated_eligibility_date": "2021-01-01",
"payments_made": 200,
"payments_remaining": 160
},
"repayment_plan": {
"description": "Standard Repayment",
"type": "standard"
},
"sequence_number": "1",
"servicer_address": {
"city": "San Matias",
"country": "US",
"postal_code": "99415",
"region": "CA",
"street": "123 Relaxation Road"
},
"ytd_interest_paid": 280.55,
"ytd_principal_paid": 271.65
}
]
},
"request_id": "dTnnm60WgKGLnKL"
}
POST
Retrieve Link sessions for your user
{{baseUrl}}/credit/sessions/get
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/sessions/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/sessions/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/sessions/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/sessions/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/sessions/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/sessions/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/sessions/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/sessions/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/sessions/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/sessions/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/sessions/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/sessions/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/sessions/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/sessions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/sessions/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/sessions/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/sessions/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/sessions/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/sessions/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/sessions/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/sessions/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/sessions/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/sessions/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/sessions/get",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/sessions/get', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/sessions/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/sessions/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/sessions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/sessions/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/sessions/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/sessions/get"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/sessions/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/sessions/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/sessions/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/sessions/get";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/sessions/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/sessions/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/sessions/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/sessions/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "Aim3b",
"sessions": [
{
"link_session_id": "356dbb28-7f98-44d1-8e6d-0cec580f3171",
"results": {
"bank_income_results": [
{
"institution_id": "ins_56",
"item_id": "M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op",
"status": "APPROVED"
}
],
"item_add_results": [
{
"institution_id": "ins_56",
"item_id": "M5eVJqLnv3tbzdngLDp9FL5OlDNxlNhlE55op",
"public_token": "public-sandbox-5c224a01-8314-4491-a06f-39e193d5cddc"
}
]
},
"session_start_time": "2022-09-30T23:40:30.946225Z"
},
{
"link_session_id": "f742cae8-31e4-49cc-a621-6cafbdb26fb9",
"results": {
"payroll_income_results": [
{
"institution_id": "ins_92",
"num_paystubs_retrieved": 2,
"num_w2s_retrieved": 1
}
]
},
"session_start_time": "2022-09-26T23:40:30.946225Z"
}
]
}
POST
Retrieve a PDF Asset Report
{{baseUrl}}/asset_report/pdf/get
BODY json
{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/pdf/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/pdf/get" {:content-type :json
:form-params {:asset_report_token ""
:client_id ""
:options {:days_to_include 0}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/pdf/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/pdf/get"),
Content = new StringContent("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/pdf/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/pdf/get"
payload := strings.NewReader("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/pdf/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110
{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/pdf/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/pdf/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/pdf/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/pdf/get")
.header("content-type", "application/json")
.body("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
asset_report_token: '',
client_id: '',
options: {
days_to_include: 0
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/pdf/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/pdf/get',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
options: {days_to_include: 0},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/pdf/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","options":{"days_to_include":0},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/pdf/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "asset_report_token": "",\n "client_id": "",\n "options": {\n "days_to_include": 0\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/pdf/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/pdf/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
asset_report_token: '',
client_id: '',
options: {days_to_include: 0},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/pdf/get',
headers: {'content-type': 'application/json'},
body: {
asset_report_token: '',
client_id: '',
options: {days_to_include: 0},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/pdf/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
asset_report_token: '',
client_id: '',
options: {
days_to_include: 0
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/pdf/get',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
options: {days_to_include: 0},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/pdf/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","options":{"days_to_include":0},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"asset_report_token": @"",
@"client_id": @"",
@"options": @{ @"days_to_include": @0 },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/pdf/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/pdf/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/pdf/get",
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([
'asset_report_token' => '',
'client_id' => '',
'options' => [
'days_to_include' => 0
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/pdf/get', [
'body' => '{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/pdf/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'asset_report_token' => '',
'client_id' => '',
'options' => [
'days_to_include' => 0
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'asset_report_token' => '',
'client_id' => '',
'options' => [
'days_to_include' => 0
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/pdf/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/pdf/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/pdf/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/pdf/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/pdf/get"
payload = {
"asset_report_token": "",
"client_id": "",
"options": { "days_to_include": 0 },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/pdf/get"
payload <- "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/pdf/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/pdf/get') do |req|
req.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/pdf/get";
let payload = json!({
"asset_report_token": "",
"client_id": "",
"options": json!({"days_to_include": 0}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/pdf/get \
--header 'content-type: application/json' \
--data '{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}'
echo '{
"asset_report_token": "",
"client_id": "",
"options": {
"days_to_include": 0
},
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/pdf/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "asset_report_token": "",\n "client_id": "",\n "options": {\n "days_to_include": 0\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/pdf/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"asset_report_token": "",
"client_id": "",
"options": ["days_to_include": 0],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/pdf/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Retrieve a bank transfer
{{baseUrl}}/bank_transfer/get
BODY json
{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/get" {:content-type :json
:form-params {:bank_transfer_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/get"),
Content = new StringContent("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/get"
payload := strings.NewReader("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/get")
.header("content-type", "application/json")
.body("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
bank_transfer_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/get',
headers: {'content-type': 'application/json'},
data: {bank_transfer_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bank_transfer_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({bank_transfer_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/get',
headers: {'content-type': 'application/json'},
body: {bank_transfer_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bank_transfer_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/get',
headers: {'content-type': 'application/json'},
data: {bank_transfer_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bank_transfer_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/get",
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([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/get', [
'body' => '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/get"
payload = {
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/get"
payload <- "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/get') do |req|
req.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/get";
let payload = json!({
"bank_transfer_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/get \
--header 'content-type: application/json' \
--data '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"bank_transfer_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/bank_transfer/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bank_transfer_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bank_transfer_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfer": {
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"custom_tag": "my tag",
"description": "Testing2",
"direction": "outbound",
"failure_reason": {
"ach_return_code": "R13",
"description": "Invalid ACH routing number"
},
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"status": "pending",
"type": "credit",
"user": {
"email_address": "plaid@plaid.com",
"legal_name": "John Smith",
"routing_number": "111111111"
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Retrieve a dashboard user
{{baseUrl}}/dashboard_user/get
BODY json
{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/dashboard_user/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/dashboard_user/get" {:content-type :json
:form-params {:client_id ""
:dashboard_user_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/dashboard_user/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/dashboard_user/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/dashboard_user/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/dashboard_user/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/dashboard_user/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/dashboard_user/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/dashboard_user/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/dashboard_user/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/dashboard_user/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
dashboard_user_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/dashboard_user/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', dashboard_user_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/dashboard_user/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","dashboard_user_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/dashboard_user/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "dashboard_user_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/dashboard_user/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/dashboard_user/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', dashboard_user_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', dashboard_user_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/dashboard_user/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
dashboard_user_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/dashboard_user/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', dashboard_user_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/dashboard_user/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","dashboard_user_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"dashboard_user_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/dashboard_user/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/dashboard_user/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/dashboard_user/get",
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([
'client_id' => '',
'dashboard_user_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/dashboard_user/get', [
'body' => '{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/dashboard_user/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'dashboard_user_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'dashboard_user_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/dashboard_user/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/dashboard_user/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/dashboard_user/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/dashboard_user/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/dashboard_user/get"
payload = {
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/dashboard_user/get"
payload <- "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/dashboard_user/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/dashboard_user/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"dashboard_user_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/dashboard_user/get";
let payload = json!({
"client_id": "",
"dashboard_user_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/dashboard_user/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"dashboard_user_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/dashboard_user/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "dashboard_user_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/dashboard_user/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"dashboard_user_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/dashboard_user/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"created_at": "2020-07-24T03:26:02Z",
"email_address": "user@example.com",
"id": "54350110fedcbaf01234ffee",
"request_id": "saKrIBuEB9qJZng",
"status": "active"
}
POST
Retrieve a deposit switch
{{baseUrl}}/deposit_switch/get
BODY json
{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/deposit_switch/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/deposit_switch/get" {:content-type :json
:form-params {:client_id ""
:deposit_switch_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/deposit_switch/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/deposit_switch/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/deposit_switch/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/deposit_switch/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/deposit_switch/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 64
{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/deposit_switch/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/deposit_switch/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/deposit_switch/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/deposit_switch/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
deposit_switch_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/deposit_switch/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', deposit_switch_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/deposit_switch/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","deposit_switch_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/deposit_switch/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "deposit_switch_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/deposit_switch/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/deposit_switch/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', deposit_switch_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', deposit_switch_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/deposit_switch/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
deposit_switch_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/deposit_switch/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', deposit_switch_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/deposit_switch/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","deposit_switch_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"deposit_switch_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/deposit_switch/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/deposit_switch/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/deposit_switch/get",
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([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/deposit_switch/get', [
'body' => '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/deposit_switch/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'deposit_switch_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/deposit_switch/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/deposit_switch/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/deposit_switch/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/deposit_switch/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/deposit_switch/get"
payload = {
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/deposit_switch/get"
payload <- "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/deposit_switch/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/deposit_switch/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"deposit_switch_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/deposit_switch/get";
let payload = json!({
"client_id": "",
"deposit_switch_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/deposit_switch/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"deposit_switch_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/deposit_switch/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "deposit_switch_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/deposit_switch/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"deposit_switch_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/deposit_switch/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"account_has_multiple_allocations": true,
"amount_allocated": null,
"date_completed": "2019-11-01",
"date_created": "2019-11-01",
"deposit_switch_id": "LjDyMfMkVpqLmEm1VR7bQikR3BX5hEMdRAkq1",
"employer_id": "pqLmEm1VR7bQi11231",
"employer_name": "COMPANY INC",
"institution_id": "ins_1",
"institution_name": "Bank of America",
"is_allocated_remainder": false,
"percent_allocated": 50,
"request_id": "lMjeOeu9X1VUh1F",
"state": "completed",
"switch_method": "instant",
"target_account_id": "bX5hEMdRAkq1QikR3BLjDyMfMkVpqLmEm1VR7",
"target_item_id": "MdRAkq1QikR3BLjDyMfMkVpqLmEm1VR7bX5hE"
}
POST
Retrieve a recurring transfer
{{baseUrl}}/transfer/recurring/get
BODY json
{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/recurring/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/recurring/get" {:content-type :json
:form-params {:client_id ""
:recurring_transfer_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/recurring/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/recurring/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/recurring/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/recurring/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/recurring/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/recurring/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/recurring/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/recurring/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/recurring/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
recurring_transfer_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/recurring/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', recurring_transfer_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/recurring/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recurring_transfer_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/recurring/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "recurring_transfer_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/recurring/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/recurring/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', recurring_transfer_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', recurring_transfer_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/recurring/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
recurring_transfer_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/recurring/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', recurring_transfer_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/recurring/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","recurring_transfer_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"recurring_transfer_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/recurring/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/recurring/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/recurring/get",
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([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/recurring/get', [
'body' => '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/recurring/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'recurring_transfer_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/recurring/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/recurring/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/recurring/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/recurring/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/recurring/get"
payload = {
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/recurring/get"
payload <- "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/recurring/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/recurring/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"recurring_transfer_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/recurring/get";
let payload = json!({
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/recurring/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/recurring/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "recurring_transfer_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/recurring/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"recurring_transfer_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/recurring/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"recurring_transfer": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"created": "2022-07-05T12:48:37Z",
"description": "payment",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"iso_currency_code": "USD",
"network": "ach",
"next_origination_date": "2022-10-28",
"origination_account_id": "",
"recurring_transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"schedule": {
"end_date": "2023-10-01",
"interval_count": 1,
"interval_execution_day": 5,
"interval_unit": "week",
"start_date": "2022-10-01"
},
"status": "active",
"test_clock_id": null,
"transfer_ids": [
"271ef220-dbf8-caeb-a7dc-a2b3e8a80963",
"c8dbaf75-2abb-e2dc-4171-12448e13b848"
],
"type": "debit",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Retrieve a refund
{{baseUrl}}/transfer/refund/get
BODY json
{
"client_id": "",
"refund_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/refund/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/refund/get" {:content-type :json
:form-params {:client_id ""
:refund_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/refund/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/refund/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/refund/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/refund/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/refund/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 56
{
"client_id": "",
"refund_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/refund/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/refund/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/refund/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/refund/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
refund_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/refund/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', refund_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/refund/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","refund_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/refund/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "refund_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/refund/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/refund/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', refund_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', refund_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/refund/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
refund_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/refund/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', refund_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/refund/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","refund_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"refund_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/refund/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/refund/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/refund/get",
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([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/refund/get', [
'body' => '{
"client_id": "",
"refund_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/refund/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'refund_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/refund/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/refund/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/refund/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/refund/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/refund/get"
payload = {
"client_id": "",
"refund_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/refund/get"
payload <- "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/refund/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/refund/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"refund_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/refund/get";
let payload = json!({
"client_id": "",
"refund_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/refund/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"refund_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"refund_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/refund/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "refund_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/refund/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"refund_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/refund/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"refund": {
"amount": "12.34",
"created": "2020-08-06T17:27:15Z",
"id": "667af684-9ee1-4f5f-862a-633ec4c545cc",
"status": "pending",
"transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9"
},
"request_id": "saKrIBuEB9qJZno"
}
POST
Retrieve a summary of an individual's employment information
{{baseUrl}}/credit/employment/get
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/employment/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/employment/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/employment/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/employment/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/employment/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/employment/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/employment/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/employment/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/employment/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/employment/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/employment/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/employment/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/employment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/employment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/employment/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/employment/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/employment/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/employment/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/employment/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/employment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/employment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/employment/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/employment/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/employment/get",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/employment/get', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/employment/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/employment/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/employment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/employment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/employment/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/employment/get"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/employment/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/employment/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/employment/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/employment/get";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/employment/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/employment/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/employment/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/employment/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"items": [
{
"employments": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"employee_type": "FULL_TIME",
"employer": {
"name": "Plaid Inc"
},
"end_date": null,
"last_paystub_date": "2022-01-15",
"platform_ids": {
"employee_id": "1234567",
"payroll_id": "1234567",
"position_id": "8888"
},
"start_date": "2020-01-01",
"status": "ACTIVE",
"title": "Software Engineer"
}
],
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6"
}
],
"request_id": "LhQf0THi8SH1yJm"
}
POST
Retrieve a sweep (POST)
{{baseUrl}}/transfer/sweep/get
BODY json
{
"client_id": "",
"secret": "",
"sweep_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/sweep/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/sweep/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:sweep_id ""}})
require "http/client"
url = "{{baseUrl}}/transfer/sweep/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/sweep/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/sweep/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/sweep/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/sweep/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"client_id": "",
"secret": "",
"sweep_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/sweep/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/sweep/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/sweep/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/sweep/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
sweep_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/sweep/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', sweep_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/sweep/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","sweep_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/sweep/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "sweep_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/sweep/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/sweep/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', sweep_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', sweep_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/sweep/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
sweep_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/sweep/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', sweep_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/sweep/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","sweep_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"sweep_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/sweep/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/sweep/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/sweep/get",
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([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/sweep/get', [
'body' => '{
"client_id": "",
"secret": "",
"sweep_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/sweep/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/sweep/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/sweep/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/sweep/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/sweep/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/sweep/get"
payload = {
"client_id": "",
"secret": "",
"sweep_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/sweep/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/sweep/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/sweep/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/sweep/get";
let payload = json!({
"client_id": "",
"secret": "",
"sweep_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/sweep/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"sweep_id": ""
}' | \
http POST {{baseUrl}}/transfer/sweep/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "sweep_id": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/sweep/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"sweep_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/sweep/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"sweep": {
"amount": "12.34",
"created": "2020-08-06T17:27:15Z",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"id": "8c2fda9a-aa2f-4735-a00f-f4e0d2d2faee",
"iso_currency_code": "USD",
"settled": "2020-08-07"
}
}
POST
Retrieve a sweep
{{baseUrl}}/bank_transfer/sweep/get
BODY json
{
"client_id": "",
"secret": "",
"sweep_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/sweep/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/sweep/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:sweep_id ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/sweep/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/sweep/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/sweep/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/sweep/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/sweep/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 55
{
"client_id": "",
"secret": "",
"sweep_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/sweep/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/sweep/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/sweep/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/sweep/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
sweep_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/sweep/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', sweep_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/sweep/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","sweep_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/sweep/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "sweep_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/sweep/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/sweep/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', sweep_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', sweep_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/sweep/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
sweep_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/sweep/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', sweep_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/sweep/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","sweep_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"sweep_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/sweep/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/sweep/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/sweep/get",
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([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/sweep/get', [
'body' => '{
"client_id": "",
"secret": "",
"sweep_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/sweep/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'sweep_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/sweep/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/sweep/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/sweep/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/sweep/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/sweep/get"
payload = {
"client_id": "",
"secret": "",
"sweep_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/sweep/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/sweep/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/sweep/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"sweep_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/sweep/get";
let payload = json!({
"client_id": "",
"secret": "",
"sweep_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/sweep/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"sweep_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"sweep_id": ""
}' | \
http POST {{baseUrl}}/bank_transfer/sweep/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "sweep_id": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/sweep/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"sweep_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/sweep/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"sweep": {
"amount": "12.34",
"created_at": "2020-08-06T17:27:15Z",
"id": "d5394a4d-0b04-4a02-9f4a-7ca5c0f52f9d",
"iso_currency_code": "USD"
}
}
POST
Retrieve a transfer
{{baseUrl}}/transfer/get
BODY json
{
"client_id": "",
"secret": "",
"transfer_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:transfer_id ""}})
require "http/client"
url = "{{baseUrl}}/transfer/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 58
{
"client_id": "",
"secret": "",
"transfer_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
transfer_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "transfer_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', transfer_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', transfer_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
transfer_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"transfer_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/get",
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([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/get', [
'body' => '{
"client_id": "",
"secret": "",
"transfer_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'transfer_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/get"
payload = {
"client_id": "",
"secret": "",
"transfer_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/get";
let payload = json!({
"client_id": "",
"secret": "",
"transfer_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"transfer_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"transfer_id": ""
}' | \
http POST {{baseUrl}}/transfer/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "transfer_id": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"transfer_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"transfer": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"cancellable": true,
"created": "2020-08-06T17:27:15Z",
"description": "Desc",
"expected_settlement_date": "2020-08-04",
"failure_reason": {
"ach_return_code": "R13",
"description": "Invalid ACH routing number"
},
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"guarantee_decision": null,
"guarantee_decision_rationale": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"network": "ach",
"origination_account_id": "",
"originator_client_id": null,
"recurring_transfer_id": null,
"refunds": [],
"standard_return_window": "2020-08-07",
"status": "pending",
"type": "credit",
"unauthorized_return_window": "2020-10-07",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "CA",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
}
POST
Retrieve a user's payroll information
{{baseUrl}}/credit/payroll_income/get
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/payroll_income/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/payroll_income/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/payroll_income/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/payroll_income/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/payroll_income/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/payroll_income/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/payroll_income/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/payroll_income/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/payroll_income/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/payroll_income/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/payroll_income/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/payroll_income/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/payroll_income/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/payroll_income/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/payroll_income/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/payroll_income/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/payroll_income/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/payroll_income/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/payroll_income/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/payroll_income/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/payroll_income/get",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/payroll_income/get', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/payroll_income/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/payroll_income/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/payroll_income/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/payroll_income/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/payroll_income/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/payroll_income/get"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/payroll_income/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/payroll_income/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/payroll_income/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/payroll_income/get";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/payroll_income/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/payroll_income/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/payroll_income/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/payroll_income/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"items": [
{
"accounts": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"pay_frequency": "BIWEEKLY",
"rate_of_pay": {
"pay_amount": 100000,
"pay_rate": "ANNUAL"
}
}
],
"institution_id": "ins_92",
"institution_name": "ADP",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"payroll_income": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"form1099s": [
{
"april_amount": null,
"august_amount": null,
"card_not_present_transaction": null,
"crop_insurance_proceeds": 1000,
"december_amount": null,
"document_id": "mvMZ59Z2a5",
"document_metadata": {
"document_type": "US_TAX_1099_MISC",
"download_url": null,
"name": "form_1099_misc.pdf",
"status": "PROCESSING_COMPLETE"
},
"excess_golden_parachute_payments": 1000,
"feburary_amount": null,
"federal_income_tax_withheld": 1000,
"filer": {
"address": {
"city": null,
"country": null,
"postal_code": null,
"region": null,
"street": null
},
"name": null,
"tin": null,
"type": null
},
"fishing_boat_proceeds": 1000,
"form_1099_type": "FORM_1099_TYPE_MISC",
"gross_amount": 1000,
"gross_proceeds_paid_to_an_attorney": 1000,
"january_amount": null,
"july_amount": null,
"june_amount": null,
"march_amount": null,
"may_amount": null,
"medical_and_healthcare_payments": 1000,
"merchant_category_code": null,
"nonemployee_compensation": 1000,
"november_amount": null,
"number_of_payment_transactions": null,
"october_amount": null,
"other_income": 1000,
"payer": {
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94111",
"region": "CA",
"street": "1098 HARRISON ST"
},
"name": "PLAID INC",
"telephone_number": "(123)456-7890",
"tin": "12-3456789"
},
"payer_made_direct_sales_of_500_or_more_of_consumer_products_to_buyer": null,
"payer_state_number": "CA 12345",
"payer_state_number_lower": null,
"primary_state": null,
"primary_state_id": "CA 12345",
"primary_state_income_tax": 1000,
"pse_name": null,
"pse_telephone_number": null,
"recipient": {
"account_number": "45678",
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94133",
"region": "CA",
"street": "2140 TAYLOR ST"
},
"facta_filing_requirement": "CHECKED",
"name": "Josie Georgia Harrison",
"second_tin_exists": "NOT CHECKED",
"tin": "12-3456789"
},
"rents": 1000,
"royalties": 1000,
"secondary_state": null,
"secondary_state_id": null,
"secondary_state_income_tax": null,
"section_409a_deferrals": 1000,
"section_409a_income": 1000,
"september_amount": null,
"state_income": 1000,
"state_income_lower": null,
"state_tax_withheld": 1000,
"state_tax_withheld_lower": null,
"substitute_payments_in_lieu_of_dividends_or_interest": null,
"tax_year": "2022",
"transactions_reported": null
}
],
"pay_stubs": [
{
"deductions": {
"breakdown": [
{
"current_amount": 123.45,
"description": "taxes",
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 246.9
}
],
"total": {
"current_amount": 123.45,
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 246.9
}
},
"document_id": "2jkflanbd",
"document_metadata": {
"document_type": "PAYSTUB",
"download_url": null,
"name": "paystub.pdf",
"status": "PROCESSING_COMPLETE"
},
"earnings": {
"breakdown": [
{
"canonical_description": "REGULAR_PAY",
"current_amount": 200.22,
"description": "salary earned",
"hours": 80,
"iso_currency_code": "USD",
"rate": null,
"unofficial_currency_code": null,
"ytd_amount": 400.44
},
{
"canonical_description": "BONUS",
"current_amount": 100,
"description": "bonus earned",
"hours": null,
"iso_currency_code": "USD",
"rate": null,
"unofficial_currency_code": null,
"ytd_amount": 100
}
],
"total": {
"current_amount": 300.22,
"hours": 160,
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 500.44
}
},
"employee": {
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94133",
"region": "CA",
"street": "2140 TAYLOR ST"
},
"marital_status": "SINGLE",
"name": "ANNA CHARLESTON",
"taxpayer_id": {
"id_mask": "3333",
"id_type": "SSN"
}
},
"employer": {
"address": {
"city": "SAN FRANCISCO",
"country": "US",
"postal_code": "94111",
"region": "CA",
"street": "1098 HARRISON ST"
},
"name": "PLAID INC"
},
"net_pay": {
"current_amount": 123.34,
"description": "TOTAL NET PAY",
"iso_currency_code": "USD",
"unofficial_currency_code": null,
"ytd_amount": 253.54
},
"pay_period_details": {
"distribution_breakdown": [
{
"account_name": "Big time checking",
"bank_name": "bank of plaid",
"current_amount": 176.77,
"iso_currency_code": "USD",
"mask": "1223",
"type": "checking",
"unofficial_currency_code": null
}
],
"end_date": "2020-12-15",
"gross_earnings": 4500,
"iso_currency_code": "USD",
"pay_amount": 1490.21,
"pay_date": "2020-12-15",
"pay_frequency": "BIWEEKLY",
"start_date": "2020-12-01",
"unofficial_currency_code": null
}
}
],
"w2s": [
{
"allocated_tips": "1000",
"box_12": [
{
"amount": "200",
"code": "AA"
}
],
"box_9": "box9",
"dependent_care_benefits": "1000",
"document_id": "1pkflebk4",
"document_metadata": {
"document_type": "US_TAX_W2",
"download_url": null,
"name": "w_2.pdf",
"status": "PROCESSING_COMPLETE"
},
"employee": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94103",
"region": "CA",
"street": "1234 Grand St"
},
"marital_status": "SINGLE",
"name": "Josie Georgia Harrison",
"taxpayer_id": {
"id_mask": "1234",
"id_type": "SSN"
}
},
"employer": {
"address": {
"city": "New York",
"country": "US",
"postal_code": "10010",
"region": "NY",
"street": "456 Main St"
},
"name": "Acme Inc"
},
"employer_id_number": "12-1234567",
"federal_income_tax_withheld": "1000",
"medicare_tax_withheld": "1000",
"medicare_wages_and_tips": "1000",
"nonqualified_plans": "1000",
"other": "other",
"retirement_plan": "CHECKED",
"social_security_tax_withheld": "1000",
"social_security_tips": "1000",
"social_security_wages": "1000",
"state_and_local_wages": [
{
"employer_state_id_number": "11111111111AAA",
"local_income_tax": "200",
"local_wages_and_tips": "200",
"locality_name": "local",
"state": "UT",
"state_income_tax": "200",
"state_wages_tips": "200"
}
],
"statutory_employee": "CHECKED",
"tax_year": "2020",
"third_party_sick_pay": "CHECKED",
"wages_tips_other_comp": "1000"
}
]
}
],
"status": {
"processing_status": "PROCESSING_COMPLETE"
},
"updated_at": "2022-08-02T21:14:54Z"
}
],
"request_id": "2pxQ59buGdsHRef"
}
POST
Retrieve accounts
{{baseUrl}}/accounts/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/accounts/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/accounts/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/accounts/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounts/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', options: {account_ids: []}, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounts/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/accounts/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/accounts/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/get"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/accounts/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/accounts/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "blgvvBlXw3cq5GMPwqB6s6q4dLKB9WcVqGDGo",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"persistent_account_id": "8cfb8beb89b774ee43b090625f0d61d0814322b43bff984eaf60386e",
"subtype": "checking",
"type": "depository"
},
{
"account_id": "6PdjjRP6LmugpBy5NgQvUqpRXMWxzktg3rwrk",
"balances": {
"available": null,
"current": 23631.9805,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "6666",
"name": "Plaid 401k",
"official_name": null,
"subtype": "401k",
"type": "investment"
},
{
"account_id": "XMBvvyMGQ1UoLbKByoMqH3nXMj84ALSdE5B58",
"balances": {
"available": null,
"current": 65262,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "7777",
"name": "Plaid Student Loan",
"official_name": null,
"subtype": "student",
"type": "loan"
}
],
"item": {
"available_products": [
"balance",
"identity",
"payment_initiation",
"transactions"
],
"billed_products": [
"assets",
"auth"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_117650",
"item_id": "DWVAAPWq4RHGlEaNyGKRTAnPLaEmo8Cvq7na6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "bkVE1BHWMAZ9Rnr"
}
POST
Retrieve an Asset Report Audit Copy
{{baseUrl}}/asset_report/audit_copy/get
BODY json
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/audit_copy/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/audit_copy/get" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/audit_copy/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/audit_copy/get"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/audit_copy/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/audit_copy/get"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/audit_copy/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/audit_copy/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/audit_copy/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/audit_copy/get")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/audit_copy/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/audit_copy/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/audit_copy/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/audit_copy/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/audit_copy/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/get',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/audit_copy/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/audit_copy/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/audit_copy/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/audit_copy/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/audit_copy/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/audit_copy/get",
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([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/audit_copy/get', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/audit_copy/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/audit_copy/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/audit_copy/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/audit_copy/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/audit_copy/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/audit_copy/get"
payload = {
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/audit_copy/get"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/audit_copy/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/audit_copy/get') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/audit_copy/get";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/audit_copy/get \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/audit_copy/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/audit_copy/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/audit_copy/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Retrieve an Asset Report with Freddie Mac format (aka VOA - Verification Of Assets), and a Verification Of Employment (VOE) report if this one is available. Only Freddie Mac can use this endpoint.
{{baseUrl}}/credit/freddie_mac/reports/get
BODY json
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/freddie_mac/reports/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/freddie_mac/reports/get" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/freddie_mac/reports/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/freddie_mac/reports/get"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/freddie_mac/reports/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/freddie_mac/reports/get"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/freddie_mac/reports/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/freddie_mac/reports/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/freddie_mac/reports/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/freddie_mac/reports/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/freddie_mac/reports/get")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/freddie_mac/reports/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/freddie_mac/reports/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/freddie_mac/reports/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/freddie_mac/reports/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/freddie_mac/reports/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/freddie_mac/reports/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/freddie_mac/reports/get',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/freddie_mac/reports/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/freddie_mac/reports/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/freddie_mac/reports/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/freddie_mac/reports/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/freddie_mac/reports/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/freddie_mac/reports/get",
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([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/freddie_mac/reports/get', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/freddie_mac/reports/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/freddie_mac/reports/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/freddie_mac/reports/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/freddie_mac/reports/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/freddie_mac/reports/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/freddie_mac/reports/get"
payload = {
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/freddie_mac/reports/get"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/freddie_mac/reports/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/freddie_mac/reports/get') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/freddie_mac/reports/get";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/freddie_mac/reports/get \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/credit/freddie_mac/reports/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/freddie_mac/reports/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/freddie_mac/reports/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"VOA": {
"DEAL": {
"LOANS": {
"LOAN": {
"LOAN_IDENTIFIERS": {
"LOAN_IDENTIFIER": [
{
"LoanIdentifier": "100016746",
"LoanIdentifierType": "LenderLoan"
}
]
},
"LoanRoleType": "SubjectLoan"
}
},
"PARTIES": {
"PARTY": [
{
"INDIVIDUAL": {
"NAME": {
"FirstName": "John",
"LastName": "Deere",
"MiddleName": "S"
}
},
"ROLES": {
"ROLE": {
"ROLE_DETAIL": {
"PartyRoleType": "Borrower"
}
}
},
"TAXPAYER_IDENTIFIERS": {
"TAXPAYER_IDENTIFIER": {
"TaxpayerIdentifierType": "SocialSecurityNumber",
"TaxpayerIdentifierValue": "123-45-6789"
}
}
}
]
},
"SERVICES": {
"SERVICE": {
"STATUSES": {
"STATUS": {
"StatusCode": "success",
"StatusDescription": null
}
},
"VERIFICATION_OF_ASSET": [
{
"REPORTING_INFORMATION": {
"ReportDateTime": "",
"ReportIdentifierType": "ReportID",
"ReportingInformationIdentifier": "a-prod-kol4xb5y4nf2zecqalb2d55mze"
},
"SERVICE_PRODUCT_FULFILLMENT": {
"SERVICE_PRODUCT_FULFILLMENT_DETAIL": {
"ServiceProductFulfillmentIdentifier": "VOA",
"VendorOrderIdentifier": "PLAD"
}
},
"VERIFICATION_OF_ASSET_RESPONSE": {
"ASSETS": {
"ASSET": [
{
"ASSET_DETAIL": {
"AssetAccountIdentifier": "3847",
"AssetAsOfDate": "2022-07-27",
"AssetAvailableBalanceAmount": 2073.99,
"AssetCurrentBalanceAmount": 2007.09,
"AssetDaysRequestedCount": 61,
"AssetDescription": "Unlimited Cash Rewards Visa Signature",
"AssetOwnershipType": null,
"AssetType": "Other",
"AssetTypeAdditionalDescription": "credit card",
"AssetUniqueIdentifier": "c251a55e-c503-471b-a3b1-11a9243bc189"
},
"ASSET_HOLDER": {
"NAME": {
"FullName": "Wells Fargo"
}
},
"ASSET_OWNERS": {
"ASSET_OWNER": [
{
"AssetOwnerText": "Alberta Bobbeth Charleson"
}
]
},
"ASSET_TRANSACTIONS": {
"ASSET_TRANSACTION": [
{
"ASSET_TRANSACTION_DESCRIPTION": [
{
"AssetTransactionDescription": "TONYS PIZZA NAPOLETANA SAN FRANCISCOCA"
}
],
"ASSET_TRANSACTION_DETAIL": {
"AssetTransactionAmount": 34.43,
"AssetTransactionCategoryType": "FoodDining",
"AssetTransactionDate": "2022-07-19",
"AssetTransactionPaidByName": null,
"AssetTransactionPostDate": "2022-07-19",
"AssetTransactionType": "Debit",
"AssetTransactionTypeAdditionalDescription": null,
"AssetTransactionUniqueIdentifier": "7jagxo9Eq6cXPKM8eMNJUgeeNnbgQdSDw6zgN",
"FinancialInstitutionTransactionIdentifier": null
}
}
]
},
"VALIDATION_SOURCES": {
"VALIDATION_SOURCE": [
{
"ValidationSourceName": "",
"ValidationSourceReferenceIdentifier": ""
}
]
}
}
]
}
}
}
]
}
}
},
"SchemaVersion": 2.4
},
"VOE": {
"DEAL": {
"LOANS": {
"LOAN": {
"LOAN_IDENTIFIERS": {
"LOAN_IDENTIFIER": [
{
"LoanIdentifier": "100016746",
"LoanIdentifierType": "LenderLoan"
}
]
},
"LoanRoleType": "SubjectLoan"
}
},
"PARTIES": {
"PARTY": [
{
"INDIVIDUAL": {
"NAME": {
"FirstName": "John",
"LastName": "Freddie",
"MiddleName": "S"
}
},
"ROLES": {
"ROLE": {
"ROLE_DETAIL": {
"PartyRoleType": "Borrower"
}
}
},
"TAXPAYER_IDENTIFIERS": {
"TAXPAYER_IDENTIFIER": {
"TaxpayerIdentifierType": "SocialSecurityNumber",
"TaxpayerIdentifierValue": "123-45-6789"
}
}
}
]
},
"SERVICES": {
"SERVICE": {
"STATUSES": {
"STATUS": {
"StatusCode": "success",
"StatusDescription": null
}
},
"VERIFICATION_OF_ASSET": [
{
"REPORTING_INFORMATION": {
"ReportDateTime": "",
"ReportIdentifierType\"": "ReportID",
"ReportingInformationIdentifier": "a-prod-kol4xb5y4nf2zecqalb2d55mze"
},
"SERVICE_PRODUCT_FULFILLMENT": {
"SERVICE_PRODUCT_FULFILLMENT_DETAIL": {
"ServiceProductFulfillmentIdentifier": "VOETRANSACTIONS",
"VendorOrderIdentifier": "PLAD"
}
},
"VERIFICATION_OF_ASSET_RESPONSE": {
"ASSETS": {
"ASSET": [
{
"ASSET_DETAIL": {
"AssetAccountIdentifier": "3847",
"AssetAsOfDate": "2022-07-27",
"AssetDaysRequestedCount": 61,
"AssetDescription": "Unlimited Cash Rewards Visa Signature",
"AssetOwnershipType": null,
"AssetType": "Other",
"AssetTypeAdditionalDescription": "credit card",
"AssetUniqueIdentifier": "c251a55e-c503-471b-a3b1-11a9243bc189"
},
"ASSET_HOLDER": {
"NAME": {
"FullName": "Wells Fargo"
}
},
"ASSET_OWNERS": {
"ASSET_OWNER": [
{
"AssetOwnerText": "Alberta Bobbeth Charleson"
}
]
},
"ASSET_TRANSACTIONS": {
"ASSET_TRANSACTION": [
{
"ASSET_TRANSACTION_DESCRIPTION": [
{
"AssetTransactionDescription": "TONYS PIZZA NAPOLETANA SAN FRANCISCOCA"
}
],
"ASSET_TRANSACTION_DETAIL": {
"AssetTransactionCategoryType": "FoodDining",
"AssetTransactionDate": "2022-07-19",
"AssetTransactionPaidByName": null,
"AssetTransactionPaidToName": null,
"AssetTransactionPostDate": "2022-07-19",
"AssetTransactionType": "Debit",
"AssetTransactionTypeAdditionalDescription": null,
"AssetTransactionUniqueIdentifier": "7jagxo9Eq6cXPKM8eMNJUgeeNnbgQdSDw6zgN",
"FinancialInstitutionTransactionIdentifier": null
}
}
]
}
}
]
}
}
}
]
}
}
},
"SchemaVersion": 2.5
},
"request_id": "eYupqX1mZkEuQRx"
}
POST
Retrieve an Asset Report with Freddie Mac format. Only Freddie Mac can use this endpoint.
{{baseUrl}}/credit/asset_report/freddie_mac/get
BODY json
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/asset_report/freddie_mac/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/asset_report/freddie_mac/get" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/asset_report/freddie_mac/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/asset_report/freddie_mac/get"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/asset_report/freddie_mac/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/asset_report/freddie_mac/get"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/asset_report/freddie_mac/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 63
{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/asset_report/freddie_mac/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/asset_report/freddie_mac/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/asset_report/freddie_mac/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/asset_report/freddie_mac/get")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/asset_report/freddie_mac/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/asset_report/freddie_mac/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/asset_report/freddie_mac/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/asset_report/freddie_mac/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/asset_report/freddie_mac/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/asset_report/freddie_mac/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/asset_report/freddie_mac/get',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/asset_report/freddie_mac/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/asset_report/freddie_mac/get',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/asset_report/freddie_mac/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/asset_report/freddie_mac/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/asset_report/freddie_mac/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/asset_report/freddie_mac/get",
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([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/asset_report/freddie_mac/get', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/asset_report/freddie_mac/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/asset_report/freddie_mac/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/asset_report/freddie_mac/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/asset_report/freddie_mac/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/asset_report/freddie_mac/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/asset_report/freddie_mac/get"
payload = {
"audit_copy_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/asset_report/freddie_mac/get"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/asset_report/freddie_mac/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/asset_report/freddie_mac/get') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/asset_report/freddie_mac/get";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/asset_report/freddie_mac/get \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/credit/asset_report/freddie_mac/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/asset_report/freddie_mac/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/asset_report/freddie_mac/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"DEAL": {
"LOANS": {
"LOAN": {
"LOAN_IDENTIFIERS": {
"LOAN_IDENTIFIER": {
"LoanIdentifier": "100016746",
"LoanIdentifierType": "LenderLoan"
}
}
}
},
"PARTIES": {
"PARTY": [
{
"INDIVIDUAL": {
"NAME": {
"FirstName": "John",
"LastName": "Deere"
}
},
"ROLES": {
"ROLE": {
"ROLE_DETAIL": {
"PartyRoleType": "Borrower"
}
}
},
"TAXPAYER_IDENTIFIERS": {
"TAXPAYER_IDENTIFIER": {
"TaxpayerIdentifierType": "SocialSecurityNumber",
"TaxpayerIdentifierValue": "123-45-6789"
}
}
}
]
},
"SERVICES": {
"SERVICE": {
"STATUSES": {
"STATUS": {
"StatusCode": "success",
"StatusDescription": null
}
},
"VERIFICATION_OF_ASSET": {
"REPORTING_INFORMATION": {
"ReportingInformationIdentifier": "a-prod-kol4xb5y4nf2zecqalb2d55mze"
},
"SERVICE_PRODUCT_FULFILLMENT": {
"SERVICE_PRODUCT_FULFILLMENT_DETAIL": {
"ServiceProductFulfillmentIdentifier": "VOA",
"VendorOrderIdentifier": "PLAD"
}
},
"VERIFICATION_OF_ASSET_RESPONSE": {
"ASSETS": {
"ASSET": [
{
"ASSET_DETAIL": {
"AssetAccountIdentifier": "3847",
"AssetAsOfDate": "2022-07-27",
"AssetAvailableBalanceAmount": 2073.99,
"AssetCurrentBalanceAmount": 2007.09,
"AssetDaysRequestedCount": 61,
"AssetDescription": "Unlimited Cash Rewards Visa Signature",
"AssetOwnershipType": null,
"AssetType": "Other",
"AssetTypeAdditionalDescription": "credit card",
"AssetUniqueIdentifier": "c251a55e-c503-471b-a3b1-11a9243bc189"
},
"ASSET_HOLDER": {
"NAME": {
"FullName": "Wells Fargo"
}
},
"ASSET_OWNERS": {
"ASSET_OWNER": [
{
"AssetOwnerText": "Alberta Bobbeth Charleson"
}
]
},
"ASSET_TRANSACTIONS": {
"ASSET_TRANSACTION": [
{
"ASSET_TRANSACTION_DESCRIPTON": [
{
"AssetTransactionDescription": "TONYS PIZZA NAPOLETANA SAN FRANCISCOCA"
}
],
"ASSET_TRANSACTION_DETAIL": {
"AssetTransactionAmount": 34.43,
"AssetTransactionCategoryType": "FoodDining",
"AssetTransactionDate": "2022-07-19",
"AssetTransactionPaidByName": null,
"AssetTransactionPostDate": "2022-07-19",
"AssetTransactionType": "Debit",
"AssetTransactionTypeAdditionalDescription": null,
"AssetTransactionUniqueIdentifier": "7jagxo9Eq6cXPKM8eMNJUgeeNnbgQdSDw6zgN",
"FinancialInstitutionTransactionIdentifier": null
}
}
]
},
"VALIDATION_SOURCES": {
"VALIDATION_SOURCE": [
{
"ValidationSourceName": "",
"ValidationSourceReferenceIdentifier": ""
}
]
}
}
]
}
}
}
}
}
},
"SchemaVersion": 1,
"request_id": "eYupqX1mZkEuQRx"
}
POST
Retrieve an Asset Report
{{baseUrl}}/asset_report/get
BODY json
{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/asset_report/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/asset_report/get" {:content-type :json
:form-params {:asset_report_token ""
:client_id ""
:fast_report false
:include_insights false
:options {:days_to_include 0}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/asset_report/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/asset_report/get"),
Content = new StringContent("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/asset_report/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/asset_report/get"
payload := strings.NewReader("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/asset_report/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 163
{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/asset_report/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/asset_report/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/asset_report/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/asset_report/get")
.header("content-type", "application/json")
.body("{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {
days_to_include: 0
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/asset_report/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/get',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {days_to_include: 0},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/asset_report/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","fast_report":false,"include_insights":false,"options":{"days_to_include":0},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/asset_report/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "asset_report_token": "",\n "client_id": "",\n "fast_report": false,\n "include_insights": false,\n "options": {\n "days_to_include": 0\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/asset_report/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/asset_report/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {days_to_include: 0},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/get',
headers: {'content-type': 'application/json'},
body: {
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {days_to_include: 0},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/asset_report/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {
days_to_include: 0
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/asset_report/get',
headers: {'content-type': 'application/json'},
data: {
asset_report_token: '',
client_id: '',
fast_report: false,
include_insights: false,
options: {days_to_include: 0},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/asset_report/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"asset_report_token":"","client_id":"","fast_report":false,"include_insights":false,"options":{"days_to_include":0},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"asset_report_token": @"",
@"client_id": @"",
@"fast_report": @NO,
@"include_insights": @NO,
@"options": @{ @"days_to_include": @0 },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/asset_report/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/asset_report/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/asset_report/get",
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([
'asset_report_token' => '',
'client_id' => '',
'fast_report' => null,
'include_insights' => null,
'options' => [
'days_to_include' => 0
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/asset_report/get', [
'body' => '{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/asset_report/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'asset_report_token' => '',
'client_id' => '',
'fast_report' => null,
'include_insights' => null,
'options' => [
'days_to_include' => 0
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'asset_report_token' => '',
'client_id' => '',
'fast_report' => null,
'include_insights' => null,
'options' => [
'days_to_include' => 0
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/asset_report/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/asset_report/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/asset_report/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/asset_report/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/asset_report/get"
payload = {
"asset_report_token": "",
"client_id": "",
"fast_report": False,
"include_insights": False,
"options": { "days_to_include": 0 },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/asset_report/get"
payload <- "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/asset_report/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/asset_report/get') do |req|
req.body = "{\n \"asset_report_token\": \"\",\n \"client_id\": \"\",\n \"fast_report\": false,\n \"include_insights\": false,\n \"options\": {\n \"days_to_include\": 0\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/asset_report/get";
let payload = json!({
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": json!({"days_to_include": 0}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/asset_report/get \
--header 'content-type: application/json' \
--data '{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}'
echo '{
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": {
"days_to_include": 0
},
"secret": ""
}' | \
http POST {{baseUrl}}/asset_report/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "asset_report_token": "",\n "client_id": "",\n "fast_report": false,\n "include_insights": false,\n "options": {\n "days_to_include": 0\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/asset_report/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"asset_report_token": "",
"client_id": "",
"fast_report": false,
"include_insights": false,
"options": ["days_to_include": 0],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/asset_report/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"report": {
"asset_report_id": "bf3a0490-344c-4620-a219-2693162e4b1d",
"client_report_id": "123abc",
"date_generated": "2020-06-05T22:47:53Z",
"days_requested": 3,
"items": [
{
"accounts": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [
{
"current": 210,
"date": "2020-06-04",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 210,
"date": "2020-06-03",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 210,
"date": "2020-06-02",
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"mask": "1111",
"name": "Plaid Saving",
"official_name": "Plaid Silver Standard 0.1% Interest Saving",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "savings",
"transactions": [],
"type": "depository"
},
{
"account_id": "BxBXxLj1m4HMXBm9WZJyUg9XLd4rKEhw8Pb1J",
"balances": {
"available": null,
"current": 56302.06,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [],
"mask": "8888",
"name": "Plaid Mortgage",
"official_name": null,
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "mortgage",
"transactions": [],
"type": "loan"
},
{
"account_id": "dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK",
"balances": {
"available": null,
"current": 410,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [
{
"current": 410,
"date": "2020-06-04",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 410,
"date": "2020-06-03",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 410,
"date": "2020-06-02",
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"mask": "3333",
"name": "Plaid Credit Card",
"official_name": "Plaid Diamond 12.5% APR Interest Credit Card",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "credit card",
"transactions": [],
"type": "credit"
}
],
"date_last_updated": "2020-06-05T22:47:52Z",
"institution_id": "ins_3",
"institution_name": "Chase",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6"
}
],
"user": {
"client_user_id": "123456789",
"email": "accountholder0@example.com",
"first_name": "Alberta",
"last_name": "Charleson",
"middle_name": "Bobbeth",
"phone_number": "111-222-3333",
"ssn": "123-45-6789"
}
},
"request_id": "eYupqX1mZkEuQRx",
"warnings": []
}
POST
Retrieve an Item
{{baseUrl}}/item/get
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/item/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/get",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/get', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/get"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/get";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/item/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/item/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"item": {
"available_products": [
"balance",
"auth"
],
"billed_products": [
"identity",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_109508",
"item_id": "Ed6bjNrDLJfGvZWwnkQlfxwoNz54B5C97ejBr",
"update_type": "background",
"webhook": "https://plaid.com/example/hook"
},
"request_id": "m8MDnv9okwxFNBV",
"status": {
"last_webhook": {
"code_sent": "DEFAULT_UPDATE",
"sent_at": "2019-02-15T15:53:00Z"
},
"transactions": {
"last_failed_update": "2019-01-22T04:32:00Z",
"last_successful_update": "2019-02-15T15:52:39Z"
}
}
}
POST
Retrieve an individual watchlist screening
{{baseUrl}}/watchlist_screening/individual/get
BODY json
{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 69
{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', watchlist_screening_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', watchlist_screening_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', watchlist_screening_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/get",
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([
'client_id' => '',
'secret' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/get', [
'body' => '{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/get"
payload = {
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/get";
let payload = json!({
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "scr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"date_of_birth": "1990-05-29",
"document_number": "C31195855",
"legal_name": "Aleksey Potemkin",
"version": 1,
"watchlist_program_id": "prg_2eRPsDnL66rZ7H"
},
"status": "cleared"
}
POST
Retrieve auth data
{{baseUrl}}/auth/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/auth/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/auth/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/auth/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/auth/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/auth/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/auth/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/auth/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/auth/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/auth/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/auth/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/auth/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/auth/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/auth/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/auth/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/auth/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/auth/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/auth/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', options: {account_ids: []}, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/auth/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/auth/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/auth/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/auth/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/auth/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/auth/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/auth/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/auth/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/auth/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/auth/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/auth/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/auth/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/auth/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/auth/get"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/auth/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/auth/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/auth/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/auth/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/auth/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/auth/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/auth/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/auth/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "9606",
"name": "Plaid Checking",
"official_name": "Plaid Gold Checking",
"subtype": "checking",
"type": "depository"
}
],
"item": {
"available_products": [
"balance",
"identity",
"payment_initiation",
"transactions"
],
"billed_products": [
"assets",
"auth"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_117650",
"item_id": "DWVAAPWq4RHGlEaNyGKRTAnPLaEmo8Cvq7na6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"numbers": {
"ach": [
{
"account": "9900009606",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"routing": "011401533",
"wire_routing": "021000021"
}
],
"bacs": [
{
"account": "31926819",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"sort_code": "601613"
}
],
"eft": [
{
"account": "111122223333",
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"branch": "01140",
"institution": "021"
}
],
"international": [
{
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"bic": "NWBKGB21",
"iban": "GB29NWBK60161331926819"
}
]
},
"request_id": "m8MDnv9okwxFNBV"
}
POST
Retrieve identity data
{{baseUrl}}/identity/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/identity/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 101
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', options: {account_ids: []}, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/get',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/get',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', options: {account_ids: []}, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identity/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity/get"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": ""
}' | \
http POST {{baseUrl}}/identity/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/identity/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"subtype": "checking",
"type": "depository"
},
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "1111",
"name": "Plaid Saving",
"official_name": "Plaid Silver Standard 0.1% Interest Saving",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"subtype": "savings",
"type": "depository"
}
],
"item": {
"available_products": [
"balance",
"investments"
],
"billed_products": [
"assets",
"auth",
"identity",
"liabilities",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "3nARps6TOYtbACO"
}
POST
Retrieve identity match score
{{baseUrl}}/identity/match
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity/match");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity/match" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []}
:secret ""
:user {:address ""
:email_address ""
:legal_name ""
:phone_number ""}}})
require "http/client"
url = "{{baseUrl}}/identity/match"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity/match"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity/match");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity/match"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity/match HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 207
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity/match")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity/match"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity/match")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity/match")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: '',
user: {
address: '',
email_address: '',
legal_name: '',
phone_number: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity/match');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/match',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
options: {account_ids: []},
secret: '',
user: {address: '', email_address: '', legal_name: '', phone_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity/match';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":"","user":{"address":"","email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity/match',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": "",\n "user": {\n "address": "",\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity/match")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity/match',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
options: {account_ids: []},
secret: '',
user: {address: '', email_address: '', legal_name: '', phone_number: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/match',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
options: {account_ids: []},
secret: '',
user: {address: '', email_address: '', legal_name: '', phone_number: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity/match');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: []
},
secret: '',
user: {
address: '',
email_address: '',
legal_name: '',
phone_number: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity/match',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
options: {account_ids: []},
secret: '',
user: {address: '', email_address: '', legal_name: '', phone_number: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity/match';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[]},"secret":"","user":{"address":"","email_address":"","legal_name":"","phone_number":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ] },
@"secret": @"",
@"user": @{ @"address": @"", @"email_address": @"", @"legal_name": @"", @"phone_number": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity/match"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity/match" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity/match",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => '',
'user' => [
'address' => '',
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity/match', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity/match');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => '',
'user' => [
'address' => '',
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
]
],
'secret' => '',
'user' => [
'address' => '',
'email_address' => '',
'legal_name' => '',
'phone_number' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/identity/match');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity/match' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity/match' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity/match", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity/match"
payload = {
"access_token": "",
"client_id": "",
"options": { "account_ids": [] },
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity/match"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity/match")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity/match') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": []\n },\n \"secret\": \"\",\n \"user\": {\n \"address\": \"\",\n \"email_address\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity/match";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({"account_ids": ()}),
"secret": "",
"user": json!({
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity/match \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": []
},
"secret": "",
"user": {
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
}
}' | \
http POST {{baseUrl}}/identity/match \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": []\n },\n "secret": "",\n "user": {\n "address": "",\n "email_address": "",\n "legal_name": "",\n "phone_number": ""\n }\n}' \
--output-document \
- {{baseUrl}}/identity/match
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": ["account_ids": []],
"secret": "",
"user": [
"address": "",
"email_address": "",
"legal_name": "",
"phone_number": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity/match")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"address": {
"is_postal_code_match": true,
"score": 100
},
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"email_address": {
"score": 100
},
"legal_name": {
"is_first_name_or_last_name_match": true,
"is_nickname_match": true,
"score": 90
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"phone_number": {
"score": 100
},
"subtype": "checking",
"type": "depository"
},
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"address": {
"is_postal_code_match": true,
"score": 100
},
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"email_address": null,
"legal_name": {
"is_first_name_or_last_name_match": false,
"score": 30
},
"mask": "1111",
"name": "Plaid Saving",
"official_name": "Plaid Silver Standard 0.1% Interest Saving",
"phone_number": {
"score": 100
},
"subtype": "savings",
"type": "depository"
}
],
"item": {
"available_products": [
"balance",
"investments"
],
"billed_products": [
"assets",
"auth",
"identity",
"liabilities",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "3nARps6TOYtbACO"
}
POST
Retrieve information about a Plaid application
{{baseUrl}}/application/get
BODY json
{
"application_id": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/application/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/application/get" {:content-type :json
:form-params {:application_id ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/application/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/application/get"),
Content = new StringContent("{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/application/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/application/get"
payload := strings.NewReader("{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/application/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 61
{
"application_id": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/application/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/application/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/application/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/application/get")
.header("content-type", "application/json")
.body("{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
application_id: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/application/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/application/get',
headers: {'content-type': 'application/json'},
data: {application_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/application/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"application_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/application/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "application_id": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/application/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/application/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({application_id: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/application/get',
headers: {'content-type': 'application/json'},
body: {application_id: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/application/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
application_id: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/application/get',
headers: {'content-type': 'application/json'},
data: {application_id: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/application/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"application_id":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"application_id": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/application/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/application/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/application/get",
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([
'application_id' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/application/get', [
'body' => '{
"application_id": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/application/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'application_id' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'application_id' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/application/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/application/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"application_id": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/application/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"application_id": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/application/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/application/get"
payload = {
"application_id": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/application/get"
payload <- "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/application/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/application/get') do |req|
req.body = "{\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/application/get";
let payload = json!({
"application_id": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/application/get \
--header 'content-type: application/json' \
--data '{
"application_id": "",
"client_id": "",
"secret": ""
}'
echo '{
"application_id": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/application/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "application_id": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/application/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"application_id": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/application/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Retrieve information from the bank accounts used for employment verification
{{baseUrl}}/beta/credit/v1/bank_employment/get
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/beta/credit/v1/bank_employment/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/beta/credit/v1/bank_employment/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/beta/credit/v1/bank_employment/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/beta/credit/v1/bank_employment/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/beta/credit/v1/bank_employment/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/beta/credit/v1/bank_employment/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/beta/credit/v1/bank_employment/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/beta/credit/v1/bank_employment/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/beta/credit/v1/bank_employment/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/beta/credit/v1/bank_employment/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/beta/credit/v1/bank_employment/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/beta/credit/v1/bank_employment/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/credit/v1/bank_employment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/beta/credit/v1/bank_employment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/beta/credit/v1/bank_employment/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/beta/credit/v1/bank_employment/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/beta/credit/v1/bank_employment/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/credit/v1/bank_employment/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/beta/credit/v1/bank_employment/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/credit/v1/bank_employment/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/beta/credit/v1/bank_employment/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/beta/credit/v1/bank_employment/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/beta/credit/v1/bank_employment/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/beta/credit/v1/bank_employment/get",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/beta/credit/v1/bank_employment/get', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/beta/credit/v1/bank_employment/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/beta/credit/v1/bank_employment/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/beta/credit/v1/bank_employment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/beta/credit/v1/bank_employment/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/beta/credit/v1/bank_employment/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/beta/credit/v1/bank_employment/get"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/beta/credit/v1/bank_employment/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/beta/credit/v1/bank_employment/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/beta/credit/v1/bank_employment/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/beta/credit/v1/bank_employment/get";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/beta/credit/v1/bank_employment/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/beta/credit/v1/bank_employment/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/beta/credit/v1/bank_employment/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/beta/credit/v1/bank_employment/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_employment_reports": [
{
"bank_employment_report_id": "0a7eaed6-5da7-4846-baaf-ad787306575e",
"days_requested": 90,
"generated_time": "2023-01-23T22:47:53Z",
"items": [
{
"bank_employment_accounts": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"mask": "8888",
"name": "Plaid Checking Account",
"official_name": "Plaid Checking Account",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"subtype": "checking",
"type": "depository"
}
],
"bank_employments": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"bank_employment_id": "f17efbdd-caab-4278-8ece-963511cd3d51",
"earliest_deposit_date": "2022-01-15",
"employer": {
"name": "Plaid Inc."
},
"latest_deposit_date": "2023-01-15"
}
],
"institution_id": "ins_0",
"institution_name": "Plaid Bank",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"last_updated_time": "2023-01-23T22:47:53Z"
}
],
"warnings": []
}
],
"request_id": "LhQf0THi8SH1yJm"
}
POST
Retrieve information from the bank accounts used for income verification in PDF format
{{baseUrl}}/credit/bank_income/pdf/get
BODY json
{
"client_id": "",
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/bank_income/pdf/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/bank_income/pdf/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/bank_income/pdf/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/bank_income/pdf/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/bank_income/pdf/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/bank_income/pdf/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/bank_income/pdf/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/bank_income/pdf/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/bank_income/pdf/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/bank_income/pdf/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/bank_income/pdf/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/bank_income/pdf/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/pdf/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/bank_income/pdf/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/bank_income/pdf/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/bank_income/pdf/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/bank_income/pdf/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/pdf/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/bank_income/pdf/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/pdf/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/bank_income/pdf/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/bank_income/pdf/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/bank_income/pdf/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/bank_income/pdf/get",
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([
'client_id' => '',
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/bank_income/pdf/get', [
'body' => '{
"client_id": "",
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/bank_income/pdf/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/bank_income/pdf/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/bank_income/pdf/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/bank_income/pdf/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/bank_income/pdf/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/bank_income/pdf/get"
payload = {
"client_id": "",
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/bank_income/pdf/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/bank_income/pdf/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/bank_income/pdf/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/bank_income/pdf/get";
let payload = json!({
"client_id": "",
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/bank_income/pdf/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/bank_income/pdf/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/bank_income/pdf/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/bank_income/pdf/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Retrieve information from the bank accounts used for income verification
{{baseUrl}}/credit/bank_income/get
BODY json
{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/bank_income/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/bank_income/get" {:content-type :json
:form-params {:client_id ""
:options {:count 0}
:secret ""
:user_token ""}})
require "http/client"
url = "{{baseUrl}}/credit/bank_income/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/bank_income/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/bank_income/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/bank_income/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/bank_income/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 92
{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/bank_income/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/bank_income/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/bank_income/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/bank_income/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
options: {
count: 0
},
secret: '',
user_token: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/bank_income/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', options: {count: 0}, secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/bank_income/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"count":0},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/bank_income/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "options": {\n "count": 0\n },\n "secret": "",\n "user_token": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/bank_income/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/bank_income/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', options: {count: 0}, secret: '', user_token: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', options: {count: 0}, secret: '', user_token: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/bank_income/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
options: {
count: 0
},
secret: '',
user_token: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/bank_income/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', options: {count: 0}, secret: '', user_token: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/bank_income/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","options":{"count":0},"secret":"","user_token":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"options": @{ @"count": @0 },
@"secret": @"",
@"user_token": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/bank_income/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/bank_income/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/bank_income/get",
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([
'client_id' => '',
'options' => [
'count' => 0
],
'secret' => '',
'user_token' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/bank_income/get', [
'body' => '{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/bank_income/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'options' => [
'count' => 0
],
'secret' => '',
'user_token' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'options' => [
'count' => 0
],
'secret' => '',
'user_token' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/bank_income/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/bank_income/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/bank_income/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/bank_income/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/bank_income/get"
payload = {
"client_id": "",
"options": { "count": 0 },
"secret": "",
"user_token": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/bank_income/get"
payload <- "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/bank_income/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/bank_income/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"options\": {\n \"count\": 0\n },\n \"secret\": \"\",\n \"user_token\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/bank_income/get";
let payload = json!({
"client_id": "",
"options": json!({"count": 0}),
"secret": "",
"user_token": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/bank_income/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}'
echo '{
"client_id": "",
"options": {
"count": 0
},
"secret": "",
"user_token": ""
}' | \
http POST {{baseUrl}}/credit/bank_income/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "options": {\n "count": 0\n },\n "secret": "",\n "user_token": ""\n}' \
--output-document \
- {{baseUrl}}/credit/bank_income/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"options": ["count": 0],
"secret": "",
"user_token": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/bank_income/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_income": [
{
"bank_income_id": "abc123",
"bank_income_summary": {
"end_date": "2022-01-15",
"historical_summary": [
{
"end_date": "2021-11-30",
"iso_currency_code": "USD",
"start_date": "2021-11-02",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2021-11-15",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "6RddrWNwE1uM63Ex5GKLhzlBl76aAZfgzlQNm",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
},
{
"end_date": "2021-12-31",
"iso_currency_code": "USD",
"start_date": "2021-12-01",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2021-12-15",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "7BddrWNwE1uM63Ex5GKLhzlBl82aAZfgzlCBl",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
},
{
"end_date": "2021-01-31",
"iso_currency_code": "USD",
"start_date": "2022-01-01",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2022-01-31",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "9FddrWNwE1uM95Ex5GKLhzlBl76aAZfgzlNQr",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
}
],
"income_categories_count": 1,
"income_sources_count": 1,
"income_transactions_count": 1,
"iso_currency_code": "USD",
"start_date": "2021-11-15",
"total_amount": 300,
"total_amounts": [
{
"amount": 300,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
},
"days_requested": 90,
"generated_time": "2022-01-31T22:47:53Z",
"items": [
{
"bank_income_accounts": [
{
"account_id": "“GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9”",
"mask": "8888",
"name": "Plaid Checking Account",
"official_name": "Plaid Checking Account",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"subtype": "checking",
"type": "depository"
}
],
"bank_income_sources": [
{
"account_id": "GeooLPBGDEunl54q7N3ZcyD5aLPLEai1nkzM9",
"end_date": "2022-01-15",
"historical_summary": [
{
"end_date": "2021-11-30",
"iso_currency_code": "USD",
"start_date": "2021-11-02",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2021-11-15",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "6RddrWNwE1uM63Ex5GKLhzlBl76aAZfgzlQNm",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
},
{
"end_date": "2021-12-31",
"iso_currency_code": "USD",
"start_date": "2021-12-01",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2021-12-15",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "7BddrWNwE1uM63Ex5GKLhzlBl82aAZfgzlCBl",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
},
{
"end_date": "2021-01-31",
"iso_currency_code": "USD",
"start_date": "2022-01-01",
"total_amount": 100,
"total_amounts": [
{
"amount": 100,
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"transactions": [
{
"amount": -100,
"check_number": null,
"date": "2022-01-31",
"iso_currency_code": "USD",
"name": "“PLAID_INC_DIRECT_DEP_PPD”",
"original_description": "PLAID_INC_DIRECT_DEP_PPD 123",
"pending": false,
"transaction_id": "9FddrWNwE1uM95Ex5GKLhzlBl76aAZfgzlNQr",
"unofficial_currency_code": null
}
],
"unofficial_currency_code": null
}
],
"income_category": "SALARY",
"income_description": "“PLAID_INC_DIRECT_DEP_PPD”",
"income_source_id": "“f17efbdd-caab-4278-8ece-963511cd3d51”",
"pay_frequency": "MONTHLY",
"start_date": "2021-11-15",
"total_amount": 300,
"transaction_count": 1
}
],
"institution_id": "ins_0",
"institution_name": "Plaid Bank",
"item_id": "“eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6”",
"last_updated_time": "2022-01-31T22:47:53Z"
}
],
"warnings": []
}
],
"request_id": "LhQf0THi8SH1yJm"
}
POST
Retrieve more information about a transfer intent
{{baseUrl}}/transfer/intent/get
BODY json
{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/intent/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/intent/get" {:content-type :json
:form-params {:client_id ""
:secret ""
:transfer_intent_id ""}})
require "http/client"
url = "{{baseUrl}}/transfer/intent/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/intent/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/intent/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/intent/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/intent/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 65
{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/intent/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/intent/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/intent/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/intent/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: '',
transfer_intent_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/intent/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_intent_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/intent/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_intent_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/intent/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": "",\n "transfer_intent_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/intent/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/intent/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: '', transfer_intent_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: '', transfer_intent_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/intent/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: '',
transfer_intent_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/intent/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: '', transfer_intent_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/intent/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":"","transfer_intent_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"",
@"transfer_intent_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/intent/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/intent/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/intent/get",
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([
'client_id' => '',
'secret' => '',
'transfer_intent_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/intent/get', [
'body' => '{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/intent/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => '',
'transfer_intent_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => '',
'transfer_intent_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/intent/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/intent/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/intent/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/intent/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/intent/get"
payload = {
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/intent/get"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/intent/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/intent/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transfer_intent_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/intent/get";
let payload = json!({
"client_id": "",
"secret": "",
"transfer_intent_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/intent/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}'
echo '{
"client_id": "",
"secret": "",
"transfer_intent_id": ""
}' | \
http POST {{baseUrl}}/transfer/intent/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": "",\n "transfer_intent_id": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/intent/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": "",
"transfer_intent_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/intent/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "saKrIBuEB9qJZno",
"transfer_intent": {
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"ach_class": "ppd",
"amount": "12.34",
"authorization_decision": "APPROVED",
"authorization_decision_rationale": null,
"created": "2019-12-09T17:27:15Z",
"description": "Desc",
"failure_reason": null,
"funding_account_id": "9853defc-e703-463d-86b1-dc0607a45359",
"guarantee_decision": null,
"guarantee_decision_rationale": null,
"id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"iso_currency_code": "USD",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"mode": "DISBURSEMENT",
"origination_account_id": "9853defc-e703-463d-86b1-dc0607a45359",
"status": "SUCCEEDED",
"transfer_id": "590ecd12-1dcc-7eae-4ad6-c28d1ec90df2",
"user": {
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94053",
"region": "California",
"street": "123 Main St."
},
"email_address": "acharleston@email.com",
"legal_name": "Anne Charleston",
"phone_number": "510-555-0128"
}
}
}
POST
Retrieve real-time balance data
{{baseUrl}}/accounts/balance/get
BODY json
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accounts/balance/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accounts/balance/get" {:content-type :json
:form-params {:access_token ""
:client_id ""
:options {:account_ids []
:min_last_updated_datetime ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/accounts/balance/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/accounts/balance/get"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accounts/balance/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accounts/balance/get"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/accounts/balance/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138
{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accounts/balance/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accounts/balance/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accounts/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accounts/balance/get")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
options: {
account_ids: [],
min_last_updated_datetime: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accounts/balance/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/balance/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
options: {account_ids: [], min_last_updated_datetime: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accounts/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[],"min_last_updated_datetime":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/accounts/balance/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": [],\n "min_last_updated_datetime": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accounts/balance/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/accounts/balance/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
client_id: '',
options: {account_ids: [], min_last_updated_datetime: ''},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/balance/get',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
client_id: '',
options: {account_ids: [], min_last_updated_datetime: ''},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/accounts/balance/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
options: {
account_ids: [],
min_last_updated_datetime: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/accounts/balance/get',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
client_id: '',
options: {account_ids: [], min_last_updated_datetime: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accounts/balance/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","options":{"account_ids":[],"min_last_updated_datetime":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"options": @{ @"account_ids": @[ ], @"min_last_updated_datetime": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accounts/balance/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/accounts/balance/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accounts/balance/get",
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([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
],
'min_last_updated_datetime' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/accounts/balance/get', [
'body' => '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accounts/balance/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
],
'min_last_updated_datetime' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'options' => [
'account_ids' => [
],
'min_last_updated_datetime' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accounts/balance/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accounts/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accounts/balance/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/accounts/balance/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accounts/balance/get"
payload = {
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accounts/balance/get"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accounts/balance/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/accounts/balance/get') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"options\": {\n \"account_ids\": [],\n \"min_last_updated_datetime\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accounts/balance/get";
let payload = json!({
"access_token": "",
"client_id": "",
"options": json!({
"account_ids": (),
"min_last_updated_datetime": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/accounts/balance/get \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"options": {
"account_ids": [],
"min_last_updated_datetime": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/accounts/balance/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "options": {\n "account_ids": [],\n "min_last_updated_datetime": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/accounts/balance/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"options": [
"account_ids": [],
"min_last_updated_datetime": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accounts/balance/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"accounts": [
{
"account_id": "BxBXxLj1m4HMXBm9WZZmCWVbPjX16EHwv99vp",
"balances": {
"available": 100,
"current": 110,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "0000",
"name": "Plaid Checking",
"official_name": "Plaid Gold Standard 0% Interest Checking",
"persistent_account_id": "8cfb8beb89b774ee43b090625f0d61d0814322b43bff984eaf60386e",
"subtype": "checking",
"type": "depository"
},
{
"account_id": "dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK",
"balances": {
"available": null,
"current": 410,
"iso_currency_code": "USD",
"limit": 2000,
"unofficial_currency_code": null
},
"mask": "3333",
"name": "Plaid Credit Card",
"official_name": "Plaid Diamond 12.5% APR Interest Credit Card",
"subtype": "credit card",
"type": "credit"
},
{
"account_id": "Pp1Vpkl9w8sajvK6oEEKtr7vZxBnGpf7LxxLE",
"balances": {
"available": null,
"current": 65262,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"mask": "7777",
"name": "Plaid Student Loan",
"official_name": null,
"subtype": "student",
"type": "loan"
}
],
"item": {
"available_products": [
"balance",
"identity",
"investments"
],
"billed_products": [
"assets",
"auth",
"liabilities",
"transactions"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_3",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "qk5Bxes3gDfv4F2"
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/relay/get");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/relay/get" {:content-type :json
:form-params {:client_id ""
:relay_token ""
:report_type ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/relay/get"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/relay/get"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/relay/get");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/relay/get"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/relay/get HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/relay/get")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/relay/get"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/relay/get")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/relay/get")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
relay_token: '',
report_type: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/relay/get');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', report_type: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/relay/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","report_type":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/relay/get',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "relay_token": "",\n "report_type": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/relay/get")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/relay/get',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', relay_token: '', report_type: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/get',
headers: {'content-type': 'application/json'},
body: {client_id: '', relay_token: '', report_type: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/relay/get');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
relay_token: '',
report_type: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/relay/get',
headers: {'content-type': 'application/json'},
data: {client_id: '', relay_token: '', report_type: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/relay/get';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","relay_token":"","report_type":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"relay_token": @"",
@"report_type": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/relay/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/relay/get" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/relay/get",
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([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/relay/get', [
'body' => '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/relay/get');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'relay_token' => '',
'report_type' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/relay/get');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/relay/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/relay/get' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/relay/get", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/relay/get"
payload = {
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/relay/get"
payload <- "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/relay/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/relay/get') do |req|
req.body = "{\n \"client_id\": \"\",\n \"relay_token\": \"\",\n \"report_type\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/relay/get";
let payload = json!({
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/relay/get \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}'
echo '{
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
}' | \
http POST {{baseUrl}}/credit/relay/get \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "relay_token": "",\n "report_type": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/relay/get
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"relay_token": "",
"report_type": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/relay/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"report": {
"asset_report_id": "bf3a0490-344c-4620-a219-2693162e4b1d",
"client_report_id": "123abc",
"date_generated": "2020-06-05T22:47:53Z",
"days_requested": 3,
"items": [
{
"accounts": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"balances": {
"available": 200,
"current": 210,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [
{
"current": 210,
"date": "2020-06-04",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 210,
"date": "2020-06-03",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 210,
"date": "2020-06-02",
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"mask": "1111",
"name": "Plaid Saving",
"official_name": "Plaid Silver Standard 0.1% Interest Saving",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "savings",
"transactions": [],
"type": "depository"
},
{
"account_id": "BxBXxLj1m4HMXBm9WZJyUg9XLd4rKEhw8Pb1J",
"balances": {
"available": null,
"current": 56302.06,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [],
"mask": "8888",
"name": "Plaid Mortgage",
"official_name": null,
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "mortgage",
"transactions": [],
"type": "loan"
},
{
"account_id": "dVzbVMLjrxTnLjX4G66XUp5GLklm4oiZy88yK",
"balances": {
"available": null,
"current": 410,
"iso_currency_code": "USD",
"limit": null,
"unofficial_currency_code": null
},
"days_available": 3,
"historical_balances": [
{
"current": 410,
"date": "2020-06-04",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 410,
"date": "2020-06-03",
"iso_currency_code": "USD",
"unofficial_currency_code": null
},
{
"current": 410,
"date": "2020-06-02",
"iso_currency_code": "USD",
"unofficial_currency_code": null
}
],
"mask": "3333",
"name": "Plaid Credit Card",
"official_name": "Plaid Diamond 12.5% APR Interest Credit Card",
"owners": [
{
"addresses": [
{
"data": {
"city": "Malakoff",
"country": "US",
"postal_code": "14236",
"region": "NY",
"street": "2992 Cameron Road"
},
"primary": true
},
{
"data": {
"city": "San Matias",
"country": "US",
"postal_code": "93405-2255",
"region": "CA",
"street": "2493 Leisure Lane"
},
"primary": false
}
],
"emails": [
{
"data": "accountholder0@example.com",
"primary": true,
"type": "primary"
},
{
"data": "accountholder1@example.com",
"primary": false,
"type": "secondary"
},
{
"data": "extraordinarily.long.email.username.123456@reallylonghostname.com",
"primary": false,
"type": "other"
}
],
"names": [
"Alberta Bobbeth Charleson"
],
"phone_numbers": [
{
"data": "1112223333",
"primary": false,
"type": "home"
},
{
"data": "1112224444",
"primary": false,
"type": "work"
},
{
"data": "1112225555",
"primary": false,
"type": "mobile"
}
]
}
],
"ownership_type": null,
"subtype": "credit card",
"transactions": [],
"type": "credit"
}
],
"date_last_updated": "2020-06-05T22:47:52Z",
"institution_id": "ins_3",
"institution_name": "Chase",
"item_id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBFL9DrE6"
}
],
"user": {
"client_user_id": "123456789",
"email": "accountholder0@example.com",
"first_name": "Alberta",
"last_name": "Charleson",
"middle_name": "Bobbeth",
"phone_number": "111-222-3333",
"ssn": "123-45-6789"
}
},
"request_id": "eYupqX1mZkEuQRx",
"warnings": []
}
POST
Retry an Identity Verification
{{baseUrl}}/identity_verification/retry
BODY json
{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/identity_verification/retry");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/identity_verification/retry" {:content-type :json
:form-params {:client_id ""
:client_user_id ""
:secret ""
:steps {:documentary_verification false
:kyc_check false
:selfie_check false
:verify_sms false}
:strategy ""
:template_id ""}})
require "http/client"
url = "{{baseUrl}}/identity_verification/retry"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/identity_verification/retry"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/identity_verification/retry");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/identity_verification/retry"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/identity_verification/retry HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 232
{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/identity_verification/retry")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/identity_verification/retry"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/identity_verification/retry")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/identity_verification/retry")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/identity_verification/retry');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/retry',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/identity_verification/retry';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","secret":"","steps":{"documentary_verification":false,"kyc_check":false,"selfie_check":false,"verify_sms":false},"strategy":"","template_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/identity_verification/retry',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "client_user_id": "",\n "secret": "",\n "steps": {\n "documentary_verification": false,\n "kyc_check": false,\n "selfie_check": false,\n "verify_sms": false\n },\n "strategy": "",\n "template_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/identity_verification/retry")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/identity_verification/retry',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/retry',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/identity_verification/retry');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/identity_verification/retry',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
client_user_id: '',
secret: '',
steps: {
documentary_verification: false,
kyc_check: false,
selfie_check: false,
verify_sms: false
},
strategy: '',
template_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/identity_verification/retry';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","client_user_id":"","secret":"","steps":{"documentary_verification":false,"kyc_check":false,"selfie_check":false,"verify_sms":false},"strategy":"","template_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"client_user_id": @"",
@"secret": @"",
@"steps": @{ @"documentary_verification": @NO, @"kyc_check": @NO, @"selfie_check": @NO, @"verify_sms": @NO },
@"strategy": @"",
@"template_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/identity_verification/retry"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/identity_verification/retry" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/identity_verification/retry",
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([
'client_id' => '',
'client_user_id' => '',
'secret' => '',
'steps' => [
'documentary_verification' => null,
'kyc_check' => null,
'selfie_check' => null,
'verify_sms' => null
],
'strategy' => '',
'template_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/identity_verification/retry', [
'body' => '{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/identity_verification/retry');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'client_user_id' => '',
'secret' => '',
'steps' => [
'documentary_verification' => null,
'kyc_check' => null,
'selfie_check' => null,
'verify_sms' => null
],
'strategy' => '',
'template_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'client_user_id' => '',
'secret' => '',
'steps' => [
'documentary_verification' => null,
'kyc_check' => null,
'selfie_check' => null,
'verify_sms' => null
],
'strategy' => '',
'template_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/identity_verification/retry');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/identity_verification/retry' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/identity_verification/retry' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/identity_verification/retry", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/identity_verification/retry"
payload = {
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": False,
"kyc_check": False,
"selfie_check": False,
"verify_sms": False
},
"strategy": "",
"template_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/identity_verification/retry"
payload <- "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/identity_verification/retry")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/identity_verification/retry') do |req|
req.body = "{\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"secret\": \"\",\n \"steps\": {\n \"documentary_verification\": false,\n \"kyc_check\": false,\n \"selfie_check\": false,\n \"verify_sms\": false\n },\n \"strategy\": \"\",\n \"template_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/identity_verification/retry";
let payload = json!({
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": json!({
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
}),
"strategy": "",
"template_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/identity_verification/retry \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}'
echo '{
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": {
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
},
"strategy": "",
"template_id": ""
}' | \
http POST {{baseUrl}}/identity_verification/retry \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "client_user_id": "",\n "secret": "",\n "steps": {\n "documentary_verification": false,\n "kyc_check": false,\n "selfie_check": false,\n "verify_sms": false\n },\n "strategy": "",\n "template_id": ""\n}' \
--output-document \
- {{baseUrl}}/identity_verification/retry
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"client_user_id": "",
"secret": "",
"steps": [
"documentary_verification": false,
"kyc_check": false,
"selfie_check": false,
"verify_sms": false
],
"strategy": "",
"template_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/identity_verification/retry")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"client_user_id": "your-db-id-3b24110",
"completed_at": "2020-07-24T03:26:02Z",
"created_at": "2020-07-24T03:26:02Z",
"documentary_verification": {
"documents": [
{
"analysis": {
"authenticity": "match",
"extracted_data": {
"date_of_birth": "match",
"expiration_date": "not_expired",
"issuing_country": "match",
"name": "match"
},
"image_quality": "high"
},
"attempt": 1,
"extracted_data": {
"category": "drivers_license",
"expiration_date": "1990-05-29",
"id_number": "AB123456",
"issuing_country": "US",
"issuing_region": "IN"
},
"images": {
"cropped_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_back.jpeg",
"cropped_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/cropped_front.jpeg",
"face": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/face.jpeg",
"original_back": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_back.jpeg",
"original_front": "https://example.plaid.com/verifications/idv_52xR9LKo77r1Np/documents/1/original_front.jpeg"
},
"redacted_at": "2020-07-24T03:26:02Z",
"status": "success"
}
],
"status": "success"
},
"id": "idv_52xR9LKo77r1Np",
"kyc_check": {
"address": {
"po_box": "yes",
"summary": "match",
"type": "residential"
},
"date_of_birth": {
"summary": "match"
},
"id_number": {
"summary": "match"
},
"name": {
"summary": "match"
},
"phone_number": {
"summary": "match"
},
"status": "success"
},
"previous_attempt_id": "idv_42cF1MNo42r9Xj",
"redacted_at": "2020-07-24T03:26:02Z",
"request_id": "saKrIBuEB9qJZng",
"shareable_url": "https://flow.plaid.com/verify/idv_4FrXJvfQU3zGUR?key=e004115db797f7cc3083bff3167cba30644ef630fb46f5b086cde6cc3b86a36f",
"status": "success",
"steps": {
"accept_tos": "success",
"documentary_verification": "success",
"kyc_check": "success",
"risk_check": "success",
"selfie_check": "success",
"verify_sms": "success",
"watchlist_screening": "success"
},
"template": {
"id": "idvtmp_4FrXJvfQU3zGUR",
"version": 2
},
"user": {
"address": {
"city": "Pawnee",
"country": "US",
"postal_code": "46001",
"region": "IN",
"street": "123 Main St.",
"street2": "Unit 42"
},
"date_of_birth": "1990-05-29",
"email_address": "user@example.com",
"id_number": {
"type": "us_ssn",
"value": "123456789"
},
"ip_address": "192.0.2.42",
"name": {
"family_name": "Knope",
"given_name": "Leslie"
},
"phone_number": "+19876543212"
},
"watchlist_screening_id": "scr_52xR9LKo77r1Np"
}
POST
Return a list of rules created for the Item associated with the access token.
{{baseUrl}}/beta/transactions/rules/v1/list
BODY json
{
"access_token": "",
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/beta/transactions/rules/v1/list");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/beta/transactions/rules/v1/list" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/beta/transactions/rules/v1/list"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/beta/transactions/rules/v1/list"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/beta/transactions/rules/v1/list");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/beta/transactions/rules/v1/list"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/beta/transactions/rules/v1/list HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 59
{
"access_token": "",
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/beta/transactions/rules/v1/list")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/beta/transactions/rules/v1/list"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/list")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/beta/transactions/rules/v1/list")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/beta/transactions/rules/v1/list');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/beta/transactions/rules/v1/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/beta/transactions/rules/v1/list',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/beta/transactions/rules/v1/list")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/beta/transactions/rules/v1/list',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/list',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/beta/transactions/rules/v1/list');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/rules/v1/list',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/beta/transactions/rules/v1/list';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/beta/transactions/rules/v1/list"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/beta/transactions/rules/v1/list" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/beta/transactions/rules/v1/list",
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([
'access_token' => '',
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/beta/transactions/rules/v1/list', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/beta/transactions/rules/v1/list');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/beta/transactions/rules/v1/list');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/beta/transactions/rules/v1/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/beta/transactions/rules/v1/list' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/beta/transactions/rules/v1/list", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/beta/transactions/rules/v1/list"
payload = {
"access_token": "",
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/beta/transactions/rules/v1/list"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/beta/transactions/rules/v1/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/beta/transactions/rules/v1/list') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/beta/transactions/rules/v1/list";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/beta/transactions/rules/v1/list \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/beta/transactions/rules/v1/list \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/beta/transactions/rules/v1/list
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/beta/transactions/rules/v1/list")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4zlKapIkTm8p5KM",
"rules": [
{
"created_at": "2022-02-28T11:00:00Z",
"id": "lPNjeW1nR6CDn5okmGQ6hEpMo4lLNo",
"item_id": "wz666MBjYWTp2PDzzggYhM6oWWmBb",
"personal_finance_category": "FOOD_AND_DRINK_FAST_FOOD",
"rule_details": {
"field": "NAME",
"query": "Burger Shack",
"type": "SUBSTRING_MATCH"
}
},
{
"created_at": "2022-02-27T14:50:00Z",
"id": "eVBnVMp7zdTJLkRNr33Rs6zr7KNJqBF",
"item_id": "wz666MBjYWTp2PDzzggYhM6oWWmBb",
"personal_finance_category": "TRANSFER_IN_ACCOUNT_TRANSFER",
"rule_details": {
"field": "TRANSACTION_ID",
"query": "kgygNvAVPzSX9KkddNdWHaVGRVex1MHm3k9no",
"type": "EXACT_MATCH"
}
}
]
}
POST
Returns OAuth-institution registration information for a given end customer.
{{baseUrl}}/partner/customer/oauth_institutions/get
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partner/customer/oauth_institutions/get");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/partner/customer/oauth_institutions/get")
require "http/client"
url = "{{baseUrl}}/partner/customer/oauth_institutions/get"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/partner/customer/oauth_institutions/get"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partner/customer/oauth_institutions/get");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/partner/customer/oauth_institutions/get"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/partner/customer/oauth_institutions/get HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partner/customer/oauth_institutions/get")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/partner/customer/oauth_institutions/get"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/partner/customer/oauth_institutions/get")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partner/customer/oauth_institutions/get")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/partner/customer/oauth_institutions/get');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/partner/customer/oauth_institutions/get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/partner/customer/oauth_institutions/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/partner/customer/oauth_institutions/get',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/partner/customer/oauth_institutions/get")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/partner/customer/oauth_institutions/get',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/partner/customer/oauth_institutions/get'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/partner/customer/oauth_institutions/get');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/partner/customer/oauth_institutions/get'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/partner/customer/oauth_institutions/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partner/customer/oauth_institutions/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/partner/customer/oauth_institutions/get" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/partner/customer/oauth_institutions/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/partner/customer/oauth_institutions/get');
echo $response->getBody();
setUrl('{{baseUrl}}/partner/customer/oauth_institutions/get');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/partner/customer/oauth_institutions/get');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partner/customer/oauth_institutions/get' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partner/customer/oauth_institutions/get' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/partner/customer/oauth_institutions/get", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/partner/customer/oauth_institutions/get"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/partner/customer/oauth_institutions/get"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/partner/customer/oauth_institutions/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/partner/customer/oauth_institutions/get') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/partner/customer/oauth_institutions/get";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/partner/customer/oauth_institutions/get
http POST {{baseUrl}}/partner/customer/oauth_institutions/get
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/partner/customer/oauth_institutions/get
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partner/customer/oauth_institutions/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"flowdown_status": "COMPLETE",
"institutions": [
{
"classic_disablement_date": "2022-06-30",
"environments": {
"development": "PROCESSING",
"production": "PROCESSING"
},
"institution_id": "ins_56",
"name": "Chase",
"production_enablement_date": null
},
{
"classic_disablement_date": null,
"environments": {
"development": "ENABLED",
"production": "ENABLED"
},
"institution_id": "ins_128026",
"name": "Capital One",
"production_enablement_date": "2022-12-19"
}
],
"questionnaire_status": "COMPLETE",
"request_id": "4zlKapIkTm8p5KM"
}
POST
Returns a Plaid reseller's end customer.
{{baseUrl}}/partner/customer/get
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partner/customer/get");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/partner/customer/get")
require "http/client"
url = "{{baseUrl}}/partner/customer/get"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/partner/customer/get"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partner/customer/get");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/partner/customer/get"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/partner/customer/get HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partner/customer/get")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/partner/customer/get"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/partner/customer/get")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partner/customer/get")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/partner/customer/get');
xhr.send(data);
import axios from 'axios';
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/get'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/partner/customer/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/partner/customer/get',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/partner/customer/get")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/partner/customer/get',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/get'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/partner/customer/get');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'POST', url: '{{baseUrl}}/partner/customer/get'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/partner/customer/get';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partner/customer/get"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/partner/customer/get" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/partner/customer/get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/partner/customer/get');
echo $response->getBody();
setUrl('{{baseUrl}}/partner/customer/get');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/partner/customer/get');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partner/customer/get' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partner/customer/get' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = ""
conn.request("POST", "/baseUrl/partner/customer/get", payload)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/partner/customer/get"
payload = ""
response = requests.post(url, data=payload)
print(response.json())
library(httr)
url <- "{{baseUrl}}/partner/customer/get"
payload <- ""
response <- VERB("POST", url, body = payload, content_type(""))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/partner/customer/get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/partner/customer/get') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/partner/customer/get";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/partner/customer/get
http POST {{baseUrl}}/partner/customer/get
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/partner/customer/get
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partner/customer/get")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"end_customer": {
"client_id": "7f57eb3d2a9j6480121fx361",
"company_name": "Plaid",
"status": "ACTIVE"
},
"request_id": "4zlKapIkTm8p5KM"
}
POST
Reverse an existing payment
{{baseUrl}}/payment_initiation/payment/reverse
BODY json
{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/payment/reverse");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/payment/reverse" {:content-type :json
:form-params {:amount ""
:client_id ""
:idempotency_key ""
:payment_id ""
:reference ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/payment/reverse"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/payment/reverse"),
Content = new StringContent("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/payment/reverse");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/payment/reverse"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/payment/reverse HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 117
{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/payment/reverse")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/payment/reverse"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/reverse")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/payment/reverse")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/payment/reverse');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/reverse',
headers: {'content-type': 'application/json'},
data: {
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/payment/reverse';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","idempotency_key":"","payment_id":"","reference":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/payment/reverse',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "client_id": "",\n "idempotency_key": "",\n "payment_id": "",\n "reference": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/payment/reverse")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/payment/reverse',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/reverse',
headers: {'content-type': 'application/json'},
body: {
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/payment/reverse');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/payment/reverse',
headers: {'content-type': 'application/json'},
data: {
amount: '',
client_id: '',
idempotency_key: '',
payment_id: '',
reference: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/payment/reverse';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":"","client_id":"","idempotency_key":"","payment_id":"","reference":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"client_id": @"",
@"idempotency_key": @"",
@"payment_id": @"",
@"reference": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/payment/reverse"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/payment/reverse" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/payment/reverse",
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([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'payment_id' => '',
'reference' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/payment/reverse', [
'body' => '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/payment/reverse');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'payment_id' => '',
'reference' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'client_id' => '',
'idempotency_key' => '',
'payment_id' => '',
'reference' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/payment/reverse');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/payment/reverse' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/payment/reverse' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/payment/reverse", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/payment/reverse"
payload = {
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/payment/reverse"
payload <- "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/payment/reverse")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/payment/reverse') do |req|
req.body = "{\n \"amount\": \"\",\n \"client_id\": \"\",\n \"idempotency_key\": \"\",\n \"payment_id\": \"\",\n \"reference\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/payment/reverse";
let payload = json!({
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/payment/reverse \
--header 'content-type: application/json' \
--data '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}'
echo '{
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/payment/reverse \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "client_id": "",\n "idempotency_key": "",\n "payment_id": "",\n "reference": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/payment/reverse
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"client_id": "",
"idempotency_key": "",
"payment_id": "",
"reference": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/payment/reverse")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"refund_id": "wallet-transaction-id-production-c5f8cd31-6cae-4cad-9b0d-f7c10be9cc4b",
"request_id": "HtlKzBX0fMeF7mU",
"status": "INITIATED"
}
POST
Revoke payment consent
{{baseUrl}}/payment_initiation/consent/revoke
BODY json
{
"client_id": "",
"consent_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_initiation/consent/revoke");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_initiation/consent/revoke" {:content-type :json
:form-params {:client_id ""
:consent_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/payment_initiation/consent/revoke"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_initiation/consent/revoke"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_initiation/consent/revoke");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_initiation/consent/revoke"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_initiation/consent/revoke HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 57
{
"client_id": "",
"consent_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_initiation/consent/revoke")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_initiation/consent/revoke"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/revoke")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_initiation/consent/revoke")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
consent_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_initiation/consent/revoke');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/revoke',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_initiation/consent/revoke';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_initiation/consent/revoke',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "consent_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_initiation/consent/revoke")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_initiation/consent/revoke',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', consent_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/revoke',
headers: {'content-type': 'application/json'},
body: {client_id: '', consent_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_initiation/consent/revoke');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
consent_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_initiation/consent/revoke',
headers: {'content-type': 'application/json'},
data: {client_id: '', consent_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_initiation/consent/revoke';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","consent_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"consent_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_initiation/consent/revoke"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_initiation/consent/revoke" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_initiation/consent/revoke",
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([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_initiation/consent/revoke', [
'body' => '{
"client_id": "",
"consent_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_initiation/consent/revoke');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'consent_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payment_initiation/consent/revoke');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_initiation/consent/revoke' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_initiation/consent/revoke' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_initiation/consent/revoke", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_initiation/consent/revoke"
payload = {
"client_id": "",
"consent_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_initiation/consent/revoke"
payload <- "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_initiation/consent/revoke")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_initiation/consent/revoke') do |req|
req.body = "{\n \"client_id\": \"\",\n \"consent_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_initiation/consent/revoke";
let payload = json!({
"client_id": "",
"consent_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_initiation/consent/revoke \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"consent_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"consent_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/payment_initiation/consent/revoke \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "consent_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/payment_initiation/consent/revoke
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"consent_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_initiation/consent/revoke")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4ciYaaesdqSiUAB"
}
POST
Save the selected accounts when connecting to the Platypus Oauth institution
{{baseUrl}}/sandbox/oauth/select_accounts
BODY json
{
"accounts": [],
"oauth_state_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/oauth/select_accounts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/oauth/select_accounts" {:content-type :json
:form-params {:accounts []
:oauth_state_id ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/oauth/select_accounts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/oauth/select_accounts"),
Content = new StringContent("{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/oauth/select_accounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/oauth/select_accounts"
payload := strings.NewReader("{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/oauth/select_accounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 44
{
"accounts": [],
"oauth_state_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/oauth/select_accounts")
.setHeader("content-type", "application/json")
.setBody("{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/oauth/select_accounts"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/oauth/select_accounts")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/oauth/select_accounts")
.header("content-type", "application/json")
.body("{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
accounts: [],
oauth_state_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/oauth/select_accounts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/oauth/select_accounts',
headers: {'content-type': 'application/json'},
data: {accounts: [], oauth_state_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/oauth/select_accounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accounts":[],"oauth_state_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/oauth/select_accounts',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accounts": [],\n "oauth_state_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/oauth/select_accounts")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/oauth/select_accounts',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({accounts: [], oauth_state_id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/oauth/select_accounts',
headers: {'content-type': 'application/json'},
body: {accounts: [], oauth_state_id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/oauth/select_accounts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accounts: [],
oauth_state_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/oauth/select_accounts',
headers: {'content-type': 'application/json'},
data: {accounts: [], oauth_state_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/oauth/select_accounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accounts":[],"oauth_state_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accounts": @[ ],
@"oauth_state_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/oauth/select_accounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/oauth/select_accounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/oauth/select_accounts",
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([
'accounts' => [
],
'oauth_state_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/oauth/select_accounts', [
'body' => '{
"accounts": [],
"oauth_state_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/oauth/select_accounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accounts' => [
],
'oauth_state_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accounts' => [
],
'oauth_state_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/oauth/select_accounts');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/oauth/select_accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [],
"oauth_state_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/oauth/select_accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accounts": [],
"oauth_state_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/oauth/select_accounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/oauth/select_accounts"
payload = {
"accounts": [],
"oauth_state_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/oauth/select_accounts"
payload <- "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/oauth/select_accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/oauth/select_accounts') do |req|
req.body = "{\n \"accounts\": [],\n \"oauth_state_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/oauth/select_accounts";
let payload = json!({
"accounts": (),
"oauth_state_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/oauth/select_accounts \
--header 'content-type: application/json' \
--data '{
"accounts": [],
"oauth_state_id": ""
}'
echo '{
"accounts": [],
"oauth_state_id": ""
}' | \
http POST {{baseUrl}}/sandbox/oauth/select_accounts \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accounts": [],\n "oauth_state_id": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/oauth/select_accounts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accounts": [],
"oauth_state_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/oauth/select_accounts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Search employer database
{{baseUrl}}/employers/search
BODY json
{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/employers/search");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/employers/search" {:content-type :json
:form-params {:client_id ""
:products []
:query ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/employers/search"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/employers/search"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/employers/search");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/employers/search"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/employers/search HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 70
{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/employers/search")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/employers/search"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/employers/search")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/employers/search")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
products: [],
query: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/employers/search');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/employers/search',
headers: {'content-type': 'application/json'},
data: {client_id: '', products: [], query: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/employers/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","products":[],"query":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/employers/search',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "products": [],\n "query": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/employers/search")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/employers/search',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', products: [], query: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/employers/search',
headers: {'content-type': 'application/json'},
body: {client_id: '', products: [], query: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/employers/search');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
products: [],
query: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/employers/search',
headers: {'content-type': 'application/json'},
data: {client_id: '', products: [], query: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/employers/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","products":[],"query":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"products": @[ ],
@"query": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/employers/search"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/employers/search" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/employers/search",
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([
'client_id' => '',
'products' => [
],
'query' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/employers/search', [
'body' => '{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/employers/search');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'products' => [
],
'query' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'products' => [
],
'query' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/employers/search');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/employers/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/employers/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/employers/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/employers/search"
payload = {
"client_id": "",
"products": [],
"query": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/employers/search"
payload <- "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/employers/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/employers/search') do |req|
req.body = "{\n \"client_id\": \"\",\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/employers/search";
let payload = json!({
"client_id": "",
"products": (),
"query": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/employers/search \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}'
echo '{
"client_id": "",
"products": [],
"query": "",
"secret": ""
}' | \
http POST {{baseUrl}}/employers/search \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "products": [],\n "query": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/employers/search
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"products": [],
"query": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/employers/search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"employers": [
{
"address": {
"city": "San Francisco",
"country": "US",
"postal_code": "94103",
"region": "CA",
"street": "1098 Harrison St"
},
"confidence_score": 1,
"employer_id": "emp_1",
"name": "Plaid Inc."
}
],
"request_id": "ixTBLZGvhD4NnmB"
}
POST
Search institutions
{{baseUrl}}/institutions/search
BODY json
{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/institutions/search");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/institutions/search" {:content-type :json
:form-params {:client_id ""
:country_codes []
:options {:include_auth_metadata false
:include_optional_metadata false
:include_payment_initiation_metadata false
:oauth false
:payment_initiation {:consent_id ""
:payment_id ""}}
:products []
:query ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/institutions/search"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/institutions/search"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/institutions/search");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/institutions/search"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/institutions/search HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 340
{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/institutions/search")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/institutions/search"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/institutions/search")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/institutions/search")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {
consent_id: '',
payment_id: ''
}
},
products: [],
query: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/institutions/search');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/search',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {consent_id: '', payment_id: ''}
},
products: [],
query: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/institutions/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_codes":[],"options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"oauth":false,"payment_initiation":{"consent_id":"","payment_id":""}},"products":[],"query":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/institutions/search',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "country_codes": [],\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "oauth": false,\n "payment_initiation": {\n "consent_id": "",\n "payment_id": ""\n }\n },\n "products": [],\n "query": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/institutions/search")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/institutions/search',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {consent_id: '', payment_id: ''}
},
products: [],
query: '',
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/search',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {consent_id: '', payment_id: ''}
},
products: [],
query: '',
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/institutions/search');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {
consent_id: '',
payment_id: ''
}
},
products: [],
query: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/institutions/search',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
country_codes: [],
options: {
include_auth_metadata: false,
include_optional_metadata: false,
include_payment_initiation_metadata: false,
oauth: false,
payment_initiation: {consent_id: '', payment_id: ''}
},
products: [],
query: '',
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/institutions/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","country_codes":[],"options":{"include_auth_metadata":false,"include_optional_metadata":false,"include_payment_initiation_metadata":false,"oauth":false,"payment_initiation":{"consent_id":"","payment_id":""}},"products":[],"query":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"country_codes": @[ ],
@"options": @{ @"include_auth_metadata": @NO, @"include_optional_metadata": @NO, @"include_payment_initiation_metadata": @NO, @"oauth": @NO, @"payment_initiation": @{ @"consent_id": @"", @"payment_id": @"" } },
@"products": @[ ],
@"query": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/institutions/search"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/institutions/search" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/institutions/search",
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([
'client_id' => '',
'country_codes' => [
],
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
]
],
'products' => [
],
'query' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/institutions/search', [
'body' => '{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/institutions/search');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'country_codes' => [
],
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
]
],
'products' => [
],
'query' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'country_codes' => [
],
'options' => [
'include_auth_metadata' => null,
'include_optional_metadata' => null,
'include_payment_initiation_metadata' => null,
'oauth' => null,
'payment_initiation' => [
'consent_id' => '',
'payment_id' => ''
]
],
'products' => [
],
'query' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/institutions/search');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/institutions/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/institutions/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/institutions/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/institutions/search"
payload = {
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": False,
"include_optional_metadata": False,
"include_payment_initiation_metadata": False,
"oauth": False,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/institutions/search"
payload <- "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/institutions/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/institutions/search') do |req|
req.body = "{\n \"client_id\": \"\",\n \"country_codes\": [],\n \"options\": {\n \"include_auth_metadata\": false,\n \"include_optional_metadata\": false,\n \"include_payment_initiation_metadata\": false,\n \"oauth\": false,\n \"payment_initiation\": {\n \"consent_id\": \"\",\n \"payment_id\": \"\"\n }\n },\n \"products\": [],\n \"query\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/institutions/search";
let payload = json!({
"client_id": "",
"country_codes": (),
"options": json!({
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": json!({
"consent_id": "",
"payment_id": ""
})
}),
"products": (),
"query": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/institutions/search \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}'
echo '{
"client_id": "",
"country_codes": [],
"options": {
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": {
"consent_id": "",
"payment_id": ""
}
},
"products": [],
"query": "",
"secret": ""
}' | \
http POST {{baseUrl}}/institutions/search \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "country_codes": [],\n "options": {\n "include_auth_metadata": false,\n "include_optional_metadata": false,\n "include_payment_initiation_metadata": false,\n "oauth": false,\n "payment_initiation": {\n "consent_id": "",\n "payment_id": ""\n }\n },\n "products": [],\n "query": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/institutions/search
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"country_codes": [],
"options": [
"include_auth_metadata": false,
"include_optional_metadata": false,
"include_payment_initiation_metadata": false,
"oauth": false,
"payment_initiation": [
"consent_id": "",
"payment_id": ""
]
],
"products": [],
"query": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/institutions/search")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"institutions": [
{
"country_codes": [
"US"
],
"institution_id": "ins_118923",
"name": "Red Platypus Bank - Red Platypus Bank",
"oauth": false,
"products": [
"assets",
"auth",
"balance",
"transactions",
"identity"
],
"routing_numbers": [
"011000138",
"011200365",
"011400495"
],
"status": {
"auth": {
"breakdown": {
"error_institution": 0.08,
"error_plaid": 0.01,
"success": 0.91
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"identity": {
"breakdown": {
"error_institution": 0.5,
"error_plaid": 0.08,
"success": 0.42
},
"last_status_change": "2019-02-15T15:50:00Z",
"status": "DEGRADED"
},
"investments": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"liabilities": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.02,
"success": 0.89
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"status": "HEALTHY"
},
"investments_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"item_logins": {
"breakdown": {
"error_institution": 0.09,
"error_plaid": 0.01,
"success": 0.9
},
"last_status_change": "2019-02-15T15:53:00Z",
"status": "HEALTHY"
},
"liabilities_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
},
"transactions_updates": {
"breakdown": {
"error_institution": 0.03,
"error_plaid": 0.02,
"refresh_interval": "NORMAL",
"success": 0.95
},
"last_status_change": "2019-02-12T08:22:00Z",
"status": "HEALTHY"
}
}
}
],
"request_id": "Ggmk0enW4smO2Tp"
}
POST
Set verification status for Sandbox account
{{baseUrl}}/sandbox/item/set_verification_status
BODY json
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/item/set_verification_status");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/item/set_verification_status" {:content-type :json
:form-params {:access_token ""
:account_id ""
:client_id ""
:secret ""
:verification_status ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/item/set_verification_status"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/item/set_verification_status"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/item/set_verification_status");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/item/set_verification_status"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/item/set_verification_status HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 108
{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/item/set_verification_status")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/item/set_verification_status"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/item/set_verification_status")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/item/set_verification_status")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/item/set_verification_status');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/set_verification_status',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/item/set_verification_status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":"","verification_status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/item/set_verification_status',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": "",\n "verification_status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/item/set_verification_status")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/item/set_verification_status',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/set_verification_status',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/item/set_verification_status');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/item/set_verification_status',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
account_id: '',
client_id: '',
secret: '',
verification_status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/item/set_verification_status';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","account_id":"","client_id":"","secret":"","verification_status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"account_id": @"",
@"client_id": @"",
@"secret": @"",
@"verification_status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/item/set_verification_status"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/item/set_verification_status" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/item/set_verification_status",
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([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => '',
'verification_status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/item/set_verification_status', [
'body' => '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/item/set_verification_status');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => '',
'verification_status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'account_id' => '',
'client_id' => '',
'secret' => '',
'verification_status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/item/set_verification_status');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/item/set_verification_status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/item/set_verification_status' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/item/set_verification_status", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/item/set_verification_status"
payload = {
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/item/set_verification_status"
payload <- "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/item/set_verification_status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/item/set_verification_status') do |req|
req.body = "{\n \"access_token\": \"\",\n \"account_id\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"verification_status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/item/set_verification_status";
let payload = json!({
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/item/set_verification_status \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}'
echo '{
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
}' | \
http POST {{baseUrl}}/sandbox/item/set_verification_status \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "account_id": "",\n "client_id": "",\n "secret": "",\n "verification_status": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/item/set_verification_status
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"account_id": "",
"client_id": "",
"secret": "",
"verification_status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/item/set_verification_status")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "1vwmF5TBQwiqfwP"
}
POST
Simulate a bank transfer event in Sandbox
{{baseUrl}}/sandbox/bank_transfer/simulate
BODY json
{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/bank_transfer/simulate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/bank_transfer/simulate" {:content-type :json
:form-params {:bank_transfer_id ""
:client_id ""
:event_type ""
:failure_reason {:ach_return_code ""
:description ""}
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/bank_transfer/simulate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/bank_transfer/simulate"),
Content = new StringContent("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/bank_transfer/simulate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/bank_transfer/simulate"
payload := strings.NewReader("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/bank_transfer/simulate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 159
{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/bank_transfer/simulate")
.setHeader("content-type", "application/json")
.setBody("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/bank_transfer/simulate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/bank_transfer/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/bank_transfer/simulate")
.header("content-type", "application/json")
.body("{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {
ach_return_code: '',
description: ''
},
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/bank_transfer/simulate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/simulate',
headers: {'content-type': 'application/json'},
data: {
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/bank_transfer/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","event_type":"","failure_reason":{"ach_return_code":"","description":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/bank_transfer/simulate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "bank_transfer_id": "",\n "client_id": "",\n "event_type": "",\n "failure_reason": {\n "ach_return_code": "",\n "description": ""\n },\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/bank_transfer/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/bank_transfer/simulate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/simulate',
headers: {'content-type': 'application/json'},
body: {
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/bank_transfer/simulate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {
ach_return_code: '',
description: ''
},
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/bank_transfer/simulate',
headers: {'content-type': 'application/json'},
data: {
bank_transfer_id: '',
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/bank_transfer/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"bank_transfer_id":"","client_id":"","event_type":"","failure_reason":{"ach_return_code":"","description":""},"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"bank_transfer_id": @"",
@"client_id": @"",
@"event_type": @"",
@"failure_reason": @{ @"ach_return_code": @"", @"description": @"" },
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/bank_transfer/simulate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/bank_transfer/simulate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/bank_transfer/simulate",
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([
'bank_transfer_id' => '',
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/bank_transfer/simulate', [
'body' => '{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/bank_transfer/simulate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'bank_transfer_id' => '',
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/bank_transfer/simulate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/bank_transfer/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/bank_transfer/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/bank_transfer/simulate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/bank_transfer/simulate"
payload = {
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/bank_transfer/simulate"
payload <- "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/bank_transfer/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/bank_transfer/simulate') do |req|
req.body = "{\n \"bank_transfer_id\": \"\",\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/bank_transfer/simulate";
let payload = json!({
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": json!({
"ach_return_code": "",
"description": ""
}),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/bank_transfer/simulate \
--header 'content-type: application/json' \
--data '{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}'
echo '{
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/bank_transfer/simulate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "bank_transfer_id": "",\n "client_id": "",\n "event_type": "",\n "failure_reason": {\n "ach_return_code": "",\n "description": ""\n },\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/bank_transfer/simulate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"bank_transfer_id": "",
"client_id": "",
"event_type": "",
"failure_reason": [
"ach_return_code": "",
"description": ""
],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/bank_transfer/simulate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "LmHYMwBhZUvsM03"
}
POST
Simulate a transfer event in Sandbox
{{baseUrl}}/sandbox/transfer/simulate
BODY json
{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/simulate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/simulate" {:content-type :json
:form-params {:client_id ""
:event_type ""
:failure_reason {:ach_return_code ""
:description ""}
:secret ""
:transfer_id ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/simulate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/simulate"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/simulate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/simulate"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/simulate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 154
{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/simulate")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/simulate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/simulate")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
event_type: '',
failure_reason: {
ach_return_code: '',
description: ''
},
secret: '',
transfer_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/simulate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/simulate',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: '',
transfer_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","event_type":"","failure_reason":{"ach_return_code":"","description":""},"secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/simulate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "event_type": "",\n "failure_reason": {\n "ach_return_code": "",\n "description": ""\n },\n "secret": "",\n "transfer_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/simulate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: '',
transfer_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/simulate',
headers: {'content-type': 'application/json'},
body: {
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: '',
transfer_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/simulate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
event_type: '',
failure_reason: {
ach_return_code: '',
description: ''
},
secret: '',
transfer_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/simulate',
headers: {'content-type': 'application/json'},
data: {
client_id: '',
event_type: '',
failure_reason: {ach_return_code: '', description: ''},
secret: '',
transfer_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","event_type":"","failure_reason":{"ach_return_code":"","description":""},"secret":"","transfer_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"event_type": @"",
@"failure_reason": @{ @"ach_return_code": @"", @"description": @"" },
@"secret": @"",
@"transfer_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/simulate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/simulate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/simulate",
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([
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => '',
'transfer_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/simulate', [
'body' => '{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/simulate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => '',
'transfer_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'event_type' => '',
'failure_reason' => [
'ach_return_code' => '',
'description' => ''
],
'secret' => '',
'transfer_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/simulate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/simulate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/simulate"
payload = {
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/simulate"
payload <- "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/simulate') do |req|
req.body = "{\n \"client_id\": \"\",\n \"event_type\": \"\",\n \"failure_reason\": {\n \"ach_return_code\": \"\",\n \"description\": \"\"\n },\n \"secret\": \"\",\n \"transfer_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/simulate";
let payload = json!({
"client_id": "",
"event_type": "",
"failure_reason": json!({
"ach_return_code": "",
"description": ""
}),
"secret": "",
"transfer_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/simulate \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}'
echo '{
"client_id": "",
"event_type": "",
"failure_reason": {
"ach_return_code": "",
"description": ""
},
"secret": "",
"transfer_id": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/simulate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "event_type": "",\n "failure_reason": {\n "ach_return_code": "",\n "description": ""\n },\n "secret": "",\n "transfer_id": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/simulate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"event_type": "",
"failure_reason": [
"ach_return_code": "",
"description": ""
],
"secret": "",
"transfer_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/simulate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu"
}
POST
Simulate creating a sweep
{{baseUrl}}/sandbox/transfer/sweep/simulate
BODY json
{
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/sweep/simulate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/sweep/simulate" {:content-type :json
:form-params {:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/sweep/simulate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/sweep/simulate"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/sweep/simulate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/sweep/simulate"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/sweep/simulate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/sweep/simulate")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/sweep/simulate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/sweep/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/sweep/simulate")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/sweep/simulate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/sweep/simulate',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/sweep/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/sweep/simulate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/sweep/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/sweep/simulate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/sweep/simulate',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/sweep/simulate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/sweep/simulate',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/sweep/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/sweep/simulate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/sweep/simulate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/sweep/simulate",
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([
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/sweep/simulate', [
'body' => '{
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/sweep/simulate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/sweep/simulate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/sweep/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/sweep/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/sweep/simulate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/sweep/simulate"
payload = {
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/sweep/simulate"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/sweep/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/sweep/simulate') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/sweep/simulate";
let payload = json!({
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/sweep/simulate \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/sweep/simulate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/sweep/simulate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/sweep/simulate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"sweep": {
"amount": "12.34",
"created": "2020-08-06T17:27:15Z",
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"id": "d5394a4d-0b04-4a02-9f4a-7ca5c0f52f9d",
"iso_currency_code": "USD",
"settled": "2020-08-07"
}
}
POST
Sync bank transfer events
{{baseUrl}}/bank_transfer/event/sync
BODY json
{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank_transfer/event/sync");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/bank_transfer/event/sync" {:content-type :json
:form-params {:after_id 0
:client_id ""
:count 0
:secret ""}})
require "http/client"
url = "{{baseUrl}}/bank_transfer/event/sync"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/bank_transfer/event/sync"),
Content = new StringContent("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank_transfer/event/sync");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/bank_transfer/event/sync"
payload := strings.NewReader("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/bank_transfer/event/sync HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank_transfer/event/sync")
.setHeader("content-type", "application/json")
.setBody("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/bank_transfer/event/sync"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/bank_transfer/event/sync")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank_transfer/event/sync")
.header("content-type", "application/json")
.body("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
after_id: 0,
client_id: '',
count: 0,
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/bank_transfer/event/sync');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/sync',
headers: {'content-type': 'application/json'},
data: {after_id: 0, client_id: '', count: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/bank_transfer/event/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"after_id":0,"client_id":"","count":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/bank_transfer/event/sync',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "after_id": 0,\n "client_id": "",\n "count": 0,\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/bank_transfer/event/sync")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/bank_transfer/event/sync',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({after_id: 0, client_id: '', count: 0, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/sync',
headers: {'content-type': 'application/json'},
body: {after_id: 0, client_id: '', count: 0, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/bank_transfer/event/sync');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
after_id: 0,
client_id: '',
count: 0,
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/bank_transfer/event/sync',
headers: {'content-type': 'application/json'},
data: {after_id: 0, client_id: '', count: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/bank_transfer/event/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"after_id":0,"client_id":"","count":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"after_id": @0,
@"client_id": @"",
@"count": @0,
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank_transfer/event/sync"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/bank_transfer/event/sync" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/bank_transfer/event/sync",
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([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/bank_transfer/event/sync', [
'body' => '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/bank_transfer/event/sync');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank_transfer/event/sync');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank_transfer/event/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank_transfer/event/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/bank_transfer/event/sync", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/bank_transfer/event/sync"
payload = {
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/bank_transfer/event/sync"
payload <- "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/bank_transfer/event/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/bank_transfer/event/sync') do |req|
req.body = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/bank_transfer/event/sync";
let payload = json!({
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/bank_transfer/event/sync \
--header 'content-type: application/json' \
--data '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
echo '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}' | \
http POST {{baseUrl}}/bank_transfer/event/sync \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "after_id": 0,\n "client_id": "",\n "count": 0,\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/bank_transfer/event/sync
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank_transfer/event/sync")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"bank_transfer_events": [
{
"account_id": "6qL6lWoQkAfNE3mB8Kk5tAnvpX81qefrvvl7B",
"bank_transfer_amount": "12.34",
"bank_transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"bank_transfer_iso_currency_code": "USD",
"bank_transfer_type": "credit",
"direction": "outbound",
"event_id": 1,
"event_type": "pending",
"failure_reason": null,
"origination_account_id": "",
"timestamp": "2020-08-06T17:27:15Z"
}
],
"request_id": "mdqfuVxeoza6mhu"
}
POST
Sync transfer events
{{baseUrl}}/transfer/event/sync
BODY json
{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transfer/event/sync");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transfer/event/sync" {:content-type :json
:form-params {:after_id 0
:client_id ""
:count 0
:secret ""}})
require "http/client"
url = "{{baseUrl}}/transfer/event/sync"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/transfer/event/sync"),
Content = new StringContent("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transfer/event/sync");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transfer/event/sync"
payload := strings.NewReader("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/transfer/event/sync HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transfer/event/sync")
.setHeader("content-type", "application/json")
.setBody("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transfer/event/sync"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transfer/event/sync")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transfer/event/sync")
.header("content-type", "application/json")
.body("{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
after_id: 0,
client_id: '',
count: 0,
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/transfer/event/sync');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/sync',
headers: {'content-type': 'application/json'},
data: {after_id: 0, client_id: '', count: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transfer/event/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"after_id":0,"client_id":"","count":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/transfer/event/sync',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "after_id": 0,\n "client_id": "",\n "count": 0,\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transfer/event/sync")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/transfer/event/sync',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({after_id: 0, client_id: '', count: 0, secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/sync',
headers: {'content-type': 'application/json'},
body: {after_id: 0, client_id: '', count: 0, secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/transfer/event/sync');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
after_id: 0,
client_id: '',
count: 0,
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/transfer/event/sync',
headers: {'content-type': 'application/json'},
data: {after_id: 0, client_id: '', count: 0, secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transfer/event/sync';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"after_id":0,"client_id":"","count":0,"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"after_id": @0,
@"client_id": @"",
@"count": @0,
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transfer/event/sync"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/transfer/event/sync" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transfer/event/sync",
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([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/transfer/event/sync', [
'body' => '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transfer/event/sync');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'after_id' => 0,
'client_id' => '',
'count' => 0,
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transfer/event/sync');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transfer/event/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transfer/event/sync' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transfer/event/sync", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transfer/event/sync"
payload = {
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transfer/event/sync"
payload <- "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transfer/event/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/transfer/event/sync') do |req|
req.body = "{\n \"after_id\": 0,\n \"client_id\": \"\",\n \"count\": 0,\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transfer/event/sync";
let payload = json!({
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/transfer/event/sync \
--header 'content-type: application/json' \
--data '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}'
echo '{
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
}' | \
http POST {{baseUrl}}/transfer/event/sync \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "after_id": 0,\n "client_id": "",\n "count": 0,\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/transfer/event/sync
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"after_id": 0,
"client_id": "",
"count": 0,
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transfer/event/sync")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "mdqfuVxeoza6mhu",
"transfer_events": [
{
"account_id": "3gE5gnRzNyfXpBK5wEEKcymJ5albGVUqg77gr",
"event_id": 1,
"event_type": "pending",
"failure_reason": null,
"funding_account_id": "8945fedc-e703-463d-86b1-dc0607b55460",
"origination_account_id": "",
"originator_client_id": null,
"refund_id": null,
"sweep_amount": null,
"sweep_id": null,
"timestamp": "2019-12-09T17:27:15Z",
"transfer_amount": "12.34",
"transfer_id": "460cbe92-2dcc-8eae-5ad6-b37d0ec90fd9",
"transfer_type": "credit"
}
]
}
POST
Trigger the creation of a repayment
{{baseUrl}}/sandbox/transfer/repayment/simulate
BODY json
{
"client_id": "",
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sandbox/transfer/repayment/simulate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sandbox/transfer/repayment/simulate" {:content-type :json
:form-params {:client_id ""
:secret ""}})
require "http/client"
url = "{{baseUrl}}/sandbox/transfer/repayment/simulate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sandbox/transfer/repayment/simulate"),
Content = new StringContent("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sandbox/transfer/repayment/simulate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sandbox/transfer/repayment/simulate"
payload := strings.NewReader("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sandbox/transfer/repayment/simulate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 37
{
"client_id": "",
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sandbox/transfer/repayment/simulate")
.setHeader("content-type", "application/json")
.setBody("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sandbox/transfer/repayment/simulate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/repayment/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sandbox/transfer/repayment/simulate")
.header("content-type", "application/json")
.body("{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
client_id: '',
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sandbox/transfer/repayment/simulate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/repayment/simulate',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sandbox/transfer/repayment/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sandbox/transfer/repayment/simulate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "client_id": "",\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sandbox/transfer/repayment/simulate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sandbox/transfer/repayment/simulate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({client_id: '', secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/repayment/simulate',
headers: {'content-type': 'application/json'},
body: {client_id: '', secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sandbox/transfer/repayment/simulate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
client_id: '',
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sandbox/transfer/repayment/simulate',
headers: {'content-type': 'application/json'},
data: {client_id: '', secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sandbox/transfer/repayment/simulate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"client_id":"","secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"client_id": @"",
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sandbox/transfer/repayment/simulate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sandbox/transfer/repayment/simulate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sandbox/transfer/repayment/simulate",
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([
'client_id' => '',
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sandbox/transfer/repayment/simulate', [
'body' => '{
"client_id": "",
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sandbox/transfer/repayment/simulate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'client_id' => '',
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'client_id' => '',
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/sandbox/transfer/repayment/simulate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sandbox/transfer/repayment/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sandbox/transfer/repayment/simulate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"client_id": "",
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sandbox/transfer/repayment/simulate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sandbox/transfer/repayment/simulate"
payload = {
"client_id": "",
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sandbox/transfer/repayment/simulate"
payload <- "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sandbox/transfer/repayment/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sandbox/transfer/repayment/simulate') do |req|
req.body = "{\n \"client_id\": \"\",\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sandbox/transfer/repayment/simulate";
let payload = json!({
"client_id": "",
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sandbox/transfer/repayment/simulate \
--header 'content-type: application/json' \
--data '{
"client_id": "",
"secret": ""
}'
echo '{
"client_id": "",
"secret": ""
}' | \
http POST {{baseUrl}}/sandbox/transfer/repayment/simulate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "client_id": "",\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/sandbox/transfer/repayment/simulate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"client_id": "",
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sandbox/transfer/repayment/simulate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "4vAbY6XyqqoPQLB"
}
POST
Update Webhook URL
{{baseUrl}}/item/webhook/update
BODY json
{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/webhook/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/webhook/update" {:content-type :json
:form-params {:access_token ""
:client_id ""
:secret ""
:webhook ""}})
require "http/client"
url = "{{baseUrl}}/item/webhook/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/webhook/update"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/webhook/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/webhook/update"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/webhook/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 76
{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/webhook/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/webhook/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/webhook/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/webhook/update")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
client_id: '',
secret: '',
webhook: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/webhook/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/webhook/update',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/webhook/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/webhook/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "client_id": "",\n "secret": "",\n "webhook": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/webhook/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/webhook/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({access_token: '', client_id: '', secret: '', webhook: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/webhook/update',
headers: {'content-type': 'application/json'},
body: {access_token: '', client_id: '', secret: '', webhook: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/webhook/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
client_id: '',
secret: '',
webhook: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/webhook/update',
headers: {'content-type': 'application/json'},
data: {access_token: '', client_id: '', secret: '', webhook: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/webhook/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","client_id":"","secret":"","webhook":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"client_id": @"",
@"secret": @"",
@"webhook": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/webhook/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/webhook/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/webhook/update",
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([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/webhook/update', [
'body' => '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/webhook/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'client_id' => '',
'secret' => '',
'webhook' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/webhook/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/webhook/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/webhook/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/webhook/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/webhook/update"
payload = {
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/webhook/update"
payload <- "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/webhook/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/webhook/update') do |req|
req.body = "{\n \"access_token\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"webhook\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/webhook/update";
let payload = json!({
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/webhook/update \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}'
echo '{
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
}' | \
http POST {{baseUrl}}/item/webhook/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "client_id": "",\n "secret": "",\n "webhook": ""\n}' \
--output-document \
- {{baseUrl}}/item/webhook/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"client_id": "",
"secret": "",
"webhook": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/webhook/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"item": {
"available_products": [
"balance",
"identity",
"payment_initiation",
"transactions"
],
"billed_products": [
"assets",
"auth"
],
"consent_expiration_time": null,
"error": null,
"institution_id": "ins_117650",
"item_id": "DWVAAPWq4RHGlEaNyGKRTAnPLaEmo8Cvq7na6",
"update_type": "background",
"webhook": "https://www.genericwebhookurl.com/webhook"
},
"request_id": "vYK11LNTfRoAMbj"
}
POST
Update an Audit Copy Token
{{baseUrl}}/credit/audit_copy_token/update
BODY json
{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/credit/audit_copy_token/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/credit/audit_copy_token/update" {:content-type :json
:form-params {:audit_copy_token ""
:client_id ""
:report_tokens []
:secret ""}})
require "http/client"
url = "{{baseUrl}}/credit/audit_copy_token/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/credit/audit_copy_token/update"),
Content = new StringContent("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/credit/audit_copy_token/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/credit/audit_copy_token/update"
payload := strings.NewReader("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/credit/audit_copy_token/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 86
{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/credit/audit_copy_token/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/credit/audit_copy_token/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/credit/audit_copy_token/update")
.header("content-type", "application/json")
.body("{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
.asString();
const data = JSON.stringify({
audit_copy_token: '',
client_id: '',
report_tokens: [],
secret: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/credit/audit_copy_token/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/update',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', report_tokens: [], secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/credit/audit_copy_token/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","report_tokens":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/credit/audit_copy_token/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "audit_copy_token": "",\n "client_id": "",\n "report_tokens": [],\n "secret": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/credit/audit_copy_token/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/credit/audit_copy_token/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({audit_copy_token: '', client_id: '', report_tokens: [], secret: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/update',
headers: {'content-type': 'application/json'},
body: {audit_copy_token: '', client_id: '', report_tokens: [], secret: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/credit/audit_copy_token/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
audit_copy_token: '',
client_id: '',
report_tokens: [],
secret: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/credit/audit_copy_token/update',
headers: {'content-type': 'application/json'},
data: {audit_copy_token: '', client_id: '', report_tokens: [], secret: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/credit/audit_copy_token/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"audit_copy_token":"","client_id":"","report_tokens":[],"secret":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"audit_copy_token": @"",
@"client_id": @"",
@"report_tokens": @[ ],
@"secret": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/credit/audit_copy_token/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/credit/audit_copy_token/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/credit/audit_copy_token/update",
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([
'audit_copy_token' => '',
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/credit/audit_copy_token/update', [
'body' => '{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/credit/audit_copy_token/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'audit_copy_token' => '',
'client_id' => '',
'report_tokens' => [
],
'secret' => ''
]));
$request->setRequestUrl('{{baseUrl}}/credit/audit_copy_token/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/credit/audit_copy_token/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/credit/audit_copy_token/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/credit/audit_copy_token/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/credit/audit_copy_token/update"
payload = {
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/credit/audit_copy_token/update"
payload <- "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/credit/audit_copy_token/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/credit/audit_copy_token/update') do |req|
req.body = "{\n \"audit_copy_token\": \"\",\n \"client_id\": \"\",\n \"report_tokens\": [],\n \"secret\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/credit/audit_copy_token/update";
let payload = json!({
"audit_copy_token": "",
"client_id": "",
"report_tokens": (),
"secret": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/credit/audit_copy_token/update \
--header 'content-type: application/json' \
--data '{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}'
echo '{
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
}' | \
http POST {{baseUrl}}/credit/audit_copy_token/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "audit_copy_token": "",\n "client_id": "",\n "report_tokens": [],\n "secret": ""\n}' \
--output-document \
- {{baseUrl}}/credit/audit_copy_token/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"audit_copy_token": "",
"client_id": "",
"report_tokens": [],
"secret": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/credit/audit_copy_token/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"request_id": "eYupqX1mZkEuQRx",
"updated": true
}
POST
Update an entity screening
{{baseUrl}}/watchlist_screening/entity/update
BODY json
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/entity/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/entity/update" {:content-type :json
:form-params {:assignee ""
:client_id ""
:client_user_id ""
:entity_watchlist_screening_id ""
:reset_fields []
:search_terms {:client_id ""
:country ""
:document_number ""
:email_address ""
:entity_watchlist_program_id ""
:legal_name ""
:phone_number ""
:secret ""
:url ""}
:secret ""
:status ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/entity/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/entity/update"),
Content = new StringContent("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/entity/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/entity/update"
payload := strings.NewReader("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/entity/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 390
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/entity/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/entity/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/entity/update")
.header("content-type", "application/json")
.body("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/entity/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/update',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/entity/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","entity_watchlist_screening_id":"","reset_fields":[],"search_terms":{"client_id":"","country":"","document_number":"","email_address":"","entity_watchlist_program_id":"","legal_name":"","phone_number":"","secret":"","url":""},"secret":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/entity/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "entity_watchlist_screening_id": "",\n "reset_fields": [],\n "search_terms": {\n "client_id": "",\n "country": "",\n "document_number": "",\n "email_address": "",\n "entity_watchlist_program_id": "",\n "legal_name": "",\n "phone_number": "",\n "secret": "",\n "url": ""\n },\n "secret": "",\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/entity/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/entity/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/update',
headers: {'content-type': 'application/json'},
body: {
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/entity/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/entity/update',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
entity_watchlist_screening_id: '',
reset_fields: [],
search_terms: {
client_id: '',
country: '',
document_number: '',
email_address: '',
entity_watchlist_program_id: '',
legal_name: '',
phone_number: '',
secret: '',
url: ''
},
secret: '',
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/entity/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","entity_watchlist_screening_id":"","reset_fields":[],"search_terms":{"client_id":"","country":"","document_number":"","email_address":"","entity_watchlist_program_id":"","legal_name":"","phone_number":"","secret":"","url":""},"secret":"","status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assignee": @"",
@"client_id": @"",
@"client_user_id": @"",
@"entity_watchlist_screening_id": @"",
@"reset_fields": @[ ],
@"search_terms": @{ @"client_id": @"", @"country": @"", @"document_number": @"", @"email_address": @"", @"entity_watchlist_program_id": @"", @"legal_name": @"", @"phone_number": @"", @"secret": @"", @"url": @"" },
@"secret": @"",
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/entity/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/entity/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/entity/update",
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([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'entity_watchlist_screening_id' => '',
'reset_fields' => [
],
'search_terms' => [
'client_id' => '',
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'secret' => '',
'url' => ''
],
'secret' => '',
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/entity/update', [
'body' => '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/entity/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'entity_watchlist_screening_id' => '',
'reset_fields' => [
],
'search_terms' => [
'client_id' => '',
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'secret' => '',
'url' => ''
],
'secret' => '',
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'entity_watchlist_screening_id' => '',
'reset_fields' => [
],
'search_terms' => [
'client_id' => '',
'country' => '',
'document_number' => '',
'email_address' => '',
'entity_watchlist_program_id' => '',
'legal_name' => '',
'phone_number' => '',
'secret' => '',
'url' => ''
],
'secret' => '',
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/entity/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/entity/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/entity/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/entity/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/entity/update"
payload = {
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/entity/update"
payload <- "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/entity/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/entity/update') do |req|
req.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"entity_watchlist_screening_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"client_id\": \"\",\n \"country\": \"\",\n \"document_number\": \"\",\n \"email_address\": \"\",\n \"entity_watchlist_program_id\": \"\",\n \"legal_name\": \"\",\n \"phone_number\": \"\",\n \"secret\": \"\",\n \"url\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/entity/update";
let payload = json!({
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": (),
"search_terms": json!({
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
}),
"secret": "",
"status": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/entity/update \
--header 'content-type: application/json' \
--data '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}'
echo '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": {
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
},
"secret": "",
"status": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/entity/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "entity_watchlist_screening_id": "",\n "reset_fields": [],\n "search_terms": {\n "client_id": "",\n "country": "",\n "document_number": "",\n "email_address": "",\n "entity_watchlist_program_id": "",\n "legal_name": "",\n "phone_number": "",\n "secret": "",\n "url": ""\n },\n "secret": "",\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/entity/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assignee": "",
"client_id": "",
"client_user_id": "",
"entity_watchlist_screening_id": "",
"reset_fields": [],
"search_terms": [
"client_id": "",
"country": "",
"document_number": "",
"email_address": "",
"entity_watchlist_program_id": "",
"legal_name": "",
"phone_number": "",
"secret": "",
"url": ""
],
"secret": "",
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/entity/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "entscr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"document_number": "C31195855",
"email_address": "user@example.com",
"entity_watchlist_program_id": "entprg_2eRPsDnL66rZ7H",
"legal_name": "Al-Qaida",
"phone_number": "+14025671234",
"url": "https://example.com",
"version": 1
},
"status": "cleared"
}
POST
Update individual watchlist screening
{{baseUrl}}/watchlist_screening/individual/update
BODY json
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/watchlist_screening/individual/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/watchlist_screening/individual/update" {:content-type :json
:form-params {:assignee ""
:client_id ""
:client_user_id ""
:reset_fields []
:search_terms {:country ""
:date_of_birth ""
:document_number ""
:legal_name ""
:watchlist_program_id ""}
:secret ""
:status ""
:watchlist_screening_id ""}})
require "http/client"
url = "{{baseUrl}}/watchlist_screening/individual/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/watchlist_screening/individual/update"),
Content = new StringContent("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/watchlist_screening/individual/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/watchlist_screening/individual/update"
payload := strings.NewReader("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/watchlist_screening/individual/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 298
{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/watchlist_screening/individual/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/watchlist_screening/individual/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/watchlist_screening/individual/update")
.header("content-type", "application/json")
.body("{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
.asString();
const data = JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/watchlist_screening/individual/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/update',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/watchlist_screening/individual/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","reset_fields":[],"search_terms":{"country":"","date_of_birth":"","document_number":"","legal_name":"","watchlist_program_id":""},"secret":"","status":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/watchlist_screening/individual/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "reset_fields": [],\n "search_terms": {\n "country": "",\n "date_of_birth": "",\n "document_number": "",\n "legal_name": "",\n "watchlist_program_id": ""\n },\n "secret": "",\n "status": "",\n "watchlist_screening_id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/watchlist_screening/individual/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/watchlist_screening/individual/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/update',
headers: {'content-type': 'application/json'},
body: {
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/watchlist_screening/individual/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/watchlist_screening/individual/update',
headers: {'content-type': 'application/json'},
data: {
assignee: '',
client_id: '',
client_user_id: '',
reset_fields: [],
search_terms: {
country: '',
date_of_birth: '',
document_number: '',
legal_name: '',
watchlist_program_id: ''
},
secret: '',
status: '',
watchlist_screening_id: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/watchlist_screening/individual/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"assignee":"","client_id":"","client_user_id":"","reset_fields":[],"search_terms":{"country":"","date_of_birth":"","document_number":"","legal_name":"","watchlist_program_id":""},"secret":"","status":"","watchlist_screening_id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"assignee": @"",
@"client_id": @"",
@"client_user_id": @"",
@"reset_fields": @[ ],
@"search_terms": @{ @"country": @"", @"date_of_birth": @"", @"document_number": @"", @"legal_name": @"", @"watchlist_program_id": @"" },
@"secret": @"",
@"status": @"",
@"watchlist_screening_id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/watchlist_screening/individual/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/watchlist_screening/individual/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/watchlist_screening/individual/update",
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([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'reset_fields' => [
],
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => '',
'status' => '',
'watchlist_screening_id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/watchlist_screening/individual/update', [
'body' => '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/watchlist_screening/individual/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'reset_fields' => [
],
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => '',
'status' => '',
'watchlist_screening_id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'assignee' => '',
'client_id' => '',
'client_user_id' => '',
'reset_fields' => [
],
'search_terms' => [
'country' => '',
'date_of_birth' => '',
'document_number' => '',
'legal_name' => '',
'watchlist_program_id' => ''
],
'secret' => '',
'status' => '',
'watchlist_screening_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/watchlist_screening/individual/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/watchlist_screening/individual/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/watchlist_screening/individual/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/watchlist_screening/individual/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/watchlist_screening/individual/update"
payload = {
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/watchlist_screening/individual/update"
payload <- "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/watchlist_screening/individual/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/watchlist_screening/individual/update') do |req|
req.body = "{\n \"assignee\": \"\",\n \"client_id\": \"\",\n \"client_user_id\": \"\",\n \"reset_fields\": [],\n \"search_terms\": {\n \"country\": \"\",\n \"date_of_birth\": \"\",\n \"document_number\": \"\",\n \"legal_name\": \"\",\n \"watchlist_program_id\": \"\"\n },\n \"secret\": \"\",\n \"status\": \"\",\n \"watchlist_screening_id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/watchlist_screening/individual/update";
let payload = json!({
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": (),
"search_terms": json!({
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
}),
"secret": "",
"status": "",
"watchlist_screening_id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/watchlist_screening/individual/update \
--header 'content-type: application/json' \
--data '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}'
echo '{
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": {
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
},
"secret": "",
"status": "",
"watchlist_screening_id": ""
}' | \
http POST {{baseUrl}}/watchlist_screening/individual/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "assignee": "",\n "client_id": "",\n "client_user_id": "",\n "reset_fields": [],\n "search_terms": {\n "country": "",\n "date_of_birth": "",\n "document_number": "",\n "legal_name": "",\n "watchlist_program_id": ""\n },\n "secret": "",\n "status": "",\n "watchlist_screening_id": ""\n}' \
--output-document \
- {{baseUrl}}/watchlist_screening/individual/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"assignee": "",
"client_id": "",
"client_user_id": "",
"reset_fields": [],
"search_terms": [
"country": "",
"date_of_birth": "",
"document_number": "",
"legal_name": "",
"watchlist_program_id": ""
],
"secret": "",
"status": "",
"watchlist_screening_id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/watchlist_screening/individual/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"assignee": "54350110fedcbaf01234ffee",
"audit_trail": {
"dashboard_user_id": "54350110fedcbaf01234ffee",
"source": "dashboard",
"timestamp": "2020-07-24T03:26:02Z"
},
"client_user_id": "your-db-id-3b24110",
"id": "scr_52xR9LKo77r1Np",
"request_id": "saKrIBuEB9qJZng",
"search_terms": {
"country": "US",
"date_of_birth": "1990-05-29",
"document_number": "C31195855",
"legal_name": "Aleksey Potemkin",
"version": 1,
"watchlist_program_id": "prg_2eRPsDnL66rZ7H"
},
"status": "cleared"
}
POST
Update the scopes of access for a particular application
{{baseUrl}}/item/application/scopes/update
BODY json
{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/item/application/scopes/update");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/item/application/scopes/update" {:content-type :json
:form-params {:access_token ""
:application_id ""
:client_id ""
:context ""
:scopes {:accounts [{:account_product_access ""
:authorized false
:unique_id ""}]
:new_accounts false
:product_access {:accounts_details_transactions false
:accounts_routing_number false
:accounts_statements false
:accounts_tax_statements false
:auth false
:customers_profiles false
:identity false
:statements false
:transactions false}}
:secret ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/item/application/scopes/update"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/item/application/scopes/update"),
Content = new StringContent("{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/item/application/scopes/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/item/application/scopes/update"
payload := strings.NewReader("{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/item/application/scopes/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 621
{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/item/application/scopes/update")
.setHeader("content-type", "application/json")
.setBody("{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/item/application/scopes/update"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/item/application/scopes/update")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/item/application/scopes/update")
.header("content-type", "application/json")
.body("{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [
{
account_product_access: '',
authorized: false,
unique_id: ''
}
],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/item/application/scopes/update');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/scopes/update',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [{account_product_access: '', authorized: false, unique_id: ''}],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/item/application/scopes/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","application_id":"","client_id":"","context":"","scopes":{"accounts":[{"account_product_access":"","authorized":false,"unique_id":""}],"new_accounts":false,"product_access":{"accounts_details_transactions":false,"accounts_routing_number":false,"accounts_statements":false,"accounts_tax_statements":false,"auth":false,"customers_profiles":false,"identity":false,"statements":false,"transactions":false}},"secret":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/item/application/scopes/update',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "access_token": "",\n "application_id": "",\n "client_id": "",\n "context": "",\n "scopes": {\n "accounts": [\n {\n "account_product_access": "",\n "authorized": false,\n "unique_id": ""\n }\n ],\n "new_accounts": false,\n "product_access": {\n "accounts_details_transactions": false,\n "accounts_routing_number": false,\n "accounts_statements": false,\n "accounts_tax_statements": false,\n "auth": false,\n "customers_profiles": false,\n "identity": false,\n "statements": false,\n "transactions": false\n }\n },\n "secret": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/item/application/scopes/update")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/item/application/scopes/update',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [{account_product_access: '', authorized: false, unique_id: ''}],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/scopes/update',
headers: {'content-type': 'application/json'},
body: {
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [{account_product_access: '', authorized: false, unique_id: ''}],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/item/application/scopes/update');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [
{
account_product_access: '',
authorized: false,
unique_id: ''
}
],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/item/application/scopes/update',
headers: {'content-type': 'application/json'},
data: {
access_token: '',
application_id: '',
client_id: '',
context: '',
scopes: {
accounts: [{account_product_access: '', authorized: false, unique_id: ''}],
new_accounts: false,
product_access: {
accounts_details_transactions: false,
accounts_routing_number: false,
accounts_statements: false,
accounts_tax_statements: false,
auth: false,
customers_profiles: false,
identity: false,
statements: false,
transactions: false
}
},
secret: '',
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/item/application/scopes/update';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"access_token":"","application_id":"","client_id":"","context":"","scopes":{"accounts":[{"account_product_access":"","authorized":false,"unique_id":""}],"new_accounts":false,"product_access":{"accounts_details_transactions":false,"accounts_routing_number":false,"accounts_statements":false,"accounts_tax_statements":false,"auth":false,"customers_profiles":false,"identity":false,"statements":false,"transactions":false}},"secret":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"access_token": @"",
@"application_id": @"",
@"client_id": @"",
@"context": @"",
@"scopes": @{ @"accounts": @[ @{ @"account_product_access": @"", @"authorized": @NO, @"unique_id": @"" } ], @"new_accounts": @NO, @"product_access": @{ @"accounts_details_transactions": @NO, @"accounts_routing_number": @NO, @"accounts_statements": @NO, @"accounts_tax_statements": @NO, @"auth": @NO, @"customers_profiles": @NO, @"identity": @NO, @"statements": @NO, @"transactions": @NO } },
@"secret": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/item/application/scopes/update"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/item/application/scopes/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/item/application/scopes/update",
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([
'access_token' => '',
'application_id' => '',
'client_id' => '',
'context' => '',
'scopes' => [
'accounts' => [
[
'account_product_access' => '',
'authorized' => null,
'unique_id' => ''
]
],
'new_accounts' => null,
'product_access' => [
'accounts_details_transactions' => null,
'accounts_routing_number' => null,
'accounts_statements' => null,
'accounts_tax_statements' => null,
'auth' => null,
'customers_profiles' => null,
'identity' => null,
'statements' => null,
'transactions' => null
]
],
'secret' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/item/application/scopes/update', [
'body' => '{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/item/application/scopes/update');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'access_token' => '',
'application_id' => '',
'client_id' => '',
'context' => '',
'scopes' => [
'accounts' => [
[
'account_product_access' => '',
'authorized' => null,
'unique_id' => ''
]
],
'new_accounts' => null,
'product_access' => [
'accounts_details_transactions' => null,
'accounts_routing_number' => null,
'accounts_statements' => null,
'accounts_tax_statements' => null,
'auth' => null,
'customers_profiles' => null,
'identity' => null,
'statements' => null,
'transactions' => null
]
],
'secret' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'access_token' => '',
'application_id' => '',
'client_id' => '',
'context' => '',
'scopes' => [
'accounts' => [
[
'account_product_access' => '',
'authorized' => null,
'unique_id' => ''
]
],
'new_accounts' => null,
'product_access' => [
'accounts_details_transactions' => null,
'accounts_routing_number' => null,
'accounts_statements' => null,
'accounts_tax_statements' => null,
'auth' => null,
'customers_profiles' => null,
'identity' => null,
'statements' => null,
'transactions' => null
]
],
'secret' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/item/application/scopes/update');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/item/application/scopes/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/item/application/scopes/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/item/application/scopes/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/item/application/scopes/update"
payload = {
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": False,
"unique_id": ""
}
],
"new_accounts": False,
"product_access": {
"accounts_details_transactions": False,
"accounts_routing_number": False,
"accounts_statements": False,
"accounts_tax_statements": False,
"auth": False,
"customers_profiles": False,
"identity": False,
"statements": False,
"transactions": False
}
},
"secret": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/item/application/scopes/update"
payload <- "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/item/application/scopes/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/item/application/scopes/update') do |req|
req.body = "{\n \"access_token\": \"\",\n \"application_id\": \"\",\n \"client_id\": \"\",\n \"context\": \"\",\n \"scopes\": {\n \"accounts\": [\n {\n \"account_product_access\": \"\",\n \"authorized\": false,\n \"unique_id\": \"\"\n }\n ],\n \"new_accounts\": false,\n \"product_access\": {\n \"accounts_details_transactions\": false,\n \"accounts_routing_number\": false,\n \"accounts_statements\": false,\n \"accounts_tax_statements\": false,\n \"auth\": false,\n \"customers_profiles\": false,\n \"identity\": false,\n \"statements\": false,\n \"transactions\": false\n }\n },\n \"secret\": \"\",\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/item/application/scopes/update";
let payload = json!({
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": json!({
"accounts": (
json!({
"account_product_access": "",
"authorized": false,
"unique_id": ""
})
),
"new_accounts": false,
"product_access": json!({
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
})
}),
"secret": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/item/application/scopes/update \
--header 'content-type: application/json' \
--data '{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}'
echo '{
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": {
"accounts": [
{
"account_product_access": "",
"authorized": false,
"unique_id": ""
}
],
"new_accounts": false,
"product_access": {
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
}
},
"secret": "",
"state": ""
}' | \
http POST {{baseUrl}}/item/application/scopes/update \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "access_token": "",\n "application_id": "",\n "client_id": "",\n "context": "",\n "scopes": {\n "accounts": [\n {\n "account_product_access": "",\n "authorized": false,\n "unique_id": ""\n }\n ],\n "new_accounts": false,\n "product_access": {\n "accounts_details_transactions": false,\n "accounts_routing_number": false,\n "accounts_statements": false,\n "accounts_tax_statements": false,\n "auth": false,\n "customers_profiles": false,\n "identity": false,\n "statements": false,\n "transactions": false\n }\n },\n "secret": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/item/application/scopes/update
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"access_token": "",
"application_id": "",
"client_id": "",
"context": "",
"scopes": [
"accounts": [
[
"account_product_access": "",
"authorized": false,
"unique_id": ""
]
],
"new_accounts": false,
"product_access": [
"accounts_details_transactions": false,
"accounts_routing_number": false,
"accounts_statements": false,
"accounts_tax_statements": false,
"auth": false,
"customers_profiles": false,
"identity": false,
"statements": false,
"transactions": false
]
],
"secret": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/item/application/scopes/update")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Webhook receiver for fdx notifications
{{baseUrl}}/fdx/notifications
BODY json
{
"category": "",
"notificationId": "",
"notificationPayload": {
"customFields": {
"name": "",
"value": ""
},
"id": "",
"idType": ""
},
"priority": "",
"publisher": {
"homeUri": "",
"logoUri": "",
"name": "",
"registeredEntityId": "",
"registeredEntityName": "",
"registry": "",
"type": ""
},
"sentOn": "",
"severity": "",
"subscriber": {},
"type": "",
"url": {
"action": "",
"href": "",
"rel": "",
"types": []
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fdx/notifications");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/fdx/notifications" {:content-type :json
:form-params {:sentOn "2021-07-15T14:46:41.375Z"
:url {:href "https://api.fi.com/fdx/v4/accounts/12345"}}})
require "http/client"
url = "{{baseUrl}}/fdx/notifications"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/fdx/notifications"),
Content = new StringContent("{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fdx/notifications");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fdx/notifications"
payload := strings.NewReader("{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/fdx/notifications HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 113
{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/fdx/notifications")
.setHeader("content-type", "application/json")
.setBody("{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fdx/notifications"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/fdx/notifications")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/fdx/notifications")
.header("content-type", "application/json")
.body("{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}")
.asString();
const data = JSON.stringify({
sentOn: '2021-07-15T14:46:41.375Z',
url: {
href: 'https://api.fi.com/fdx/v4/accounts/12345'
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/fdx/notifications');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/fdx/notifications',
headers: {'content-type': 'application/json'},
data: {
sentOn: '2021-07-15T14:46:41.375Z',
url: {href: 'https://api.fi.com/fdx/v4/accounts/12345'}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fdx/notifications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sentOn":"2021-07-15T14:46:41.375Z","url":{"href":"https://api.fi.com/fdx/v4/accounts/12345"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/fdx/notifications',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "sentOn": "2021-07-15T14:46:41.375Z",\n "url": {\n "href": "https://api.fi.com/fdx/v4/accounts/12345"\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/fdx/notifications")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/fdx/notifications',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
sentOn: '2021-07-15T14:46:41.375Z',
url: {href: 'https://api.fi.com/fdx/v4/accounts/12345'}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/fdx/notifications',
headers: {'content-type': 'application/json'},
body: {
sentOn: '2021-07-15T14:46:41.375Z',
url: {href: 'https://api.fi.com/fdx/v4/accounts/12345'}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/fdx/notifications');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
sentOn: '2021-07-15T14:46:41.375Z',
url: {
href: 'https://api.fi.com/fdx/v4/accounts/12345'
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/fdx/notifications',
headers: {'content-type': 'application/json'},
data: {
sentOn: '2021-07-15T14:46:41.375Z',
url: {href: 'https://api.fi.com/fdx/v4/accounts/12345'}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fdx/notifications';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"sentOn":"2021-07-15T14:46:41.375Z","url":{"href":"https://api.fi.com/fdx/v4/accounts/12345"}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"sentOn": @"2021-07-15T14:46:41.375Z",
@"url": @{ @"href": @"https://api.fi.com/fdx/v4/accounts/12345" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fdx/notifications"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fdx/notifications" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fdx/notifications",
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([
'sentOn' => '2021-07-15T14:46:41.375Z',
'url' => [
'href' => 'https://api.fi.com/fdx/v4/accounts/12345'
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/fdx/notifications', [
'body' => '{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/fdx/notifications');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'sentOn' => '2021-07-15T14:46:41.375Z',
'url' => [
'href' => 'https://api.fi.com/fdx/v4/accounts/12345'
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'sentOn' => '2021-07-15T14:46:41.375Z',
'url' => [
'href' => 'https://api.fi.com/fdx/v4/accounts/12345'
]
]));
$request->setRequestUrl('{{baseUrl}}/fdx/notifications');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fdx/notifications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fdx/notifications' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/fdx/notifications", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fdx/notifications"
payload = {
"sentOn": "2021-07-15T14:46:41.375Z",
"url": { "href": "https://api.fi.com/fdx/v4/accounts/12345" }
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fdx/notifications"
payload <- "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fdx/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/fdx/notifications') do |req|
req.body = "{\n \"sentOn\": \"2021-07-15T14:46:41.375Z\",\n \"url\": {\n \"href\": \"https://api.fi.com/fdx/v4/accounts/12345\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fdx/notifications";
let payload = json!({
"sentOn": "2021-07-15T14:46:41.375Z",
"url": json!({"href": "https://api.fi.com/fdx/v4/accounts/12345"})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/fdx/notifications \
--header 'content-type: application/json' \
--data '{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}'
echo '{
"sentOn": "2021-07-15T14:46:41.375Z",
"url": {
"href": "https://api.fi.com/fdx/v4/accounts/12345"
}
}' | \
http POST {{baseUrl}}/fdx/notifications \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "sentOn": "2021-07-15T14:46:41.375Z",\n "url": {\n "href": "https://api.fi.com/fdx/v4/accounts/12345"\n }\n}' \
--output-document \
- {{baseUrl}}/fdx/notifications
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"sentOn": "2021-07-15T14:46:41.375Z",
"url": ["href": "https://api.fi.com/fdx/v4/accounts/12345"]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fdx/notifications")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
enhance locally-held transaction data
{{baseUrl}}/beta/transactions/v1/enhance
BODY json
{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/beta/transactions/v1/enhance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/beta/transactions/v1/enhance" {:content-type :json
:form-params {:account_type ""
:client_id ""
:secret ""
:transactions [{:amount ""
:description ""
:id ""
:iso_currency_code ""}]}})
require "http/client"
url = "{{baseUrl}}/beta/transactions/v1/enhance"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/beta/transactions/v1/enhance"),
Content = new StringContent("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/beta/transactions/v1/enhance");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/beta/transactions/v1/enhance"
payload := strings.NewReader("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/beta/transactions/v1/enhance HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 187
{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/beta/transactions/v1/enhance")
.setHeader("content-type", "application/json")
.setBody("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/beta/transactions/v1/enhance"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/beta/transactions/v1/enhance")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/beta/transactions/v1/enhance")
.header("content-type", "application/json")
.body("{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
account_type: '',
client_id: '',
secret: '',
transactions: [
{
amount: '',
description: '',
id: '',
iso_currency_code: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/beta/transactions/v1/enhance');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/v1/enhance',
headers: {'content-type': 'application/json'},
data: {
account_type: '',
client_id: '',
secret: '',
transactions: [{amount: '', description: '', id: '', iso_currency_code: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/beta/transactions/v1/enhance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_type":"","client_id":"","secret":"","transactions":[{"amount":"","description":"","id":"","iso_currency_code":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/beta/transactions/v1/enhance',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "account_type": "",\n "client_id": "",\n "secret": "",\n "transactions": [\n {\n "amount": "",\n "description": "",\n "id": "",\n "iso_currency_code": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/beta/transactions/v1/enhance")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/beta/transactions/v1/enhance',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
account_type: '',
client_id: '',
secret: '',
transactions: [{amount: '', description: '', id: '', iso_currency_code: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/v1/enhance',
headers: {'content-type': 'application/json'},
body: {
account_type: '',
client_id: '',
secret: '',
transactions: [{amount: '', description: '', id: '', iso_currency_code: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/beta/transactions/v1/enhance');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
account_type: '',
client_id: '',
secret: '',
transactions: [
{
amount: '',
description: '',
id: '',
iso_currency_code: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/beta/transactions/v1/enhance',
headers: {'content-type': 'application/json'},
data: {
account_type: '',
client_id: '',
secret: '',
transactions: [{amount: '', description: '', id: '', iso_currency_code: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/beta/transactions/v1/enhance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"account_type":"","client_id":"","secret":"","transactions":[{"amount":"","description":"","id":"","iso_currency_code":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_type": @"",
@"client_id": @"",
@"secret": @"",
@"transactions": @[ @{ @"amount": @"", @"description": @"", @"id": @"", @"iso_currency_code": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/beta/transactions/v1/enhance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/beta/transactions/v1/enhance" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/beta/transactions/v1/enhance",
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([
'account_type' => '',
'client_id' => '',
'secret' => '',
'transactions' => [
[
'amount' => '',
'description' => '',
'id' => '',
'iso_currency_code' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/beta/transactions/v1/enhance', [
'body' => '{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/beta/transactions/v1/enhance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'account_type' => '',
'client_id' => '',
'secret' => '',
'transactions' => [
[
'amount' => '',
'description' => '',
'id' => '',
'iso_currency_code' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'account_type' => '',
'client_id' => '',
'secret' => '',
'transactions' => [
[
'amount' => '',
'description' => '',
'id' => '',
'iso_currency_code' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/beta/transactions/v1/enhance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/beta/transactions/v1/enhance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/beta/transactions/v1/enhance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/beta/transactions/v1/enhance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/beta/transactions/v1/enhance"
payload = {
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/beta/transactions/v1/enhance"
payload <- "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/beta/transactions/v1/enhance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/beta/transactions/v1/enhance') do |req|
req.body = "{\n \"account_type\": \"\",\n \"client_id\": \"\",\n \"secret\": \"\",\n \"transactions\": [\n {\n \"amount\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"iso_currency_code\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/beta/transactions/v1/enhance";
let payload = json!({
"account_type": "",
"client_id": "",
"secret": "",
"transactions": (
json!({
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/beta/transactions/v1/enhance \
--header 'content-type: application/json' \
--data '{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}'
echo '{
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
{
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
}
]
}' | \
http POST {{baseUrl}}/beta/transactions/v1/enhance \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "account_type": "",\n "client_id": "",\n "secret": "",\n "transactions": [\n {\n "amount": "",\n "description": "",\n "id": "",\n "iso_currency_code": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/beta/transactions/v1/enhance
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"account_type": "",
"client_id": "",
"secret": "",
"transactions": [
[
"amount": "",
"description": "",
"id": "",
"iso_currency_code": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/beta/transactions/v1/enhance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"enhanced_transactions": [
{
"amount": 2307.21,
"description": "Debit purchase Apple 1235",
"enhancements": {
"category": [
"Shops",
"Computers and Electronics"
],
"category_id": "19013000",
"check_number": null,
"counterparties": [
{
"logo_url": "https://plaid-merchant-logos.plaid.com/apple_63.png",
"name": "Apple",
"type": "merchant",
"website": "apple.com"
}
],
"location": {
"address": "300 Post St",
"city": "San Francisco",
"country": "US",
"lat": 40.740352,
"lon": -74.001761,
"postal_code": "94108",
"region": "CA",
"store_number": "1235"
},
"logo_url": "https://plaid-merchant-logos.plaid.com/apple_63.png",
"merchant_name": "Apple",
"payment_channel": "in store",
"personal_finance_category": {
"detailed": "ELECTRONICS",
"primary": "GENERAL_MERCHANDISE"
},
"personal_finance_category_icon_url": "https://plaid-category-icons.plaid.com/PFC_GENERAL_MERCHANDISE.png",
"website": "apple.com"
},
"id": "6135818adda16500147e7c1d",
"iso_currency_code": "USD"
}
]
}