Configuration API
Configuration APIv2
The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. Authentication Your Adyen contact will provide your API credential and an API key. To connect to the API, add an X-API-Key header with the API key as the value, for example: curl -H "Content-Type: application/json" \ -H "X-API-Key: YOURAPIKEY" \ ... Alternatively, you can use the username and password to connect to the API using basic authentication. For example: curl -H "Content-Type: application/json" \ -U…
- Endpoints
- 31 (17 GET, 7 POST, 5 PATCH, 2 DELETE)
- Base URL
https://balanceplatform-api-test.adyen.com/bcl/v2- Authentication
- API key, Basic auth
- Spec format
- OpenAPI 3.1.0
- API version
- 2
- Provider
- adyen.com
- Categories
- Payments
- Last updated
Use this API in Bruno:
- Download the Bruno collection above and unzip it.
- In Bruno, choose Open Collection and select the unzipped folder.
- Set the
baseUrlvariable (for examplehttps://balanceplatform-api-test.adyen.com/bcl/v2) and your API key credentials, then send requests.
POST
Create an account holder
{{baseUrl}}/accountHolders
BODY json
{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accountHolders");
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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/accountHolders" {:content-type :json
:form-params {:balancePlatform ""
:capabilities {}
:contactDetails {:address {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:email ""
:phone {:number ""
:type ""}
:webAddress ""}
:description ""
:legalEntityId ""
:reference ""
:timeZone ""}})
require "http/client"
url = "{{baseUrl}}/accountHolders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/accountHolders"),
Content = new StringContent("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/accountHolders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accountHolders"
payload := strings.NewReader("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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/accountHolders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 420
{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/accountHolders")
.setHeader("content-type", "application/json")
.setBody("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accountHolders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accountHolders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/accountHolders")
.header("content-type", "application/json")
.body("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
.asString();
const data = JSON.stringify({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {
number: '',
type: ''
},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/accountHolders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/accountHolders',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accountHolders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","capabilities":{},"contactDetails":{"address":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"email":"","phone":{"number":"","type":""},"webAddress":""},"description":"","legalEntityId":"","reference":"","timeZone":""}'
};
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}}/accountHolders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "balancePlatform": "",\n "capabilities": {},\n "contactDetails": {\n "address": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "email": "",\n "phone": {\n "number": "",\n "type": ""\n },\n "webAddress": ""\n },\n "description": "",\n "legalEntityId": "",\n "reference": "",\n "timeZone": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accountHolders")
.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/accountHolders',
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({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/accountHolders',
headers: {'content-type': 'application/json'},
body: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
},
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}}/accountHolders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {
number: '',
type: ''
},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
});
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}}/accountHolders',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
legalEntityId: '',
reference: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accountHolders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","capabilities":{},"contactDetails":{"address":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"email":"","phone":{"number":"","type":""},"webAddress":""},"description":"","legalEntityId":"","reference":"","timeZone":""}'
};
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 = @{ @"balancePlatform": @"",
@"capabilities": @{ },
@"contactDetails": @{ @"address": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" }, @"email": @"", @"phone": @{ @"number": @"", @"type": @"" }, @"webAddress": @"" },
@"description": @"",
@"legalEntityId": @"",
@"reference": @"",
@"timeZone": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accountHolders"]
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}}/accountHolders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accountHolders",
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([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'legalEntityId' => '',
'reference' => '',
'timeZone' => ''
]),
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}}/accountHolders', [
'body' => '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accountHolders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'legalEntityId' => '',
'reference' => '',
'timeZone' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'legalEntityId' => '',
'reference' => '',
'timeZone' => ''
]));
$request->setRequestUrl('{{baseUrl}}/accountHolders');
$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}}/accountHolders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accountHolders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/accountHolders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accountHolders"
payload = {
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accountHolders"
payload <- "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/accountHolders")
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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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/accountHolders') do |req|
req.body = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accountHolders";
let payload = json!({
"balancePlatform": "",
"capabilities": json!({}),
"contactDetails": json!({
"address": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"email": "",
"phone": json!({
"number": "",
"type": ""
}),
"webAddress": ""
}),
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
});
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}}/accountHolders \
--header 'content-type: application/json' \
--data '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}'
echo '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
}' | \
http POST {{baseUrl}}/accountHolders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "balancePlatform": "",\n "capabilities": {},\n "contactDetails": {\n "address": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "email": "",\n "phone": {\n "number": "",\n "type": ""\n },\n "webAddress": ""\n },\n "description": "",\n "legalEntityId": "",\n "reference": "",\n "timeZone": ""\n}' \
--output-document \
- {{baseUrl}}/accountHolders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"balancePlatform": "",
"capabilities": [],
"contactDetails": [
"address": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"email": "",
"phone": [
"number": "",
"type": ""
],
"webAddress": ""
],
"description": "",
"legalEntityId": "",
"reference": "",
"timeZone": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accountHolders")! 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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all balance accounts of an account holder
{{baseUrl}}/accountHolders/:id/balanceAccounts
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accountHolders/:id/balanceAccounts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accountHolders/:id/balanceAccounts")
require "http/client"
url = "{{baseUrl}}/accountHolders/:id/balanceAccounts"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accountHolders/:id/balanceAccounts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accountHolders/:id/balanceAccounts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accountHolders/:id/balanceAccounts"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accountHolders/:id/balanceAccounts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accountHolders/:id/balanceAccounts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accountHolders/:id/balanceAccounts"))
.method("GET", 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}}/accountHolders/:id/balanceAccounts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accountHolders/:id/balanceAccounts")
.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('GET', '{{baseUrl}}/accountHolders/:id/balanceAccounts');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/accountHolders/:id/balanceAccounts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accountHolders/:id/balanceAccounts';
const options = {method: 'GET'};
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}}/accountHolders/:id/balanceAccounts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accountHolders/:id/balanceAccounts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accountHolders/:id/balanceAccounts',
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: 'GET',
url: '{{baseUrl}}/accountHolders/:id/balanceAccounts'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accountHolders/:id/balanceAccounts');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/accountHolders/:id/balanceAccounts'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accountHolders/:id/balanceAccounts';
const options = {method: 'GET'};
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}}/accountHolders/:id/balanceAccounts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/accountHolders/:id/balanceAccounts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accountHolders/:id/balanceAccounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accountHolders/:id/balanceAccounts');
echo $response->getBody();
setUrl('{{baseUrl}}/accountHolders/:id/balanceAccounts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accountHolders/:id/balanceAccounts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accountHolders/:id/balanceAccounts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accountHolders/:id/balanceAccounts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accountHolders/:id/balanceAccounts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accountHolders/:id/balanceAccounts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accountHolders/:id/balanceAccounts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accountHolders/:id/balanceAccounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accountHolders/:id/balanceAccounts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accountHolders/:id/balanceAccounts";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accountHolders/:id/balanceAccounts
http GET {{baseUrl}}/accountHolders/:id/balanceAccounts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accountHolders/:id/balanceAccounts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accountHolders/:id/balanceAccounts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"balanceAccounts": [
{
"accountHolderId": "AH32272223222B5CTBMZT6W2V",
"defaultCurrencyCode": "EUR",
"description": "S. Hopper - Main Account",
"id": "BA32272223222B5CTDNB66W2Z",
"reference": "YOUR_REFERENCE-X173L",
"status": "active",
"timeZone": "Europe/Amsterdam"
},
{
"accountHolderId": "AH32272223222B5CTBMZT6W2V",
"defaultCurrencyCode": "EUR",
"description": "S. Hopper - Main Account",
"id": "BA32272223222B5CTDQPM6W2H",
"reference": "YOUR_REFERENCE-X173L",
"status": "active",
"timeZone": "Europe/Amsterdam"
},
{
"accountHolderId": "AH32272223222B5CTBMZT6W2V",
"defaultCurrencyCode": "EUR",
"description": "S. Hopper - Main Account",
"id": "BA32272223222B5CVF5J63LMW",
"reference": "YOUR_REFERENCE-X173L",
"status": "active",
"timeZone": "Europe/Amsterdam"
}
],
"hasNext": true,
"hasPrevious": false
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get an account holder
{{baseUrl}}/accountHolders/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accountHolders/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/accountHolders/:id")
require "http/client"
url = "{{baseUrl}}/accountHolders/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/accountHolders/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/accountHolders/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accountHolders/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/accountHolders/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/accountHolders/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accountHolders/:id"))
.method("GET", 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}}/accountHolders/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/accountHolders/:id")
.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('GET', '{{baseUrl}}/accountHolders/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/accountHolders/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accountHolders/:id';
const options = {method: 'GET'};
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}}/accountHolders/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/accountHolders/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/accountHolders/:id',
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: 'GET', url: '{{baseUrl}}/accountHolders/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/accountHolders/: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: 'GET', url: '{{baseUrl}}/accountHolders/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accountHolders/:id';
const options = {method: 'GET'};
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}}/accountHolders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/accountHolders/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accountHolders/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/accountHolders/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/accountHolders/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/accountHolders/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/accountHolders/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accountHolders/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/accountHolders/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accountHolders/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accountHolders/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accountHolders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/accountHolders/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accountHolders/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/accountHolders/:id
http GET {{baseUrl}}/accountHolders/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/accountHolders/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accountHolders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"balancePlatform": "YOUR_BALANCE_PLATFORM",
"capabilities": {
"receiveFromBalanceAccount": {
"allowed": false,
"enabled": true,
"requested": true,
"verificationStatus": "pending"
},
"receiveFromPlatformPayments": {
"allowed": false,
"enabled": true,
"requested": true,
"verificationStatus": "pending"
},
"sendToBalanceAccount": {
"allowed": false,
"enabled": true,
"requested": true,
"verificationStatus": "pending"
},
"sendToTransferInstrument": {
"allowed": false,
"enabled": true,
"requested": true,
"verificationStatus": "pending"
}
},
"description": "Liable account holder used for international payments and payouts",
"id": "AH3227C223222C5GXQXF658WB",
"legalEntityId": "LE322JV223222D5GG42KN6869",
"reference": "S.Eller-001",
"status": "active"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
PATCH
Update an account holder
{{baseUrl}}/accountHolders/:id
QUERY PARAMS
id
BODY json
{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/accountHolders/: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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/accountHolders/:id" {:content-type :json
:form-params {:balancePlatform ""
:capabilities {}
:contactDetails {:address {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:email ""
:phone {:number ""
:type ""}
:webAddress ""}
:description ""
:id ""
:legalEntityId ""
:primaryBalanceAccount ""
:reference ""
:status ""
:timeZone ""
:verificationDeadlines [{:capabilities []
:expiresAt ""}]}})
require "http/client"
url = "{{baseUrl}}/accountHolders/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/accountHolders/:id"),
Content = new StringContent("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\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}}/accountHolders/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/accountHolders/:id"
payload := strings.NewReader("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/accountHolders/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 573
{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/accountHolders/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/accountHolders/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/accountHolders/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/accountHolders/:id")
.header("content-type", "application/json")
.body("{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {
number: '',
type: ''
},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [
{
capabilities: [],
expiresAt: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/accountHolders/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accountHolders/:id',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [{capabilities: [], expiresAt: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/accountHolders/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","capabilities":{},"contactDetails":{"address":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"email":"","phone":{"number":"","type":""},"webAddress":""},"description":"","id":"","legalEntityId":"","primaryBalanceAccount":"","reference":"","status":"","timeZone":"","verificationDeadlines":[{"capabilities":[],"expiresAt":""}]}'
};
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}}/accountHolders/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "balancePlatform": "",\n "capabilities": {},\n "contactDetails": {\n "address": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "email": "",\n "phone": {\n "number": "",\n "type": ""\n },\n "webAddress": ""\n },\n "description": "",\n "id": "",\n "legalEntityId": "",\n "primaryBalanceAccount": "",\n "reference": "",\n "status": "",\n "timeZone": "",\n "verificationDeadlines": [\n {\n "capabilities": [],\n "expiresAt": ""\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 \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/accountHolders/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/accountHolders/: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({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [{capabilities: [], expiresAt: ''}]
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accountHolders/:id',
headers: {'content-type': 'application/json'},
body: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [{capabilities: [], expiresAt: ''}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/accountHolders/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {
number: '',
type: ''
},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [
{
capabilities: [],
expiresAt: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/accountHolders/:id',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
capabilities: {},
contactDetails: {
address: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
email: '',
phone: {number: '', type: ''},
webAddress: ''
},
description: '',
id: '',
legalEntityId: '',
primaryBalanceAccount: '',
reference: '',
status: '',
timeZone: '',
verificationDeadlines: [{capabilities: [], expiresAt: ''}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/accountHolders/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","capabilities":{},"contactDetails":{"address":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"email":"","phone":{"number":"","type":""},"webAddress":""},"description":"","id":"","legalEntityId":"","primaryBalanceAccount":"","reference":"","status":"","timeZone":"","verificationDeadlines":[{"capabilities":[],"expiresAt":""}]}'
};
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 = @{ @"balancePlatform": @"",
@"capabilities": @{ },
@"contactDetails": @{ @"address": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" }, @"email": @"", @"phone": @{ @"number": @"", @"type": @"" }, @"webAddress": @"" },
@"description": @"",
@"id": @"",
@"legalEntityId": @"",
@"primaryBalanceAccount": @"",
@"reference": @"",
@"status": @"",
@"timeZone": @"",
@"verificationDeadlines": @[ @{ @"capabilities": @[ ], @"expiresAt": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/accountHolders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/accountHolders/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/accountHolders/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'id' => '',
'legalEntityId' => '',
'primaryBalanceAccount' => '',
'reference' => '',
'status' => '',
'timeZone' => '',
'verificationDeadlines' => [
[
'capabilities' => [
],
'expiresAt' => ''
]
]
]),
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('PATCH', '{{baseUrl}}/accountHolders/:id', [
'body' => '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/accountHolders/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'id' => '',
'legalEntityId' => '',
'primaryBalanceAccount' => '',
'reference' => '',
'status' => '',
'timeZone' => '',
'verificationDeadlines' => [
[
'capabilities' => [
],
'expiresAt' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'balancePlatform' => '',
'capabilities' => [
],
'contactDetails' => [
'address' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'email' => '',
'phone' => [
'number' => '',
'type' => ''
],
'webAddress' => ''
],
'description' => '',
'id' => '',
'legalEntityId' => '',
'primaryBalanceAccount' => '',
'reference' => '',
'status' => '',
'timeZone' => '',
'verificationDeadlines' => [
[
'capabilities' => [
],
'expiresAt' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/accountHolders/:id');
$request->setRequestMethod('PATCH');
$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}}/accountHolders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/accountHolders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/accountHolders/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/accountHolders/:id"
payload = {
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/accountHolders/:id"
payload <- "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/accountHolders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\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.patch('/baseUrl/accountHolders/:id') do |req|
req.body = "{\n \"balancePlatform\": \"\",\n \"capabilities\": {},\n \"contactDetails\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"email\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"description\": \"\",\n \"id\": \"\",\n \"legalEntityId\": \"\",\n \"primaryBalanceAccount\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\",\n \"verificationDeadlines\": [\n {\n \"capabilities\": [],\n \"expiresAt\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/accountHolders/:id";
let payload = json!({
"balancePlatform": "",
"capabilities": json!({}),
"contactDetails": json!({
"address": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"email": "",
"phone": json!({
"number": "",
"type": ""
}),
"webAddress": ""
}),
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": (
json!({
"capabilities": (),
"expiresAt": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/accountHolders/:id \
--header 'content-type: application/json' \
--data '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}'
echo '{
"balancePlatform": "",
"capabilities": {},
"contactDetails": {
"address": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"email": "",
"phone": {
"number": "",
"type": ""
},
"webAddress": ""
},
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
{
"capabilities": [],
"expiresAt": ""
}
]
}' | \
http PATCH {{baseUrl}}/accountHolders/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "balancePlatform": "",\n "capabilities": {},\n "contactDetails": {\n "address": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "email": "",\n "phone": {\n "number": "",\n "type": ""\n },\n "webAddress": ""\n },\n "description": "",\n "id": "",\n "legalEntityId": "",\n "primaryBalanceAccount": "",\n "reference": "",\n "status": "",\n "timeZone": "",\n "verificationDeadlines": [\n {\n "capabilities": [],\n "expiresAt": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/accountHolders/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"balancePlatform": "",
"capabilities": [],
"contactDetails": [
"address": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"email": "",
"phone": [
"number": "",
"type": ""
],
"webAddress": ""
],
"description": "",
"id": "",
"legalEntityId": "",
"primaryBalanceAccount": "",
"reference": "",
"status": "",
"timeZone": "",
"verificationDeadlines": [
[
"capabilities": [],
"expiresAt": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/accountHolders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
{
"balancePlatform": "YOUR_BALANCE_PLATFORM",
"capabilities": {
"receivePayments": {
"allowed": false,
"enabled": false,
"requested": true,
"verificationStatus": "pending"
}
},
"description": "Liable account holder used for international payments and payouts",
"id": "AH3227C223222C5GKR23686TF",
"legalEntityId": "LE322JV223222F5GKQZZ9DS99",
"reference": "S.Eller-001",
"status": "active"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balancePlatform": "YOUR_BALANCE_PLATFORM",
"description": "Liable account holder used for international payments and payouts",
"id": "AH3227C223222C5GKR23686TF",
"legalEntityId": "LE322JV223222F5GKQZZ9DS99",
"reference": "S.Eller-001",
"status": "closed"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Create a balance account
{{baseUrl}}/balanceAccounts
BODY json
{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts");
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 \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/balanceAccounts" {:content-type :json
:form-params {:accountHolderId ""
:defaultCurrencyCode ""
:description ""
:reference ""
:timeZone ""}})
require "http/client"
url = "{{baseUrl}}/balanceAccounts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/balanceAccounts"),
Content = new StringContent("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/balanceAccounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts"
payload := strings.NewReader("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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/balanceAccounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 114
{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/balanceAccounts")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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 \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/balanceAccounts")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/balanceAccounts")
.header("content-type", "application/json")
.body("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/balanceAccounts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/balanceAccounts',
headers: {'content-type': 'application/json'},
data: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountHolderId":"","defaultCurrencyCode":"","description":"","reference":"","timeZone":""}'
};
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}}/balanceAccounts',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountHolderId": "",\n "defaultCurrencyCode": "",\n "description": "",\n "reference": "",\n "timeZone": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts")
.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/balanceAccounts',
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({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/balanceAccounts',
headers: {'content-type': 'application/json'},
body: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
},
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}}/balanceAccounts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
});
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}}/balanceAccounts',
headers: {'content-type': 'application/json'},
data: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountHolderId":"","defaultCurrencyCode":"","description":"","reference":"","timeZone":""}'
};
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 = @{ @"accountHolderId": @"",
@"defaultCurrencyCode": @"",
@"description": @"",
@"reference": @"",
@"timeZone": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/balanceAccounts"]
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}}/balanceAccounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts",
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([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'timeZone' => ''
]),
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}}/balanceAccounts', [
'body' => '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'timeZone' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'timeZone' => ''
]));
$request->setRequestUrl('{{baseUrl}}/balanceAccounts');
$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}}/balanceAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/balanceAccounts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts"
payload = {
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts"
payload <- "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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}}/balanceAccounts")
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 \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\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/balanceAccounts') do |req|
req.body = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"timeZone\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts";
let payload = json!({
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
});
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}}/balanceAccounts \
--header 'content-type: application/json' \
--data '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}'
echo '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
}' | \
http POST {{baseUrl}}/balanceAccounts \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountHolderId": "",\n "defaultCurrencyCode": "",\n "description": "",\n "reference": "",\n "timeZone": ""\n}' \
--output-document \
- {{baseUrl}}/balanceAccounts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"timeZone": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts")! 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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Create a sweep
{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
QUERY PARAMS
balanceAccountId
BODY json
{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps");
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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps" {:content-type :json
:form-params {:category ""
:counterparty {:balanceAccountId ""
:merchantAccount ""
:transferInstrumentId ""}
:currency ""
:description ""
:id ""
:priorities []
:reason ""
:schedule ""
:status ""
:sweepAmount {:currency ""
:value 0}
:targetAmount {}
:triggerAmount {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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}}/balanceAccounts/:balanceAccountId/sweeps"),
Content = new StringContent("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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}}/balanceAccounts/:balanceAccountId/sweeps");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
payload := strings.NewReader("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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/balanceAccounts/:balanceAccountId/sweeps HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 370
{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.setHeader("content-type", "application/json")
.setBody("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.header("content-type", "application/json")
.body("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
category: '',
counterparty: {
balanceAccountId: '',
merchantAccount: '',
transferInstrumentId: ''
},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {
currency: '',
value: 0
},
targetAmount: {},
triggerAmount: {},
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}}/balanceAccounts/:balanceAccountId/sweeps');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps',
headers: {'content-type': 'application/json'},
data: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","counterparty":{"balanceAccountId":"","merchantAccount":"","transferInstrumentId":""},"currency":"","description":"","id":"","priorities":[],"reason":"","schedule":"","status":"","sweepAmount":{"currency":"","value":0},"targetAmount":{},"triggerAmount":{},"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}}/balanceAccounts/:balanceAccountId/sweeps',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "category": "",\n "counterparty": {\n "balanceAccountId": "",\n "merchantAccount": "",\n "transferInstrumentId": ""\n },\n "currency": "",\n "description": "",\n "id": "",\n "priorities": [],\n "reason": "",\n "schedule": "",\n "status": "",\n "sweepAmount": {\n "currency": "",\n "value": 0\n },\n "targetAmount": {},\n "triggerAmount": {},\n "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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.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/balanceAccounts/:balanceAccountId/sweeps',
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({
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps',
headers: {'content-type': 'application/json'},
body: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
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}}/balanceAccounts/:balanceAccountId/sweeps');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
category: '',
counterparty: {
balanceAccountId: '',
merchantAccount: '',
transferInstrumentId: ''
},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {
currency: '',
value: 0
},
targetAmount: {},
triggerAmount: {},
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}}/balanceAccounts/:balanceAccountId/sweeps',
headers: {'content-type': 'application/json'},
data: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"category":"","counterparty":{"balanceAccountId":"","merchantAccount":"","transferInstrumentId":""},"currency":"","description":"","id":"","priorities":[],"reason":"","schedule":"","status":"","sweepAmount":{"currency":"","value":0},"targetAmount":{},"triggerAmount":{},"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 = @{ @"category": @"",
@"counterparty": @{ @"balanceAccountId": @"", @"merchantAccount": @"", @"transferInstrumentId": @"" },
@"currency": @"",
@"description": @"",
@"id": @"",
@"priorities": @[ ],
@"reason": @"",
@"schedule": @"",
@"status": @"",
@"sweepAmount": @{ @"currency": @"", @"value": @0 },
@"targetAmount": @{ },
@"triggerAmount": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"]
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}}/balanceAccounts/:balanceAccountId/sweeps" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps",
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([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'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}}/balanceAccounts/:balanceAccountId/sweeps', [
'body' => '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
$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}}/balanceAccounts/:balanceAccountId/sweeps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/balanceAccounts/:balanceAccountId/sweeps", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
payload = {
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
payload <- "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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}}/balanceAccounts/:balanceAccountId/sweeps")
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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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/balanceAccounts/:balanceAccountId/sweeps') do |req|
req.body = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps";
let payload = json!({
"category": "",
"counterparty": json!({
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
}),
"currency": "",
"description": "",
"id": "",
"priorities": (),
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": json!({
"currency": "",
"value": 0
}),
"targetAmount": json!({}),
"triggerAmount": json!({}),
"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}}/balanceAccounts/:balanceAccountId/sweeps \
--header 'content-type: application/json' \
--data '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
echo '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}' | \
http POST {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "category": "",\n "counterparty": {\n "balanceAccountId": "",\n "merchantAccount": "",\n "transferInstrumentId": ""\n },\n "currency": "",\n "description": "",\n "id": "",\n "priorities": [],\n "reason": "",\n "schedule": "",\n "status": "",\n "sweepAmount": {\n "currency": "",\n "value": 0\n },\n "targetAmount": {},\n "triggerAmount": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"category": "",
"counterparty": [
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
],
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": [
"currency": "",
"value": 0
],
"targetAmount": [],
"triggerAmount": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")! 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
{
"counterparty": {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN5",
"schedule": {
"type": "balance"
},
"status": "active",
"triggerAmount": {
"currency": "EUR",
"value": 50000
},
"type": "pull"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"counterparty": {
"balanceAccountId": "BA32278887611B5FTD2KR6TJD"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN5",
"schedule": {
"type": "weekly"
},
"status": "active",
"triggerAmount": {
"currency": "EUR",
"value": 50000
},
"type": "push"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"category": "bank",
"counterparty": {
"transferInstrumentId": "SE322JV223222J5HGLCGF2WDV"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN9",
"priorities": [
"fast",
"instant"
],
"schedule": {
"type": "weekly"
},
"status": "active",
"triggerAmount": {
"currency": "EUR",
"value": 50000
},
"type": "push"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
DELETE
Delete a sweep
{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
QUERY PARAMS
balanceAccountId
sweepId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"))
.method("DELETE", 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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.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('DELETE', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {method: 'DELETE'};
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
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: 'DELETE',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {method: 'DELETE'};
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
http DELETE {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a balance account
{{baseUrl}}/balanceAccounts/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balanceAccounts/:id")
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balanceAccounts/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balanceAccounts/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balanceAccounts/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:id"))
.method("GET", 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}}/balanceAccounts/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balanceAccounts/:id")
.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('GET', '{{baseUrl}}/balanceAccounts/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/balanceAccounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:id';
const options = {method: 'GET'};
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}}/balanceAccounts/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:id',
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: 'GET', url: '{{baseUrl}}/balanceAccounts/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balanceAccounts/: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: 'GET', url: '{{baseUrl}}/balanceAccounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:id';
const options = {method: 'GET'};
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}}/balanceAccounts/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balanceAccounts/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balanceAccounts/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balanceAccounts/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balanceAccounts/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balanceAccounts/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balanceAccounts/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balanceAccounts/:id
http GET {{baseUrl}}/balanceAccounts/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balanceAccounts/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"accountHolderId": "AH32272223222B59K6RTQBFNZ",
"balances": [
{
"available": 0,
"balance": 0,
"currency": "EUR",
"reserved": 0
}
],
"defaultCurrencyCode": "EUR",
"id": "BA3227C223222B5BLP6JQC3FD",
"status": "active",
"timeZone": "Europe/Amsterdam"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a sweep
{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
QUERY PARAMS
balanceAccountId
sweepId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"))
.method("GET", 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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.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('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {method: 'GET'};
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
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: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {method: 'GET'};
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
http GET {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"counterparty": {
"balanceAccountId": "BA32272223222B5FTD2KR6TJD"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN5",
"schedule": {
"type": "daily"
},
"status": "active",
"targetAmount": {
"currency": "EUR",
"value": 0
},
"triggerAmount": {
"currency": "EUR",
"value": 0
},
"type": "push"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all payment instruments for a balance account
{{baseUrl}}/balanceAccounts/:id/paymentInstruments
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:id/paymentInstruments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balanceAccounts/:id/paymentInstruments")
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:id/paymentInstruments"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:id/paymentInstruments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balanceAccounts/:id/paymentInstruments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:id/paymentInstruments"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balanceAccounts/:id/paymentInstruments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balanceAccounts/:id/paymentInstruments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:id/paymentInstruments"))
.method("GET", 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}}/balanceAccounts/:id/paymentInstruments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balanceAccounts/:id/paymentInstruments")
.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('GET', '{{baseUrl}}/balanceAccounts/:id/paymentInstruments');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:id/paymentInstruments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:id/paymentInstruments';
const options = {method: 'GET'};
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}}/balanceAccounts/:id/paymentInstruments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:id/paymentInstruments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:id/paymentInstruments',
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: 'GET',
url: '{{baseUrl}}/balanceAccounts/:id/paymentInstruments'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balanceAccounts/:id/paymentInstruments');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:id/paymentInstruments'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:id/paymentInstruments';
const options = {method: 'GET'};
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}}/balanceAccounts/:id/paymentInstruments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balanceAccounts/:id/paymentInstruments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:id/paymentInstruments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balanceAccounts/:id/paymentInstruments');
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:id/paymentInstruments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balanceAccounts/:id/paymentInstruments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balanceAccounts/:id/paymentInstruments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:id/paymentInstruments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balanceAccounts/:id/paymentInstruments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:id/paymentInstruments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:id/paymentInstruments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:id/paymentInstruments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balanceAccounts/:id/paymentInstruments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:id/paymentInstruments";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balanceAccounts/:id/paymentInstruments
http GET {{baseUrl}}/balanceAccounts/:id/paymentInstruments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balanceAccounts/:id/paymentInstruments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:id/paymentInstruments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"hasNext": true,
"hasPrevious": false,
"paymentInstruments": [
{
"balanceAccountId": "BA32272223222B59CZ3T52DKZ",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mc",
"cardholderName": "name",
"expiration": {
"month": "12",
"year": "2022"
},
"formFactor": "virtual",
"lastFour": "2357",
"number": "************2357"
},
"id": "PI32272223222B59M5TM658DT",
"issuingCountryCode": "GB",
"status": "active",
"type": "card"
},
{
"balanceAccountId": "BA32272223222B59CZ3T52DKZ",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mc",
"cardholderName": "name",
"expiration": {
"month": "01",
"year": "2023"
},
"formFactor": "virtual",
"lastFour": "8331",
"number": "************8331"
},
"id": "PI32272223222B59PXDGQDLSF",
"issuingCountryCode": "GB",
"status": "active",
"type": "card"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all sweeps for a balance account
{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
QUERY PARAMS
balanceAccountId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balanceAccounts/:balanceAccountId/sweeps HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"))
.method("GET", 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}}/balanceAccounts/:balanceAccountId/sweeps")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.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('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps';
const options = {method: 'GET'};
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}}/balanceAccounts/:balanceAccountId/sweeps',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:balanceAccountId/sweeps',
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: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps';
const options = {method: 'GET'};
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}}/balanceAccounts/:balanceAccountId/sweeps"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balanceAccounts/:balanceAccountId/sweeps" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balanceAccounts/:balanceAccountId/sweeps")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balanceAccounts/:balanceAccountId/sweeps') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
http GET {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"hasNext": false,
"hasPrevious": false,
"sweeps": [
{
"counterparty": {
"balanceAccountId": "BA32272223222B5FTD2KR6TJD"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN5",
"schedule": {
"type": "daily"
},
"status": "active",
"targetAmount": {
"currency": "EUR",
"value": 0
},
"triggerAmount": {
"currency": "EUR",
"value": 0
},
"type": "push"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
PATCH
Update a balance account
{{baseUrl}}/balanceAccounts/:id
QUERY PARAMS
id
BODY json
{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/: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 \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/balanceAccounts/:id" {:content-type :json
:form-params {:accountHolderId ""
:defaultCurrencyCode ""
:description ""
:reference ""
:status ""
:timeZone ""}})
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:id"),
Content = new StringContent("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\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}}/balanceAccounts/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:id"
payload := strings.NewReader("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/balanceAccounts/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 130
{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/balanceAccounts/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\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 \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/balanceAccounts/:id")
.header("content-type", "application/json")
.body("{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/balanceAccounts/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:id',
headers: {'content-type': 'application/json'},
data: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountHolderId":"","defaultCurrencyCode":"","description":"","reference":"","status":"","timeZone":""}'
};
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}}/balanceAccounts/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountHolderId": "",\n "defaultCurrencyCode": "",\n "description": "",\n "reference": "",\n "status": "",\n "timeZone": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/: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({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:id',
headers: {'content-type': 'application/json'},
body: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/balanceAccounts/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:id',
headers: {'content-type': 'application/json'},
data: {
accountHolderId: '',
defaultCurrencyCode: '',
description: '',
reference: '',
status: '',
timeZone: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountHolderId":"","defaultCurrencyCode":"","description":"","reference":"","status":"","timeZone":""}'
};
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 = @{ @"accountHolderId": @"",
@"defaultCurrencyCode": @"",
@"description": @"",
@"reference": @"",
@"status": @"",
@"timeZone": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/balanceAccounts/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/balanceAccounts/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'status' => '',
'timeZone' => ''
]),
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('PATCH', '{{baseUrl}}/balanceAccounts/:id', [
'body' => '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'status' => '',
'timeZone' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountHolderId' => '',
'defaultCurrencyCode' => '',
'description' => '',
'reference' => '',
'status' => '',
'timeZone' => ''
]));
$request->setRequestUrl('{{baseUrl}}/balanceAccounts/:id');
$request->setRequestMethod('PATCH');
$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}}/balanceAccounts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/balanceAccounts/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:id"
payload = {
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:id"
payload <- "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\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.patch('/baseUrl/balanceAccounts/:id') do |req|
req.body = "{\n \"accountHolderId\": \"\",\n \"defaultCurrencyCode\": \"\",\n \"description\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"timeZone\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:id";
let payload = json!({
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/balanceAccounts/:id \
--header 'content-type: application/json' \
--data '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}'
echo '{
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
}' | \
http PATCH {{baseUrl}}/balanceAccounts/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountHolderId": "",\n "defaultCurrencyCode": "",\n "description": "",\n "reference": "",\n "status": "",\n "timeZone": ""\n}' \
--output-document \
- {{baseUrl}}/balanceAccounts/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountHolderId": "",
"defaultCurrencyCode": "",
"description": "",
"reference": "",
"status": "",
"timeZone": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
PATCH
Update a sweep
{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
QUERY PARAMS
balanceAccountId
sweepId
BODY json
{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId" {:content-type :json
:form-params {:category ""
:counterparty {:balanceAccountId ""
:merchantAccount ""
:transferInstrumentId ""}
:currency ""
:description ""
:id ""
:priorities []
:reason ""
:schedule ""
:status ""
:sweepAmount {:currency ""
:value 0}
:targetAmount {}
:triggerAmount {}
:type ""}})
require "http/client"
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"),
Content = new StringContent("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
payload := strings.NewReader("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 370
{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.setHeader("content-type", "application/json")
.setBody("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.header("content-type", "application/json")
.body("{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
category: '',
counterparty: {
balanceAccountId: '',
merchantAccount: '',
transferInstrumentId: ''
},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {
currency: '',
value: 0
},
targetAmount: {},
triggerAmount: {},
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
headers: {'content-type': 'application/json'},
data: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"category":"","counterparty":{"balanceAccountId":"","merchantAccount":"","transferInstrumentId":""},"currency":"","description":"","id":"","priorities":[],"reason":"","schedule":"","status":"","sweepAmount":{"currency":"","value":0},"targetAmount":{},"triggerAmount":{},"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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "category": "",\n "counterparty": {\n "balanceAccountId": "",\n "merchantAccount": "",\n "transferInstrumentId": ""\n },\n "currency": "",\n "description": "",\n "id": "",\n "priorities": [],\n "reason": "",\n "schedule": "",\n "status": "",\n "sweepAmount": {\n "currency": "",\n "value": 0\n },\n "targetAmount": {},\n "triggerAmount": {},\n "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 \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
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({
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
headers: {'content-type': 'application/json'},
body: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
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('PATCH', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
category: '',
counterparty: {
balanceAccountId: '',
merchantAccount: '',
transferInstrumentId: ''
},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {
currency: '',
value: 0
},
targetAmount: {},
triggerAmount: {},
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: 'PATCH',
url: '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId',
headers: {'content-type': 'application/json'},
data: {
category: '',
counterparty: {balanceAccountId: '', merchantAccount: '', transferInstrumentId: ''},
currency: '',
description: '',
id: '',
priorities: [],
reason: '',
schedule: '',
status: '',
sweepAmount: {currency: '', value: 0},
targetAmount: {},
triggerAmount: {},
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"category":"","counterparty":{"balanceAccountId":"","merchantAccount":"","transferInstrumentId":""},"currency":"","description":"","id":"","priorities":[],"reason":"","schedule":"","status":"","sweepAmount":{"currency":"","value":0},"targetAmount":{},"triggerAmount":{},"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 = @{ @"category": @"",
@"counterparty": @{ @"balanceAccountId": @"", @"merchantAccount": @"", @"transferInstrumentId": @"" },
@"currency": @"",
@"description": @"",
@"id": @"",
@"priorities": @[ ],
@"reason": @"",
@"schedule": @"",
@"status": @"",
@"sweepAmount": @{ @"currency": @"", @"value": @0 },
@"targetAmount": @{ },
@"triggerAmount": @{ },
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'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('PATCH', '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId', [
'body' => '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'category' => '',
'counterparty' => [
'balanceAccountId' => '',
'merchantAccount' => '',
'transferInstrumentId' => ''
],
'currency' => '',
'description' => '',
'id' => '',
'priorities' => [
],
'reason' => '',
'schedule' => '',
'status' => '',
'sweepAmount' => [
'currency' => '',
'value' => 0
],
'targetAmount' => [
],
'triggerAmount' => [
],
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId');
$request->setRequestMethod('PATCH');
$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}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
payload = {
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId"
payload <- "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"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.patch('/baseUrl/balanceAccounts/:balanceAccountId/sweeps/:sweepId') do |req|
req.body = "{\n \"category\": \"\",\n \"counterparty\": {\n \"balanceAccountId\": \"\",\n \"merchantAccount\": \"\",\n \"transferInstrumentId\": \"\"\n },\n \"currency\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"priorities\": [],\n \"reason\": \"\",\n \"schedule\": \"\",\n \"status\": \"\",\n \"sweepAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"targetAmount\": {},\n \"triggerAmount\": {},\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId";
let payload = json!({
"category": "",
"counterparty": json!({
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
}),
"currency": "",
"description": "",
"id": "",
"priorities": (),
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": json!({
"currency": "",
"value": 0
}),
"targetAmount": json!({}),
"triggerAmount": json!({}),
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId \
--header 'content-type: application/json' \
--data '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}'
echo '{
"category": "",
"counterparty": {
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
},
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": {
"currency": "",
"value": 0
},
"targetAmount": {},
"triggerAmount": {},
"type": ""
}' | \
http PATCH {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "category": "",\n "counterparty": {\n "balanceAccountId": "",\n "merchantAccount": "",\n "transferInstrumentId": ""\n },\n "currency": "",\n "description": "",\n "id": "",\n "priorities": [],\n "reason": "",\n "schedule": "",\n "status": "",\n "sweepAmount": {\n "currency": "",\n "value": 0\n },\n "targetAmount": {},\n "triggerAmount": {},\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"category": "",
"counterparty": [
"balanceAccountId": "",
"merchantAccount": "",
"transferInstrumentId": ""
],
"currency": "",
"description": "",
"id": "",
"priorities": [],
"reason": "",
"schedule": "",
"status": "",
"sweepAmount": [
"currency": "",
"value": 0
],
"targetAmount": [],
"triggerAmount": [],
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balanceAccounts/:balanceAccountId/sweeps/:sweepId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
{
"counterparty": {
"merchantAccount": "YOUR_MERCHANT_ACCOUNT"
},
"currency": "EUR",
"id": "SWPC4227C224555B5FTD2NT2JV4WN5",
"schedule": {
"type": "balance"
},
"status": "inactive",
"triggerAmount": {
"currency": "EUR",
"value": 50000
},
"type": "pull"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Validate a bank account
{{baseUrl}}/validateBankAccountIdentification
BODY json
{
"accountIdentification": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/validateBankAccountIdentification");
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 \"accountIdentification\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/validateBankAccountIdentification" {:content-type :json
:form-params {:accountIdentification ""}})
require "http/client"
url = "{{baseUrl}}/validateBankAccountIdentification"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountIdentification\": \"\"\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}}/validateBankAccountIdentification"),
Content = new StringContent("{\n \"accountIdentification\": \"\"\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}}/validateBankAccountIdentification");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountIdentification\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/validateBankAccountIdentification"
payload := strings.NewReader("{\n \"accountIdentification\": \"\"\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/validateBankAccountIdentification HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 33
{
"accountIdentification": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/validateBankAccountIdentification")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountIdentification\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/validateBankAccountIdentification"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountIdentification\": \"\"\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 \"accountIdentification\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/validateBankAccountIdentification")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/validateBankAccountIdentification")
.header("content-type", "application/json")
.body("{\n \"accountIdentification\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountIdentification: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/validateBankAccountIdentification');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/validateBankAccountIdentification',
headers: {'content-type': 'application/json'},
data: {accountIdentification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/validateBankAccountIdentification';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdentification":""}'
};
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}}/validateBankAccountIdentification',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountIdentification": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountIdentification\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/validateBankAccountIdentification")
.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/validateBankAccountIdentification',
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({accountIdentification: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/validateBankAccountIdentification',
headers: {'content-type': 'application/json'},
body: {accountIdentification: ''},
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}}/validateBankAccountIdentification');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountIdentification: ''
});
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}}/validateBankAccountIdentification',
headers: {'content-type': 'application/json'},
data: {accountIdentification: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/validateBankAccountIdentification';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountIdentification":""}'
};
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 = @{ @"accountIdentification": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/validateBankAccountIdentification"]
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}}/validateBankAccountIdentification" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountIdentification\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/validateBankAccountIdentification",
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([
'accountIdentification' => ''
]),
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}}/validateBankAccountIdentification', [
'body' => '{
"accountIdentification": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/validateBankAccountIdentification');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountIdentification' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountIdentification' => ''
]));
$request->setRequestUrl('{{baseUrl}}/validateBankAccountIdentification');
$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}}/validateBankAccountIdentification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentification": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/validateBankAccountIdentification' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountIdentification": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountIdentification\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/validateBankAccountIdentification", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/validateBankAccountIdentification"
payload = { "accountIdentification": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/validateBankAccountIdentification"
payload <- "{\n \"accountIdentification\": \"\"\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}}/validateBankAccountIdentification")
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 \"accountIdentification\": \"\"\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/validateBankAccountIdentification') do |req|
req.body = "{\n \"accountIdentification\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/validateBankAccountIdentification";
let payload = json!({"accountIdentification": ""});
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}}/validateBankAccountIdentification \
--header 'content-type: application/json' \
--data '{
"accountIdentification": ""
}'
echo '{
"accountIdentification": ""
}' | \
http POST {{baseUrl}}/validateBankAccountIdentification \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountIdentification": ""\n}' \
--output-document \
- {{baseUrl}}/validateBankAccountIdentification
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["accountIdentification": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/validateBankAccountIdentification")! 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
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "33_01",
"invalidFields": [
{
"message": "Invalid IBAN.",
"name": "iban"
}
],
"status": 422,
"title": "Invalid bank account identification details provided",
"type": "https://docs.adyen.com/errors/validation"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "33_01",
"invalidFields": [
{
"message": "Invalid account number.",
"name": "accountNumber"
},
{
"message": "Invalid routing number.",
"name": "routingNumber"
}
],
"status": 422,
"title": "Invalid bank account identification details provided",
"type": "https://docs.adyen.com/errors/validation"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a grant account
{{baseUrl}}/grantAccounts/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/grantAccounts/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/grantAccounts/:id")
require "http/client"
url = "{{baseUrl}}/grantAccounts/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/grantAccounts/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/grantAccounts/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/grantAccounts/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/grantAccounts/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/grantAccounts/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/grantAccounts/:id"))
.method("GET", 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}}/grantAccounts/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/grantAccounts/:id")
.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('GET', '{{baseUrl}}/grantAccounts/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/grantAccounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/grantAccounts/:id';
const options = {method: 'GET'};
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}}/grantAccounts/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/grantAccounts/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/grantAccounts/:id',
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: 'GET', url: '{{baseUrl}}/grantAccounts/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/grantAccounts/: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: 'GET', url: '{{baseUrl}}/grantAccounts/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/grantAccounts/:id';
const options = {method: 'GET'};
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}}/grantAccounts/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/grantAccounts/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/grantAccounts/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/grantAccounts/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/grantAccounts/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/grantAccounts/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/grantAccounts/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/grantAccounts/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/grantAccounts/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/grantAccounts/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/grantAccounts/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/grantAccounts/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/grantAccounts/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/grantAccounts/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/grantAccounts/:id
http GET {{baseUrl}}/grantAccounts/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/grantAccounts/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/grantAccounts/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a grant offer
{{baseUrl}}/grantOffers/:grantOfferId
QUERY PARAMS
grantOfferId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/grantOffers/:grantOfferId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/grantOffers/:grantOfferId")
require "http/client"
url = "{{baseUrl}}/grantOffers/:grantOfferId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/grantOffers/:grantOfferId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/grantOffers/:grantOfferId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/grantOffers/:grantOfferId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/grantOffers/:grantOfferId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/grantOffers/:grantOfferId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/grantOffers/:grantOfferId"))
.method("GET", 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}}/grantOffers/:grantOfferId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/grantOffers/:grantOfferId")
.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('GET', '{{baseUrl}}/grantOffers/:grantOfferId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/grantOffers/:grantOfferId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/grantOffers/:grantOfferId';
const options = {method: 'GET'};
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}}/grantOffers/:grantOfferId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/grantOffers/:grantOfferId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/grantOffers/:grantOfferId',
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: 'GET', url: '{{baseUrl}}/grantOffers/:grantOfferId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/grantOffers/:grantOfferId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/grantOffers/:grantOfferId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/grantOffers/:grantOfferId';
const options = {method: 'GET'};
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}}/grantOffers/:grantOfferId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/grantOffers/:grantOfferId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/grantOffers/:grantOfferId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/grantOffers/:grantOfferId');
echo $response->getBody();
setUrl('{{baseUrl}}/grantOffers/:grantOfferId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/grantOffers/:grantOfferId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/grantOffers/:grantOfferId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/grantOffers/:grantOfferId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/grantOffers/:grantOfferId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/grantOffers/:grantOfferId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/grantOffers/:grantOfferId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/grantOffers/:grantOfferId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/grantOffers/:grantOfferId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/grantOffers/:grantOfferId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/grantOffers/:grantOfferId
http GET {{baseUrl}}/grantOffers/:grantOfferId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/grantOffers/:grantOfferId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/grantOffers/:grantOfferId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all available grant offers
{{baseUrl}}/grantOffers
QUERY PARAMS
accountHolderId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/grantOffers?accountHolderId=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/grantOffers" {:query-params {:accountHolderId ""}})
require "http/client"
url = "{{baseUrl}}/grantOffers?accountHolderId="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/grantOffers?accountHolderId="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/grantOffers?accountHolderId=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/grantOffers?accountHolderId="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/grantOffers?accountHolderId= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/grantOffers?accountHolderId=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/grantOffers?accountHolderId="))
.method("GET", 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}}/grantOffers?accountHolderId=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/grantOffers?accountHolderId=")
.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('GET', '{{baseUrl}}/grantOffers?accountHolderId=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/grantOffers',
params: {accountHolderId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/grantOffers?accountHolderId=';
const options = {method: 'GET'};
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}}/grantOffers?accountHolderId=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/grantOffers?accountHolderId=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/grantOffers?accountHolderId=',
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: 'GET',
url: '{{baseUrl}}/grantOffers',
qs: {accountHolderId: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/grantOffers');
req.query({
accountHolderId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/grantOffers',
params: {accountHolderId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/grantOffers?accountHolderId=';
const options = {method: 'GET'};
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}}/grantOffers?accountHolderId="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/grantOffers?accountHolderId=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/grantOffers?accountHolderId=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/grantOffers?accountHolderId=');
echo $response->getBody();
setUrl('{{baseUrl}}/grantOffers');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountHolderId' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/grantOffers');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountHolderId' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/grantOffers?accountHolderId=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/grantOffers?accountHolderId=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/grantOffers?accountHolderId=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/grantOffers"
querystring = {"accountHolderId":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/grantOffers"
queryString <- list(accountHolderId = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/grantOffers?accountHolderId=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/grantOffers') do |req|
req.params['accountHolderId'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/grantOffers";
let querystring = [
("accountHolderId", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/grantOffers?accountHolderId='
http GET '{{baseUrl}}/grantOffers?accountHolderId='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/grantOffers?accountHolderId='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/grantOffers?accountHolderId=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Create a payment instrument group
{{baseUrl}}/paymentInstrumentGroups
BODY json
{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstrumentGroups");
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 \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentInstrumentGroups" {:content-type :json
:form-params {:balancePlatform ""
:description ""
:properties {}
:reference ""
:txVariant ""}})
require "http/client"
url = "{{baseUrl}}/paymentInstrumentGroups"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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}}/paymentInstrumentGroups"),
Content = new StringContent("{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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}}/paymentInstrumentGroups");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstrumentGroups"
payload := strings.NewReader("{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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/paymentInstrumentGroups HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 106
{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentInstrumentGroups")
.setHeader("content-type", "application/json")
.setBody("{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstrumentGroups"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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 \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentInstrumentGroups")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentInstrumentGroups")
.header("content-type", "application/json")
.body("{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}")
.asString();
const data = JSON.stringify({
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/paymentInstrumentGroups');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentInstrumentGroups',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstrumentGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","description":"","properties":{},"reference":"","txVariant":""}'
};
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}}/paymentInstrumentGroups',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "balancePlatform": "",\n "description": "",\n "properties": {},\n "reference": "",\n "txVariant": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstrumentGroups")
.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/paymentInstrumentGroups',
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({
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentInstrumentGroups',
headers: {'content-type': 'application/json'},
body: {
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
},
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}}/paymentInstrumentGroups');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
});
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}}/paymentInstrumentGroups',
headers: {'content-type': 'application/json'},
data: {
balancePlatform: '',
description: '',
properties: {},
reference: '',
txVariant: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstrumentGroups';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balancePlatform":"","description":"","properties":{},"reference":"","txVariant":""}'
};
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 = @{ @"balancePlatform": @"",
@"description": @"",
@"properties": @{ },
@"reference": @"",
@"txVariant": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentInstrumentGroups"]
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}}/paymentInstrumentGroups" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstrumentGroups",
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([
'balancePlatform' => '',
'description' => '',
'properties' => [
],
'reference' => '',
'txVariant' => ''
]),
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}}/paymentInstrumentGroups', [
'body' => '{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstrumentGroups');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'balancePlatform' => '',
'description' => '',
'properties' => [
],
'reference' => '',
'txVariant' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'balancePlatform' => '',
'description' => '',
'properties' => [
],
'reference' => '',
'txVariant' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentInstrumentGroups');
$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}}/paymentInstrumentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstrumentGroups' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentInstrumentGroups", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstrumentGroups"
payload = {
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstrumentGroups"
payload <- "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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}}/paymentInstrumentGroups")
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 \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\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/paymentInstrumentGroups') do |req|
req.body = "{\n \"balancePlatform\": \"\",\n \"description\": \"\",\n \"properties\": {},\n \"reference\": \"\",\n \"txVariant\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstrumentGroups";
let payload = json!({
"balancePlatform": "",
"description": "",
"properties": json!({}),
"reference": "",
"txVariant": ""
});
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}}/paymentInstrumentGroups \
--header 'content-type: application/json' \
--data '{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}'
echo '{
"balancePlatform": "",
"description": "",
"properties": {},
"reference": "",
"txVariant": ""
}' | \
http POST {{baseUrl}}/paymentInstrumentGroups \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "balancePlatform": "",\n "description": "",\n "properties": {},\n "reference": "",\n "txVariant": ""\n}' \
--output-document \
- {{baseUrl}}/paymentInstrumentGroups
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"balancePlatform": "",
"description": "",
"properties": [],
"reference": "",
"txVariant": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstrumentGroups")! 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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a payment instrument group
{{baseUrl}}/paymentInstrumentGroups/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstrumentGroups/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentInstrumentGroups/:id")
require "http/client"
url = "{{baseUrl}}/paymentInstrumentGroups/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentInstrumentGroups/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentInstrumentGroups/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstrumentGroups/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentInstrumentGroups/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentInstrumentGroups/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstrumentGroups/:id"))
.method("GET", 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}}/paymentInstrumentGroups/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentInstrumentGroups/:id")
.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('GET', '{{baseUrl}}/paymentInstrumentGroups/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/paymentInstrumentGroups/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstrumentGroups/:id';
const options = {method: 'GET'};
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}}/paymentInstrumentGroups/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstrumentGroups/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstrumentGroups/:id',
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: 'GET', url: '{{baseUrl}}/paymentInstrumentGroups/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentInstrumentGroups/: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: 'GET', url: '{{baseUrl}}/paymentInstrumentGroups/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstrumentGroups/:id';
const options = {method: 'GET'};
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}}/paymentInstrumentGroups/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/paymentInstrumentGroups/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstrumentGroups/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentInstrumentGroups/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstrumentGroups/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentInstrumentGroups/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentInstrumentGroups/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstrumentGroups/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentInstrumentGroups/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstrumentGroups/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstrumentGroups/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstrumentGroups/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentInstrumentGroups/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstrumentGroups/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentInstrumentGroups/:id
http GET {{baseUrl}}/paymentInstrumentGroups/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentInstrumentGroups/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstrumentGroups/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"balancePlatform": "YOUR_BALANCE_PLATFORM",
"id": "PG3227C223222B5CMD3FJFKGZ",
"txVariant": "mc"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all transaction rules for a payment instrument group
{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")
require "http/client"
url = "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentInstrumentGroups/:id/transactionRules HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"))
.method("GET", 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}}/paymentInstrumentGroups/:id/transactionRules")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")
.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('GET', '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules';
const options = {method: 'GET'};
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}}/paymentInstrumentGroups/:id/transactionRules',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstrumentGroups/:id/transactionRules',
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: 'GET',
url: '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules';
const options = {method: 'GET'};
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}}/paymentInstrumentGroups/:id/transactionRules"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/paymentInstrumentGroups/:id/transactionRules" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentInstrumentGroups/:id/transactionRules")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentInstrumentGroups/:id/transactionRules') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentInstrumentGroups/:id/transactionRules
http GET {{baseUrl}}/paymentInstrumentGroups/:id/transactionRules
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentInstrumentGroups/:id/transactionRules
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstrumentGroups/:id/transactionRules")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"transactionRules": [
{
"aggregationLevel": "paymentInstrument",
"description": "Up to 1000 EUR per card for the last 12 hours",
"entityKey": {
"entityReference": "PG3227C223222C5GXR3M5592Q",
"entityType": "paymentInstrumentGroup"
},
"id": "TR3227C223222C5GXR3XP596N",
"interval": {
"duration": {
"unit": "hours",
"value": 12
},
"timeZone": "UTC",
"type": "sliding"
},
"outcomeType": "hardBlock",
"reference": "YOUR_REFERENCE_2918A",
"requestType": "authorization",
"ruleRestrictions": {
"totalAmount": {
"operation": "greaterThan",
"value": {
"currency": "EUR",
"value": 100000
}
}
},
"status": "inactive",
"type": "velocity"
},
{
"aggregationLevel": "paymentInstrument",
"description": "NL only",
"entityKey": {
"entityReference": "PG3227C223222C5GXR3M5592Q",
"entityType": "paymentInstrumentGroup"
},
"id": "TR3227C223222C5GXR3WC595H",
"interval": {
"duration": {
"unit": "hours",
"value": 12
},
"timeZone": "UTC",
"type": "sliding"
},
"outcomeType": "hardBlock",
"reference": "myRule12345",
"requestType": "authorization",
"ruleRestrictions": {
"totalAmount": {
"operation": "greaterThan",
"value": {
"currency": "EUR",
"value": 100000
}
}
},
"status": "inactive",
"type": "velocity"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Create a payment instrument
{{baseUrl}}/paymentInstruments
BODY json
{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstruments");
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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentInstruments" {:content-type :json
:form-params {:balanceAccountId ""
:card {:authentication {:email ""
:password ""
:phone {:number ""
:type ""}}
:brand ""
:brandVariant ""
:cardholderName ""
:configuration {:activation ""
:activationUrl ""
:bulkAddress {:city ""
:company ""
:country ""
:email ""
:houseNumberOrName ""
:mobile ""
:postalCode ""
:stateOrProvince ""
:street ""}
:cardImageId ""
:carrier ""
:carrierImageId ""
:configurationProfileId ""
:currency ""
:envelope ""
:insert ""
:language ""
:logoImageId ""
:pinMailer ""
:shipmentMethod ""}
:deliveryContact {:address {:city ""
:country ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:email ""
:fullPhoneNumber ""
:name {:firstName ""
:lastName ""}
:phoneNumber {:phoneCountryCode ""
:phoneNumber ""
:phoneType ""}
:webAddress ""}
:formFactor ""}
:description ""
:issuingCountryCode ""
:paymentInstrumentGroupId ""
:reference ""
:status ""
:statusReason ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/paymentInstruments"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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}}/paymentInstruments"),
Content = new StringContent("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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}}/paymentInstruments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstruments"
payload := strings.NewReader("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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/paymentInstruments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1510
{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentInstruments")
.setHeader("content-type", "application/json")
.setBody("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstruments"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentInstruments")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentInstruments")
.header("content-type", "application/json")
.body("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
balanceAccountId: '',
card: {
authentication: {
email: '',
password: '',
phone: {
number: '',
type: ''
}
},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {
firstName: '',
lastName: ''
},
phoneNumber: {
phoneCountryCode: '',
phoneNumber: '',
phoneType: ''
},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
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}}/paymentInstruments');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentInstruments',
headers: {'content-type': 'application/json'},
data: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstruments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balanceAccountId":"","card":{"authentication":{"email":"","password":"","phone":{"number":"","type":""}},"brand":"","brandVariant":"","cardholderName":"","configuration":{"activation":"","activationUrl":"","bulkAddress":{"city":"","company":"","country":"","email":"","houseNumberOrName":"","mobile":"","postalCode":"","stateOrProvince":"","street":""},"cardImageId":"","carrier":"","carrierImageId":"","configurationProfileId":"","currency":"","envelope":"","insert":"","language":"","logoImageId":"","pinMailer":"","shipmentMethod":""},"deliveryContact":{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"email":"","fullPhoneNumber":"","name":{"firstName":"","lastName":""},"phoneNumber":{"phoneCountryCode":"","phoneNumber":"","phoneType":""},"webAddress":""},"formFactor":""},"description":"","issuingCountryCode":"","paymentInstrumentGroupId":"","reference":"","status":"","statusReason":"","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}}/paymentInstruments',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "balanceAccountId": "",\n "card": {\n "authentication": {\n "email": "",\n "password": "",\n "phone": {\n "number": "",\n "type": ""\n }\n },\n "brand": "",\n "brandVariant": "",\n "cardholderName": "",\n "configuration": {\n "activation": "",\n "activationUrl": "",\n "bulkAddress": {\n "city": "",\n "company": "",\n "country": "",\n "email": "",\n "houseNumberOrName": "",\n "mobile": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "cardImageId": "",\n "carrier": "",\n "carrierImageId": "",\n "configurationProfileId": "",\n "currency": "",\n "envelope": "",\n "insert": "",\n "language": "",\n "logoImageId": "",\n "pinMailer": "",\n "shipmentMethod": ""\n },\n "deliveryContact": {\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "email": "",\n "fullPhoneNumber": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "phoneNumber": {\n "phoneCountryCode": "",\n "phoneNumber": "",\n "phoneType": ""\n },\n "webAddress": ""\n },\n "formFactor": ""\n },\n "description": "",\n "issuingCountryCode": "",\n "paymentInstrumentGroupId": "",\n "reference": "",\n "status": "",\n "statusReason": "",\n "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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstruments")
.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/paymentInstruments',
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({
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentInstruments',
headers: {'content-type': 'application/json'},
body: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
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}}/paymentInstruments');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
balanceAccountId: '',
card: {
authentication: {
email: '',
password: '',
phone: {
number: '',
type: ''
}
},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {
firstName: '',
lastName: ''
},
phoneNumber: {
phoneCountryCode: '',
phoneNumber: '',
phoneType: ''
},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
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}}/paymentInstruments',
headers: {'content-type': 'application/json'},
data: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
description: '',
issuingCountryCode: '',
paymentInstrumentGroupId: '',
reference: '',
status: '',
statusReason: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstruments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"balanceAccountId":"","card":{"authentication":{"email":"","password":"","phone":{"number":"","type":""}},"brand":"","brandVariant":"","cardholderName":"","configuration":{"activation":"","activationUrl":"","bulkAddress":{"city":"","company":"","country":"","email":"","houseNumberOrName":"","mobile":"","postalCode":"","stateOrProvince":"","street":""},"cardImageId":"","carrier":"","carrierImageId":"","configurationProfileId":"","currency":"","envelope":"","insert":"","language":"","logoImageId":"","pinMailer":"","shipmentMethod":""},"deliveryContact":{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"email":"","fullPhoneNumber":"","name":{"firstName":"","lastName":""},"phoneNumber":{"phoneCountryCode":"","phoneNumber":"","phoneType":""},"webAddress":""},"formFactor":""},"description":"","issuingCountryCode":"","paymentInstrumentGroupId":"","reference":"","status":"","statusReason":"","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 = @{ @"balanceAccountId": @"",
@"card": @{ @"authentication": @{ @"email": @"", @"password": @"", @"phone": @{ @"number": @"", @"type": @"" } }, @"brand": @"", @"brandVariant": @"", @"cardholderName": @"", @"configuration": @{ @"activation": @"", @"activationUrl": @"", @"bulkAddress": @{ @"city": @"", @"company": @"", @"country": @"", @"email": @"", @"houseNumberOrName": @"", @"mobile": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" }, @"cardImageId": @"", @"carrier": @"", @"carrierImageId": @"", @"configurationProfileId": @"", @"currency": @"", @"envelope": @"", @"insert": @"", @"language": @"", @"logoImageId": @"", @"pinMailer": @"", @"shipmentMethod": @"" }, @"deliveryContact": @{ @"address": @{ @"city": @"", @"country": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" }, @"email": @"", @"fullPhoneNumber": @"", @"name": @{ @"firstName": @"", @"lastName": @"" }, @"phoneNumber": @{ @"phoneCountryCode": @"", @"phoneNumber": @"", @"phoneType": @"" }, @"webAddress": @"" }, @"formFactor": @"" },
@"description": @"",
@"issuingCountryCode": @"",
@"paymentInstrumentGroupId": @"",
@"reference": @"",
@"status": @"",
@"statusReason": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentInstruments"]
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}}/paymentInstruments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstruments",
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([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'description' => '',
'issuingCountryCode' => '',
'paymentInstrumentGroupId' => '',
'reference' => '',
'status' => '',
'statusReason' => '',
'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}}/paymentInstruments', [
'body' => '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstruments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'description' => '',
'issuingCountryCode' => '',
'paymentInstrumentGroupId' => '',
'reference' => '',
'status' => '',
'statusReason' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'description' => '',
'issuingCountryCode' => '',
'paymentInstrumentGroupId' => '',
'reference' => '',
'status' => '',
'statusReason' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentInstruments');
$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}}/paymentInstruments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstruments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentInstruments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstruments"
payload = {
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstruments"
payload <- "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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}}/paymentInstruments")
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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"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/paymentInstruments') do |req|
req.body = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"description\": \"\",\n \"issuingCountryCode\": \"\",\n \"paymentInstrumentGroupId\": \"\",\n \"reference\": \"\",\n \"status\": \"\",\n \"statusReason\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstruments";
let payload = json!({
"balanceAccountId": "",
"card": json!({
"authentication": json!({
"email": "",
"password": "",
"phone": json!({
"number": "",
"type": ""
})
}),
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": json!({
"activation": "",
"activationUrl": "",
"bulkAddress": json!({
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
}),
"deliveryContact": json!({
"address": json!({
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"email": "",
"fullPhoneNumber": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"phoneNumber": json!({
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
}),
"webAddress": ""
}),
"formFactor": ""
}),
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"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}}/paymentInstruments \
--header 'content-type: application/json' \
--data '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}'
echo '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
}' | \
http POST {{baseUrl}}/paymentInstruments \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "balanceAccountId": "",\n "card": {\n "authentication": {\n "email": "",\n "password": "",\n "phone": {\n "number": "",\n "type": ""\n }\n },\n "brand": "",\n "brandVariant": "",\n "cardholderName": "",\n "configuration": {\n "activation": "",\n "activationUrl": "",\n "bulkAddress": {\n "city": "",\n "company": "",\n "country": "",\n "email": "",\n "houseNumberOrName": "",\n "mobile": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "cardImageId": "",\n "carrier": "",\n "carrierImageId": "",\n "configurationProfileId": "",\n "currency": "",\n "envelope": "",\n "insert": "",\n "language": "",\n "logoImageId": "",\n "pinMailer": "",\n "shipmentMethod": ""\n },\n "deliveryContact": {\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "email": "",\n "fullPhoneNumber": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "phoneNumber": {\n "phoneCountryCode": "",\n "phoneNumber": "",\n "phoneType": ""\n },\n "webAddress": ""\n },\n "formFactor": ""\n },\n "description": "",\n "issuingCountryCode": "",\n "paymentInstrumentGroupId": "",\n "reference": "",\n "status": "",\n "statusReason": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/paymentInstruments
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"balanceAccountId": "",
"card": [
"authentication": [
"email": "",
"password": "",
"phone": [
"number": "",
"type": ""
]
],
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": [
"activation": "",
"activationUrl": "",
"bulkAddress": [
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
],
"deliveryContact": [
"address": [
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"email": "",
"fullPhoneNumber": "",
"name": [
"firstName": "",
"lastName": ""
],
"phoneNumber": [
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
],
"webAddress": ""
],
"formFactor": ""
],
"description": "",
"issuingCountryCode": "",
"paymentInstrumentGroupId": "",
"reference": "",
"status": "",
"statusReason": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstruments")! 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
{
"balanceAccountId": "BA3227C223222B5CTBLR8BWJB",
"bankAccount": {
"iban": "NL20ADYB2017000035"
},
"description": "YOUR_DESCRIPTION",
"id": "PI322LJ223222B5DJS7CD9LWL",
"issuingCountryCode": "NL",
"status": "Active",
"type": "bankAccount"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balanceAccountId": "BA3227C223222B5CTBLR8BWJB",
"bankAccount": {
"accountNumber": "333720756",
"accountType": "checking",
"routingNumber": "21000021"
},
"description": "YOUR_DESCRIPTION",
"id": "PI322LJ223222B5DJS7CD9LWL",
"issuingCountryCode": "US",
"status": "Active",
"type": "bankAccount"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balanceAccountId": "BA32272223222B59CZ3T52DKZ",
"card": {
"authentication": {
"password": "******",
"phone": {
"number": "+123456789",
"type": "mobile"
}
},
"bin": "555544",
"brand": "mc",
"brandVariant": "mcdebit",
"cardholderName": "Sam Hopper",
"configuration": {
"configurationProfileId": "CP123AB45678C91ABCD2ABCDE"
},
"deliveryContact": {
"address": {
"city": "Amsterdam",
"country": "NL",
"line1": "Brannan Street",
"line2": "274",
"postalCode": "1020CD",
"stateOrProvince": "NH"
},
"name": {
"firstName": "Sam",
"lastName": "Hopper"
}
},
"expiration": {
"month": "08",
"year": "2024"
},
"formFactor": "physical",
"lastFour": "2765",
"number": "************5785"
},
"description": "S. Hopper - Main card",
"id": "PI3227C223222B5BPCMFXD2XG",
"issuingCountryCode": "NL",
"status": "inactive",
"type": "card"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balanceAccountId": "BA3227C223222B5FG88S28BGN",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mcdebit",
"cardholderName": "Simon Hopper",
"cvc": "136",
"expiration": {
"month": "11",
"year": "2025"
},
"formFactor": "virtual",
"lastFour": "3703",
"number": "5555444411213703"
},
"description": "My test card",
"id": "PI32272223222C5GXTDWH3TTN",
"issuingCountryCode": "NL",
"status": "active",
"type": "card"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a payment instrument
{{baseUrl}}/paymentInstruments/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstruments/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentInstruments/:id")
require "http/client"
url = "{{baseUrl}}/paymentInstruments/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentInstruments/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentInstruments/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstruments/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentInstruments/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentInstruments/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstruments/:id"))
.method("GET", 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}}/paymentInstruments/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentInstruments/:id")
.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('GET', '{{baseUrl}}/paymentInstruments/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/paymentInstruments/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstruments/:id';
const options = {method: 'GET'};
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}}/paymentInstruments/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstruments/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstruments/:id',
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: 'GET', url: '{{baseUrl}}/paymentInstruments/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentInstruments/: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: 'GET', url: '{{baseUrl}}/paymentInstruments/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstruments/:id';
const options = {method: 'GET'};
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}}/paymentInstruments/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/paymentInstruments/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstruments/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentInstruments/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstruments/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentInstruments/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentInstruments/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstruments/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentInstruments/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstruments/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstruments/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstruments/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentInstruments/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstruments/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentInstruments/:id
http GET {{baseUrl}}/paymentInstruments/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentInstruments/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstruments/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"balanceAccountId": "BA32272223222B59CZ3T52DKZ",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mcdebit",
"cardholderName": "Simon Hopper",
"expiration": {
"month": "01",
"year": "2024"
},
"formFactor": "virtual",
"lastFour": "3548",
"number": "************3548"
},
"description": "S. Hopper - Main card",
"id": "PI32272223222B5CMD3MQ3HXX",
"issuingCountryCode": "GB",
"status": "active",
"type": "card"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all transaction rules for a payment instrument
{{baseUrl}}/paymentInstruments/:id/transactionRules
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstruments/:id/transactionRules");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentInstruments/:id/transactionRules")
require "http/client"
url = "{{baseUrl}}/paymentInstruments/:id/transactionRules"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentInstruments/:id/transactionRules"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentInstruments/:id/transactionRules");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstruments/:id/transactionRules"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentInstruments/:id/transactionRules HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentInstruments/:id/transactionRules")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstruments/:id/transactionRules"))
.method("GET", 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}}/paymentInstruments/:id/transactionRules")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentInstruments/:id/transactionRules")
.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('GET', '{{baseUrl}}/paymentInstruments/:id/transactionRules');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/transactionRules'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstruments/:id/transactionRules';
const options = {method: 'GET'};
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}}/paymentInstruments/:id/transactionRules',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstruments/:id/transactionRules")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstruments/:id/transactionRules',
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: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/transactionRules'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentInstruments/:id/transactionRules');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/transactionRules'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstruments/:id/transactionRules';
const options = {method: 'GET'};
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}}/paymentInstruments/:id/transactionRules"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/paymentInstruments/:id/transactionRules" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstruments/:id/transactionRules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentInstruments/:id/transactionRules');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstruments/:id/transactionRules');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentInstruments/:id/transactionRules');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentInstruments/:id/transactionRules' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstruments/:id/transactionRules' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentInstruments/:id/transactionRules")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstruments/:id/transactionRules"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstruments/:id/transactionRules"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstruments/:id/transactionRules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentInstruments/:id/transactionRules') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstruments/:id/transactionRules";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentInstruments/:id/transactionRules
http GET {{baseUrl}}/paymentInstruments/:id/transactionRules
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentInstruments/:id/transactionRules
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstruments/:id/transactionRules")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"transactionRules": [
{
"description": "Only allow point-of-sale transactions",
"entityKey": {
"entityReference": "PI3227C223222B5FN65FN5NS9",
"entityType": "paymentInstrument"
},
"id": "TR32272223222B5GFSGFLFCHM",
"interval": {
"timeZone": "UTC",
"type": "perTransaction"
},
"outcomeType": "hardBlock",
"reference": "YOUR_REFERENCE_4F7346",
"requestType": "authorization",
"ruleRestrictions": {
"processingTypes": {
"operation": "noneMatch",
"value": [
"pos"
]
}
},
"startDate": "2022-08-02T16:07:00.851374+02:00",
"status": "active",
"type": "blockList"
},
{
"description": "Set the maximum number of active network tokens to one for this card",
"entityKey": {
"entityReference": "PI3227C223222B5FN65FN5NS9",
"entityType": "paymentInstrument"
},
"id": "TR32272223222C5GQJ93L7J8Z",
"interval": {
"timeZone": "UTC",
"type": "perTransaction"
},
"outcomeType": "hardBlock",
"reference": "myRule123",
"requestType": "authorization",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "greaterThanOrEqualTo",
"value": 1
}
},
"startDate": "2022-10-03T14:48:28.999314+02:00",
"status": "active",
"type": "blockList"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get the PAN of a payment instrument
{{baseUrl}}/paymentInstruments/:id/reveal
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstruments/:id/reveal");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentInstruments/:id/reveal")
require "http/client"
url = "{{baseUrl}}/paymentInstruments/:id/reveal"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentInstruments/:id/reveal"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentInstruments/:id/reveal");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstruments/:id/reveal"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentInstruments/:id/reveal HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentInstruments/:id/reveal")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstruments/:id/reveal"))
.method("GET", 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}}/paymentInstruments/:id/reveal")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentInstruments/:id/reveal")
.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('GET', '{{baseUrl}}/paymentInstruments/:id/reveal');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/reveal'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstruments/:id/reveal';
const options = {method: 'GET'};
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}}/paymentInstruments/:id/reveal',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstruments/:id/reveal")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstruments/:id/reveal',
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: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/reveal'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentInstruments/:id/reveal');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/paymentInstruments/:id/reveal'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstruments/:id/reveal';
const options = {method: 'GET'};
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}}/paymentInstruments/:id/reveal"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/paymentInstruments/:id/reveal" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstruments/:id/reveal",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentInstruments/:id/reveal');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstruments/:id/reveal');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentInstruments/:id/reveal');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentInstruments/:id/reveal' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstruments/:id/reveal' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentInstruments/:id/reveal")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstruments/:id/reveal"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstruments/:id/reveal"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstruments/:id/reveal")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentInstruments/:id/reveal') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstruments/:id/reveal";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentInstruments/:id/reveal
http GET {{baseUrl}}/paymentInstruments/:id/reveal
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentInstruments/:id/reveal
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstruments/:id/reveal")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
PATCH
Update a payment instrument
{{baseUrl}}/paymentInstruments/:id
QUERY PARAMS
id
BODY json
{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentInstruments/: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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/paymentInstruments/:id" {:content-type :json
:form-params {:balanceAccountId ""
:card {:authentication {:email ""
:password ""
:phone {:number ""
:type ""}}
:brand ""
:brandVariant ""
:cardholderName ""
:configuration {:activation ""
:activationUrl ""
:bulkAddress {:city ""
:company ""
:country ""
:email ""
:houseNumberOrName ""
:mobile ""
:postalCode ""
:stateOrProvince ""
:street ""}
:cardImageId ""
:carrier ""
:carrierImageId ""
:configurationProfileId ""
:currency ""
:envelope ""
:insert ""
:language ""
:logoImageId ""
:pinMailer ""
:shipmentMethod ""}
:deliveryContact {:address {:city ""
:country ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:email ""
:fullPhoneNumber ""
:name {:firstName ""
:lastName ""}
:phoneNumber {:phoneCountryCode ""
:phoneNumber ""
:phoneType ""}
:webAddress ""}
:formFactor ""}
:status ""
:statusComment ""
:statusReason ""}})
require "http/client"
url = "{{baseUrl}}/paymentInstruments/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/paymentInstruments/:id"),
Content = new StringContent("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\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}}/paymentInstruments/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentInstruments/:id"
payload := strings.NewReader("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/paymentInstruments/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1417
{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/paymentInstruments/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentInstruments/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\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 \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentInstruments/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/paymentInstruments/:id")
.header("content-type", "application/json")
.body("{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}")
.asString();
const data = JSON.stringify({
balanceAccountId: '',
card: {
authentication: {
email: '',
password: '',
phone: {
number: '',
type: ''
}
},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {
firstName: '',
lastName: ''
},
phoneNumber: {
phoneCountryCode: '',
phoneNumber: '',
phoneType: ''
},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/paymentInstruments/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentInstruments/:id',
headers: {'content-type': 'application/json'},
data: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentInstruments/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"balanceAccountId":"","card":{"authentication":{"email":"","password":"","phone":{"number":"","type":""}},"brand":"","brandVariant":"","cardholderName":"","configuration":{"activation":"","activationUrl":"","bulkAddress":{"city":"","company":"","country":"","email":"","houseNumberOrName":"","mobile":"","postalCode":"","stateOrProvince":"","street":""},"cardImageId":"","carrier":"","carrierImageId":"","configurationProfileId":"","currency":"","envelope":"","insert":"","language":"","logoImageId":"","pinMailer":"","shipmentMethod":""},"deliveryContact":{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"email":"","fullPhoneNumber":"","name":{"firstName":"","lastName":""},"phoneNumber":{"phoneCountryCode":"","phoneNumber":"","phoneType":""},"webAddress":""},"formFactor":""},"status":"","statusComment":"","statusReason":""}'
};
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}}/paymentInstruments/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "balanceAccountId": "",\n "card": {\n "authentication": {\n "email": "",\n "password": "",\n "phone": {\n "number": "",\n "type": ""\n }\n },\n "brand": "",\n "brandVariant": "",\n "cardholderName": "",\n "configuration": {\n "activation": "",\n "activationUrl": "",\n "bulkAddress": {\n "city": "",\n "company": "",\n "country": "",\n "email": "",\n "houseNumberOrName": "",\n "mobile": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "cardImageId": "",\n "carrier": "",\n "carrierImageId": "",\n "configurationProfileId": "",\n "currency": "",\n "envelope": "",\n "insert": "",\n "language": "",\n "logoImageId": "",\n "pinMailer": "",\n "shipmentMethod": ""\n },\n "deliveryContact": {\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "email": "",\n "fullPhoneNumber": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "phoneNumber": {\n "phoneCountryCode": "",\n "phoneNumber": "",\n "phoneType": ""\n },\n "webAddress": ""\n },\n "formFactor": ""\n },\n "status": "",\n "statusComment": "",\n "statusReason": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentInstruments/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentInstruments/: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({
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentInstruments/:id',
headers: {'content-type': 'application/json'},
body: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/paymentInstruments/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
balanceAccountId: '',
card: {
authentication: {
email: '',
password: '',
phone: {
number: '',
type: ''
}
},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {
firstName: '',
lastName: ''
},
phoneNumber: {
phoneCountryCode: '',
phoneNumber: '',
phoneType: ''
},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentInstruments/:id',
headers: {'content-type': 'application/json'},
data: {
balanceAccountId: '',
card: {
authentication: {email: '', password: '', phone: {number: '', type: ''}},
brand: '',
brandVariant: '',
cardholderName: '',
configuration: {
activation: '',
activationUrl: '',
bulkAddress: {
city: '',
company: '',
country: '',
email: '',
houseNumberOrName: '',
mobile: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
cardImageId: '',
carrier: '',
carrierImageId: '',
configurationProfileId: '',
currency: '',
envelope: '',
insert: '',
language: '',
logoImageId: '',
pinMailer: '',
shipmentMethod: ''
},
deliveryContact: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
email: '',
fullPhoneNumber: '',
name: {firstName: '', lastName: ''},
phoneNumber: {phoneCountryCode: '', phoneNumber: '', phoneType: ''},
webAddress: ''
},
formFactor: ''
},
status: '',
statusComment: '',
statusReason: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentInstruments/:id';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"balanceAccountId":"","card":{"authentication":{"email":"","password":"","phone":{"number":"","type":""}},"brand":"","brandVariant":"","cardholderName":"","configuration":{"activation":"","activationUrl":"","bulkAddress":{"city":"","company":"","country":"","email":"","houseNumberOrName":"","mobile":"","postalCode":"","stateOrProvince":"","street":""},"cardImageId":"","carrier":"","carrierImageId":"","configurationProfileId":"","currency":"","envelope":"","insert":"","language":"","logoImageId":"","pinMailer":"","shipmentMethod":""},"deliveryContact":{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"email":"","fullPhoneNumber":"","name":{"firstName":"","lastName":""},"phoneNumber":{"phoneCountryCode":"","phoneNumber":"","phoneType":""},"webAddress":""},"formFactor":""},"status":"","statusComment":"","statusReason":""}'
};
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 = @{ @"balanceAccountId": @"",
@"card": @{ @"authentication": @{ @"email": @"", @"password": @"", @"phone": @{ @"number": @"", @"type": @"" } }, @"brand": @"", @"brandVariant": @"", @"cardholderName": @"", @"configuration": @{ @"activation": @"", @"activationUrl": @"", @"bulkAddress": @{ @"city": @"", @"company": @"", @"country": @"", @"email": @"", @"houseNumberOrName": @"", @"mobile": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" }, @"cardImageId": @"", @"carrier": @"", @"carrierImageId": @"", @"configurationProfileId": @"", @"currency": @"", @"envelope": @"", @"insert": @"", @"language": @"", @"logoImageId": @"", @"pinMailer": @"", @"shipmentMethod": @"" }, @"deliveryContact": @{ @"address": @{ @"city": @"", @"country": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" }, @"email": @"", @"fullPhoneNumber": @"", @"name": @{ @"firstName": @"", @"lastName": @"" }, @"phoneNumber": @{ @"phoneCountryCode": @"", @"phoneNumber": @"", @"phoneType": @"" }, @"webAddress": @"" }, @"formFactor": @"" },
@"status": @"",
@"statusComment": @"",
@"statusReason": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentInstruments/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/paymentInstruments/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentInstruments/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'status' => '',
'statusComment' => '',
'statusReason' => ''
]),
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('PATCH', '{{baseUrl}}/paymentInstruments/:id', [
'body' => '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentInstruments/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'status' => '',
'statusComment' => '',
'statusReason' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'balanceAccountId' => '',
'card' => [
'authentication' => [
'email' => '',
'password' => '',
'phone' => [
'number' => '',
'type' => ''
]
],
'brand' => '',
'brandVariant' => '',
'cardholderName' => '',
'configuration' => [
'activation' => '',
'activationUrl' => '',
'bulkAddress' => [
'city' => '',
'company' => '',
'country' => '',
'email' => '',
'houseNumberOrName' => '',
'mobile' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'cardImageId' => '',
'carrier' => '',
'carrierImageId' => '',
'configurationProfileId' => '',
'currency' => '',
'envelope' => '',
'insert' => '',
'language' => '',
'logoImageId' => '',
'pinMailer' => '',
'shipmentMethod' => ''
],
'deliveryContact' => [
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'email' => '',
'fullPhoneNumber' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'phoneNumber' => [
'phoneCountryCode' => '',
'phoneNumber' => '',
'phoneType' => ''
],
'webAddress' => ''
],
'formFactor' => ''
],
'status' => '',
'statusComment' => '',
'statusReason' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentInstruments/:id');
$request->setRequestMethod('PATCH');
$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}}/paymentInstruments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentInstruments/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/paymentInstruments/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentInstruments/:id"
payload = {
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentInstruments/:id"
payload <- "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentInstruments/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\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.patch('/baseUrl/paymentInstruments/:id') do |req|
req.body = "{\n \"balanceAccountId\": \"\",\n \"card\": {\n \"authentication\": {\n \"email\": \"\",\n \"password\": \"\",\n \"phone\": {\n \"number\": \"\",\n \"type\": \"\"\n }\n },\n \"brand\": \"\",\n \"brandVariant\": \"\",\n \"cardholderName\": \"\",\n \"configuration\": {\n \"activation\": \"\",\n \"activationUrl\": \"\",\n \"bulkAddress\": {\n \"city\": \"\",\n \"company\": \"\",\n \"country\": \"\",\n \"email\": \"\",\n \"houseNumberOrName\": \"\",\n \"mobile\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"cardImageId\": \"\",\n \"carrier\": \"\",\n \"carrierImageId\": \"\",\n \"configurationProfileId\": \"\",\n \"currency\": \"\",\n \"envelope\": \"\",\n \"insert\": \"\",\n \"language\": \"\",\n \"logoImageId\": \"\",\n \"pinMailer\": \"\",\n \"shipmentMethod\": \"\"\n },\n \"deliveryContact\": {\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"email\": \"\",\n \"fullPhoneNumber\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"phoneNumber\": {\n \"phoneCountryCode\": \"\",\n \"phoneNumber\": \"\",\n \"phoneType\": \"\"\n },\n \"webAddress\": \"\"\n },\n \"formFactor\": \"\"\n },\n \"status\": \"\",\n \"statusComment\": \"\",\n \"statusReason\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentInstruments/:id";
let payload = json!({
"balanceAccountId": "",
"card": json!({
"authentication": json!({
"email": "",
"password": "",
"phone": json!({
"number": "",
"type": ""
})
}),
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": json!({
"activation": "",
"activationUrl": "",
"bulkAddress": json!({
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
}),
"deliveryContact": json!({
"address": json!({
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"email": "",
"fullPhoneNumber": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"phoneNumber": json!({
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
}),
"webAddress": ""
}),
"formFactor": ""
}),
"status": "",
"statusComment": "",
"statusReason": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/paymentInstruments/:id \
--header 'content-type: application/json' \
--data '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}'
echo '{
"balanceAccountId": "",
"card": {
"authentication": {
"email": "",
"password": "",
"phone": {
"number": "",
"type": ""
}
},
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": {
"activation": "",
"activationUrl": "",
"bulkAddress": {
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
},
"deliveryContact": {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"email": "",
"fullPhoneNumber": "",
"name": {
"firstName": "",
"lastName": ""
},
"phoneNumber": {
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
},
"webAddress": ""
},
"formFactor": ""
},
"status": "",
"statusComment": "",
"statusReason": ""
}' | \
http PATCH {{baseUrl}}/paymentInstruments/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "balanceAccountId": "",\n "card": {\n "authentication": {\n "email": "",\n "password": "",\n "phone": {\n "number": "",\n "type": ""\n }\n },\n "brand": "",\n "brandVariant": "",\n "cardholderName": "",\n "configuration": {\n "activation": "",\n "activationUrl": "",\n "bulkAddress": {\n "city": "",\n "company": "",\n "country": "",\n "email": "",\n "houseNumberOrName": "",\n "mobile": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "cardImageId": "",\n "carrier": "",\n "carrierImageId": "",\n "configurationProfileId": "",\n "currency": "",\n "envelope": "",\n "insert": "",\n "language": "",\n "logoImageId": "",\n "pinMailer": "",\n "shipmentMethod": ""\n },\n "deliveryContact": {\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "email": "",\n "fullPhoneNumber": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "phoneNumber": {\n "phoneCountryCode": "",\n "phoneNumber": "",\n "phoneType": ""\n },\n "webAddress": ""\n },\n "formFactor": ""\n },\n "status": "",\n "statusComment": "",\n "statusReason": ""\n}' \
--output-document \
- {{baseUrl}}/paymentInstruments/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"balanceAccountId": "",
"card": [
"authentication": [
"email": "",
"password": "",
"phone": [
"number": "",
"type": ""
]
],
"brand": "",
"brandVariant": "",
"cardholderName": "",
"configuration": [
"activation": "",
"activationUrl": "",
"bulkAddress": [
"city": "",
"company": "",
"country": "",
"email": "",
"houseNumberOrName": "",
"mobile": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"cardImageId": "",
"carrier": "",
"carrierImageId": "",
"configurationProfileId": "",
"currency": "",
"envelope": "",
"insert": "",
"language": "",
"logoImageId": "",
"pinMailer": "",
"shipmentMethod": ""
],
"deliveryContact": [
"address": [
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"email": "",
"fullPhoneNumber": "",
"name": [
"firstName": "",
"lastName": ""
],
"phoneNumber": [
"phoneCountryCode": "",
"phoneNumber": "",
"phoneType": ""
],
"webAddress": ""
],
"formFactor": ""
],
"status": "",
"statusComment": "",
"statusReason": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentInstruments/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
{
"balanceAccountId": "BA32272223222B5CM82WL892M",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mcdebit",
"cardholderName": "Simon Hopper",
"expiration": {
"month": "01",
"year": "2024"
},
"formFactor": "virtual",
"lastFour": "5785",
"number": "************5785"
},
"description": "S. Hopper - Main card",
"id": "PI3227C223222B5CMD278FKGS",
"issuingCountryCode": "GB",
"status": "inactive",
"type": "card"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"balanceAccountId": "BA32272223222B59CZ3T52DKZ",
"card": {
"bin": "555544",
"brand": "mc",
"brandVariant": "mcdebit",
"cardholderName": "Simon Hopper",
"expiration": {
"month": "01",
"year": "2024"
},
"formFactor": "virtual",
"lastFour": "5785",
"number": "************5785"
},
"description": "S. Hopper - Main card",
"id": "PI3227C223222B5CMD278FKGS",
"issuingCountryCode": "GB",
"status": "suspended",
"type": "card"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a balance platform
{{baseUrl}}/balancePlatforms/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balancePlatforms/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balancePlatforms/:id")
require "http/client"
url = "{{baseUrl}}/balancePlatforms/:id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balancePlatforms/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balancePlatforms/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balancePlatforms/:id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balancePlatforms/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balancePlatforms/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balancePlatforms/:id"))
.method("GET", 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}}/balancePlatforms/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balancePlatforms/:id")
.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('GET', '{{baseUrl}}/balancePlatforms/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/balancePlatforms/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balancePlatforms/:id';
const options = {method: 'GET'};
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}}/balancePlatforms/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balancePlatforms/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balancePlatforms/:id',
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: 'GET', url: '{{baseUrl}}/balancePlatforms/:id'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balancePlatforms/: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: 'GET', url: '{{baseUrl}}/balancePlatforms/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balancePlatforms/:id';
const options = {method: 'GET'};
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}}/balancePlatforms/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balancePlatforms/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balancePlatforms/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balancePlatforms/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/balancePlatforms/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balancePlatforms/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balancePlatforms/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balancePlatforms/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balancePlatforms/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balancePlatforms/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balancePlatforms/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balancePlatforms/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balancePlatforms/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balancePlatforms/:id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balancePlatforms/:id
http GET {{baseUrl}}/balancePlatforms/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balancePlatforms/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balancePlatforms/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"id": "YOUR_BALANCE_PLATFORM",
"status": "Active"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get all account holders under a balance platform
{{baseUrl}}/balancePlatforms/:id/accountHolders
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/balancePlatforms/:id/accountHolders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/balancePlatforms/:id/accountHolders")
require "http/client"
url = "{{baseUrl}}/balancePlatforms/:id/accountHolders"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/balancePlatforms/:id/accountHolders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/balancePlatforms/:id/accountHolders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/balancePlatforms/:id/accountHolders"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/balancePlatforms/:id/accountHolders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/balancePlatforms/:id/accountHolders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/balancePlatforms/:id/accountHolders"))
.method("GET", 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}}/balancePlatforms/:id/accountHolders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/balancePlatforms/:id/accountHolders")
.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('GET', '{{baseUrl}}/balancePlatforms/:id/accountHolders');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/balancePlatforms/:id/accountHolders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/balancePlatforms/:id/accountHolders';
const options = {method: 'GET'};
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}}/balancePlatforms/:id/accountHolders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/balancePlatforms/:id/accountHolders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/balancePlatforms/:id/accountHolders',
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: 'GET',
url: '{{baseUrl}}/balancePlatforms/:id/accountHolders'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/balancePlatforms/:id/accountHolders');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/balancePlatforms/:id/accountHolders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/balancePlatforms/:id/accountHolders';
const options = {method: 'GET'};
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}}/balancePlatforms/:id/accountHolders"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/balancePlatforms/:id/accountHolders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/balancePlatforms/:id/accountHolders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/balancePlatforms/:id/accountHolders');
echo $response->getBody();
setUrl('{{baseUrl}}/balancePlatforms/:id/accountHolders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/balancePlatforms/:id/accountHolders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/balancePlatforms/:id/accountHolders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/balancePlatforms/:id/accountHolders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/balancePlatforms/:id/accountHolders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/balancePlatforms/:id/accountHolders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/balancePlatforms/:id/accountHolders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/balancePlatforms/:id/accountHolders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/balancePlatforms/:id/accountHolders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/balancePlatforms/:id/accountHolders";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/balancePlatforms/:id/accountHolders
http GET {{baseUrl}}/balancePlatforms/:id/accountHolders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/balancePlatforms/:id/accountHolders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/balancePlatforms/:id/accountHolders")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"accountHolders": [
{
"description": "Test-305",
"id": "AH32272223222B5GFSNSXFFL9",
"legalEntityId": "LE3227C223222D5D8S5S33M4M",
"reference": "LegalEntity internal error test",
"status": "active"
},
{
"description": "Test-751",
"id": "AH32272223222B5GFSNVGFFM7",
"legalEntityId": "LE3227C223222D5D8S5TT3SRX",
"reference": "LegalEntity internal error test",
"status": "active"
},
{
"description": "Explorer Holder",
"id": "AH32272223222B5GFWNRFFVR6",
"legalEntityId": "LE3227C223222D5D8S5TT3SRX",
"reference": "Account from the Explorer Holder",
"status": "active"
}
],
"hasNext": true,
"hasPrevious": true
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
POST
Create a transaction rule
{{baseUrl}}/transactionRules
BODY json
{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactionRules");
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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/transactionRules" {:content-type :json
:form-params {:aggregationLevel ""
:description ""
:endDate ""
:entityKey {:entityReference ""
:entityType ""}
:interval {:dayOfMonth 0
:dayOfWeek ""
:duration {:unit ""
:value 0}
:timeOfDay ""
:timeZone ""
:type ""}
:outcomeType ""
:reference ""
:requestType ""
:ruleRestrictions {:activeNetworkTokens {:operation ""
:value 0}
:brandVariants {:operation ""
:value []}
:countries {:operation ""
:value []}
:dayOfWeek {:operation ""
:value []}
:differentCurrencies {:operation ""
:value false}
:entryModes {:operation ""
:value []}
:internationalTransaction {:operation ""
:value false}
:matchingTransactions {:operation ""
:value 0}
:mccs {:operation ""
:value []}
:merchantNames {:operation ""
:value [{:operation ""
:value ""}]}
:merchants {:operation ""
:value [{:acquirerId ""
:merchantId ""}]}
:processingTypes {:operation ""
:value []}
:timeOfDay {:operation ""
:value {:endTime ""
:startTime ""}}
:totalAmount {:operation ""
:value {:currency ""
:value 0}}}
:score 0
:startDate ""
:status ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/transactionRules"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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}}/transactionRules"),
Content = new StringContent("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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}}/transactionRules");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactionRules"
payload := strings.NewReader("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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/transactionRules HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1729
{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/transactionRules")
.setHeader("content-type", "application/json")
.setBody("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactionRules"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactionRules")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/transactionRules")
.header("content-type", "application/json")
.body("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {
entityReference: '',
entityType: ''
},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {
unit: '',
value: 0
},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {
operation: '',
value: 0
},
brandVariants: {
operation: '',
value: []
},
countries: {
operation: '',
value: []
},
dayOfWeek: {
operation: '',
value: []
},
differentCurrencies: {
operation: '',
value: false
},
entryModes: {
operation: '',
value: []
},
internationalTransaction: {
operation: '',
value: false
},
matchingTransactions: {
operation: '',
value: 0
},
mccs: {
operation: '',
value: []
},
merchantNames: {
operation: '',
value: [
{
operation: '',
value: ''
}
]
},
merchants: {
operation: '',
value: [
{
acquirerId: '',
merchantId: ''
}
]
},
processingTypes: {
operation: '',
value: []
},
timeOfDay: {
operation: '',
value: {
endTime: '',
startTime: ''
}
},
totalAmount: {
operation: '',
value: {
currency: '',
value: 0
}
}
},
score: 0,
startDate: '',
status: '',
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}}/transactionRules');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/transactionRules',
headers: {'content-type': 'application/json'},
data: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactionRules';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"aggregationLevel":"","description":"","endDate":"","entityKey":{"entityReference":"","entityType":""},"interval":{"dayOfMonth":0,"dayOfWeek":"","duration":{"unit":"","value":0},"timeOfDay":"","timeZone":"","type":""},"outcomeType":"","reference":"","requestType":"","ruleRestrictions":{"activeNetworkTokens":{"operation":"","value":0},"brandVariants":{"operation":"","value":[]},"countries":{"operation":"","value":[]},"dayOfWeek":{"operation":"","value":[]},"differentCurrencies":{"operation":"","value":false},"entryModes":{"operation":"","value":[]},"internationalTransaction":{"operation":"","value":false},"matchingTransactions":{"operation":"","value":0},"mccs":{"operation":"","value":[]},"merchantNames":{"operation":"","value":[{"operation":"","value":""}]},"merchants":{"operation":"","value":[{"acquirerId":"","merchantId":""}]},"processingTypes":{"operation":"","value":[]},"timeOfDay":{"operation":"","value":{"endTime":"","startTime":""}},"totalAmount":{"operation":"","value":{"currency":"","value":0}}},"score":0,"startDate":"","status":"","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}}/transactionRules',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "aggregationLevel": "",\n "description": "",\n "endDate": "",\n "entityKey": {\n "entityReference": "",\n "entityType": ""\n },\n "interval": {\n "dayOfMonth": 0,\n "dayOfWeek": "",\n "duration": {\n "unit": "",\n "value": 0\n },\n "timeOfDay": "",\n "timeZone": "",\n "type": ""\n },\n "outcomeType": "",\n "reference": "",\n "requestType": "",\n "ruleRestrictions": {\n "activeNetworkTokens": {\n "operation": "",\n "value": 0\n },\n "brandVariants": {\n "operation": "",\n "value": []\n },\n "countries": {\n "operation": "",\n "value": []\n },\n "dayOfWeek": {\n "operation": "",\n "value": []\n },\n "differentCurrencies": {\n "operation": "",\n "value": false\n },\n "entryModes": {\n "operation": "",\n "value": []\n },\n "internationalTransaction": {\n "operation": "",\n "value": false\n },\n "matchingTransactions": {\n "operation": "",\n "value": 0\n },\n "mccs": {\n "operation": "",\n "value": []\n },\n "merchantNames": {\n "operation": "",\n "value": [\n {\n "operation": "",\n "value": ""\n }\n ]\n },\n "merchants": {\n "operation": "",\n "value": [\n {\n "acquirerId": "",\n "merchantId": ""\n }\n ]\n },\n "processingTypes": {\n "operation": "",\n "value": []\n },\n "timeOfDay": {\n "operation": "",\n "value": {\n "endTime": "",\n "startTime": ""\n }\n },\n "totalAmount": {\n "operation": "",\n "value": {\n "currency": "",\n "value": 0\n }\n }\n },\n "score": 0,\n "startDate": "",\n "status": "",\n "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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactionRules")
.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/transactionRules',
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({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/transactionRules',
headers: {'content-type': 'application/json'},
body: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
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}}/transactionRules');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {
entityReference: '',
entityType: ''
},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {
unit: '',
value: 0
},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {
operation: '',
value: 0
},
brandVariants: {
operation: '',
value: []
},
countries: {
operation: '',
value: []
},
dayOfWeek: {
operation: '',
value: []
},
differentCurrencies: {
operation: '',
value: false
},
entryModes: {
operation: '',
value: []
},
internationalTransaction: {
operation: '',
value: false
},
matchingTransactions: {
operation: '',
value: 0
},
mccs: {
operation: '',
value: []
},
merchantNames: {
operation: '',
value: [
{
operation: '',
value: ''
}
]
},
merchants: {
operation: '',
value: [
{
acquirerId: '',
merchantId: ''
}
]
},
processingTypes: {
operation: '',
value: []
},
timeOfDay: {
operation: '',
value: {
endTime: '',
startTime: ''
}
},
totalAmount: {
operation: '',
value: {
currency: '',
value: 0
}
}
},
score: 0,
startDate: '',
status: '',
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}}/transactionRules',
headers: {'content-type': 'application/json'},
data: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactionRules';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"aggregationLevel":"","description":"","endDate":"","entityKey":{"entityReference":"","entityType":""},"interval":{"dayOfMonth":0,"dayOfWeek":"","duration":{"unit":"","value":0},"timeOfDay":"","timeZone":"","type":""},"outcomeType":"","reference":"","requestType":"","ruleRestrictions":{"activeNetworkTokens":{"operation":"","value":0},"brandVariants":{"operation":"","value":[]},"countries":{"operation":"","value":[]},"dayOfWeek":{"operation":"","value":[]},"differentCurrencies":{"operation":"","value":false},"entryModes":{"operation":"","value":[]},"internationalTransaction":{"operation":"","value":false},"matchingTransactions":{"operation":"","value":0},"mccs":{"operation":"","value":[]},"merchantNames":{"operation":"","value":[{"operation":"","value":""}]},"merchants":{"operation":"","value":[{"acquirerId":"","merchantId":""}]},"processingTypes":{"operation":"","value":[]},"timeOfDay":{"operation":"","value":{"endTime":"","startTime":""}},"totalAmount":{"operation":"","value":{"currency":"","value":0}}},"score":0,"startDate":"","status":"","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 = @{ @"aggregationLevel": @"",
@"description": @"",
@"endDate": @"",
@"entityKey": @{ @"entityReference": @"", @"entityType": @"" },
@"interval": @{ @"dayOfMonth": @0, @"dayOfWeek": @"", @"duration": @{ @"unit": @"", @"value": @0 }, @"timeOfDay": @"", @"timeZone": @"", @"type": @"" },
@"outcomeType": @"",
@"reference": @"",
@"requestType": @"",
@"ruleRestrictions": @{ @"activeNetworkTokens": @{ @"operation": @"", @"value": @0 }, @"brandVariants": @{ @"operation": @"", @"value": @[ ] }, @"countries": @{ @"operation": @"", @"value": @[ ] }, @"dayOfWeek": @{ @"operation": @"", @"value": @[ ] }, @"differentCurrencies": @{ @"operation": @"", @"value": @NO }, @"entryModes": @{ @"operation": @"", @"value": @[ ] }, @"internationalTransaction": @{ @"operation": @"", @"value": @NO }, @"matchingTransactions": @{ @"operation": @"", @"value": @0 }, @"mccs": @{ @"operation": @"", @"value": @[ ] }, @"merchantNames": @{ @"operation": @"", @"value": @[ @{ @"operation": @"", @"value": @"" } ] }, @"merchants": @{ @"operation": @"", @"value": @[ @{ @"acquirerId": @"", @"merchantId": @"" } ] }, @"processingTypes": @{ @"operation": @"", @"value": @[ ] }, @"timeOfDay": @{ @"operation": @"", @"value": @{ @"endTime": @"", @"startTime": @"" } }, @"totalAmount": @{ @"operation": @"", @"value": @{ @"currency": @"", @"value": @0 } } },
@"score": @0,
@"startDate": @"",
@"status": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactionRules"]
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}}/transactionRules" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactionRules",
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([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'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}}/transactionRules', [
'body' => '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactionRules');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactionRules');
$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}}/transactionRules' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactionRules' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/transactionRules", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactionRules"
payload = {
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": False
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": False
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactionRules"
payload <- "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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}}/transactionRules")
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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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/transactionRules') do |req|
req.body = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactionRules";
let payload = json!({
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": json!({
"entityReference": "",
"entityType": ""
}),
"interval": json!({
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": json!({
"unit": "",
"value": 0
}),
"timeOfDay": "",
"timeZone": "",
"type": ""
}),
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": json!({
"activeNetworkTokens": json!({
"operation": "",
"value": 0
}),
"brandVariants": json!({
"operation": "",
"value": ()
}),
"countries": json!({
"operation": "",
"value": ()
}),
"dayOfWeek": json!({
"operation": "",
"value": ()
}),
"differentCurrencies": json!({
"operation": "",
"value": false
}),
"entryModes": json!({
"operation": "",
"value": ()
}),
"internationalTransaction": json!({
"operation": "",
"value": false
}),
"matchingTransactions": json!({
"operation": "",
"value": 0
}),
"mccs": json!({
"operation": "",
"value": ()
}),
"merchantNames": json!({
"operation": "",
"value": (
json!({
"operation": "",
"value": ""
})
)
}),
"merchants": json!({
"operation": "",
"value": (
json!({
"acquirerId": "",
"merchantId": ""
})
)
}),
"processingTypes": json!({
"operation": "",
"value": ()
}),
"timeOfDay": json!({
"operation": "",
"value": json!({
"endTime": "",
"startTime": ""
})
}),
"totalAmount": json!({
"operation": "",
"value": json!({
"currency": "",
"value": 0
})
})
}),
"score": 0,
"startDate": "",
"status": "",
"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}}/transactionRules \
--header 'content-type: application/json' \
--data '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
echo '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}' | \
http POST {{baseUrl}}/transactionRules \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "aggregationLevel": "",\n "description": "",\n "endDate": "",\n "entityKey": {\n "entityReference": "",\n "entityType": ""\n },\n "interval": {\n "dayOfMonth": 0,\n "dayOfWeek": "",\n "duration": {\n "unit": "",\n "value": 0\n },\n "timeOfDay": "",\n "timeZone": "",\n "type": ""\n },\n "outcomeType": "",\n "reference": "",\n "requestType": "",\n "ruleRestrictions": {\n "activeNetworkTokens": {\n "operation": "",\n "value": 0\n },\n "brandVariants": {\n "operation": "",\n "value": []\n },\n "countries": {\n "operation": "",\n "value": []\n },\n "dayOfWeek": {\n "operation": "",\n "value": []\n },\n "differentCurrencies": {\n "operation": "",\n "value": false\n },\n "entryModes": {\n "operation": "",\n "value": []\n },\n "internationalTransaction": {\n "operation": "",\n "value": false\n },\n "matchingTransactions": {\n "operation": "",\n "value": 0\n },\n "mccs": {\n "operation": "",\n "value": []\n },\n "merchantNames": {\n "operation": "",\n "value": [\n {\n "operation": "",\n "value": ""\n }\n ]\n },\n "merchants": {\n "operation": "",\n "value": [\n {\n "acquirerId": "",\n "merchantId": ""\n }\n ]\n },\n "processingTypes": {\n "operation": "",\n "value": []\n },\n "timeOfDay": {\n "operation": "",\n "value": {\n "endTime": "",\n "startTime": ""\n }\n },\n "totalAmount": {\n "operation": "",\n "value": {\n "currency": "",\n "value": 0\n }\n }\n },\n "score": 0,\n "startDate": "",\n "status": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/transactionRules
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": [
"entityReference": "",
"entityType": ""
],
"interval": [
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": [
"unit": "",
"value": 0
],
"timeOfDay": "",
"timeZone": "",
"type": ""
],
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": [
"activeNetworkTokens": [
"operation": "",
"value": 0
],
"brandVariants": [
"operation": "",
"value": []
],
"countries": [
"operation": "",
"value": []
],
"dayOfWeek": [
"operation": "",
"value": []
],
"differentCurrencies": [
"operation": "",
"value": false
],
"entryModes": [
"operation": "",
"value": []
],
"internationalTransaction": [
"operation": "",
"value": false
],
"matchingTransactions": [
"operation": "",
"value": 0
],
"mccs": [
"operation": "",
"value": []
],
"merchantNames": [
"operation": "",
"value": [
[
"operation": "",
"value": ""
]
]
],
"merchants": [
"operation": "",
"value": [
[
"acquirerId": "",
"merchantId": ""
]
]
],
"processingTypes": [
"operation": "",
"value": []
],
"timeOfDay": [
"operation": "",
"value": [
"endTime": "",
"startTime": ""
]
],
"totalAmount": [
"operation": "",
"value": [
"currency": "",
"value": 0
]
]
],
"score": 0,
"startDate": "",
"status": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactionRules")! 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
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
DELETE
Delete a transaction rule
{{baseUrl}}/transactionRules/:transactionRuleId
QUERY PARAMS
transactionRuleId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactionRules/:transactionRuleId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/transactionRules/:transactionRuleId")
require "http/client"
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/transactionRules/:transactionRuleId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactionRules/:transactionRuleId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactionRules/:transactionRuleId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/transactionRules/:transactionRuleId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/transactionRules/:transactionRuleId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactionRules/:transactionRuleId"))
.method("DELETE", 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}}/transactionRules/:transactionRuleId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/transactionRules/:transactionRuleId")
.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('DELETE', '{{baseUrl}}/transactionRules/:transactionRuleId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {method: 'DELETE'};
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}}/transactionRules/:transactionRuleId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/transactionRules/:transactionRuleId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactionRules/:transactionRuleId',
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: 'DELETE',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/transactionRules/:transactionRuleId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {method: 'DELETE'};
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}}/transactionRules/:transactionRuleId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
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}}/transactionRules/:transactionRuleId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactionRules/:transactionRuleId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/transactionRules/:transactionRuleId');
echo $response->getBody();
setUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactionRules/:transactionRuleId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactionRules/:transactionRuleId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/transactionRules/:transactionRuleId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactionRules/:transactionRuleId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactionRules/:transactionRuleId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/transactionRules/:transactionRuleId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactionRules/:transactionRuleId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/transactionRules/:transactionRuleId
http DELETE {{baseUrl}}/transactionRules/:transactionRuleId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/transactionRules/:transactionRuleId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactionRules/:transactionRuleId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
{
"aggregationLevel": "paymentInstrument",
"description": "Up to 1000 EUR per card for the last 12 hours",
"entityKey": {
"entityReference": "PG3227C223222C5GXR3M5592Q",
"entityType": "paymentInstrumentGroup"
},
"id": "TR3227C223222C5GXT3DD5VCF",
"interval": {
"duration": {
"unit": "hours",
"value": 12
},
"timeZone": "UTC",
"type": "sliding"
},
"outcomeType": "hardBlock",
"reference": "myRule12345",
"requestType": "authorization",
"ruleRestrictions": {
"totalAmount": {
"operation": "greaterThan",
"value": {
"currency": "EUR",
"value": 100000
}
}
},
"type": "velocity"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
GET
Get a transaction rule
{{baseUrl}}/transactionRules/:transactionRuleId
QUERY PARAMS
transactionRuleId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactionRules/:transactionRuleId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/transactionRules/:transactionRuleId")
require "http/client"
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/transactionRules/:transactionRuleId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/transactionRules/:transactionRuleId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactionRules/:transactionRuleId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/transactionRules/:transactionRuleId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/transactionRules/:transactionRuleId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactionRules/:transactionRuleId"))
.method("GET", 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}}/transactionRules/:transactionRuleId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/transactionRules/:transactionRuleId")
.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('GET', '{{baseUrl}}/transactionRules/:transactionRuleId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {method: 'GET'};
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}}/transactionRules/:transactionRuleId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/transactionRules/:transactionRuleId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactionRules/:transactionRuleId',
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: 'GET',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/transactionRules/:transactionRuleId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/transactionRules/:transactionRuleId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {method: 'GET'};
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}}/transactionRules/:transactionRuleId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
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}}/transactionRules/:transactionRuleId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactionRules/:transactionRuleId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/transactionRules/:transactionRuleId');
echo $response->getBody();
setUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/transactionRules/:transactionRuleId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactionRules/:transactionRuleId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/transactionRules/:transactionRuleId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactionRules/:transactionRuleId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactionRules/:transactionRuleId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/transactionRules/:transactionRuleId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactionRules/:transactionRuleId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/transactionRules/:transactionRuleId
http GET {{baseUrl}}/transactionRules/:transactionRuleId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/transactionRules/:transactionRuleId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactionRules/:transactionRuleId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
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
{
"transactionRule": {
"description": "Only allow point-of-sale transactions",
"entityKey": {
"entityReference": "PI3227C223222B5FN65FN5NS9",
"entityType": "paymentInstrument"
},
"id": "TR32272223222B5GFSGFLFCHM",
"interval": {
"timeZone": "UTC",
"type": "perTransaction"
},
"outcomeType": "hardBlock",
"reference": "YOUR_REFERENCE_4F7346",
"requestType": "authorization",
"ruleRestrictions": {
"processingTypes": {
"operation": "noneMatch",
"value": [
"pos"
]
}
},
"startDate": "2022-08-02T16:07:00.851374+02:00",
"status": "active",
"type": "blockList"
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}
PATCH
Update a transaction rule
{{baseUrl}}/transactionRules/:transactionRuleId
QUERY PARAMS
transactionRuleId
BODY json
{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/transactionRules/:transactionRuleId");
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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/transactionRules/:transactionRuleId" {:content-type :json
:form-params {:aggregationLevel ""
:description ""
:endDate ""
:entityKey {:entityReference ""
:entityType ""}
:interval {:dayOfMonth 0
:dayOfWeek ""
:duration {:unit ""
:value 0}
:timeOfDay ""
:timeZone ""
:type ""}
:outcomeType ""
:reference ""
:requestType ""
:ruleRestrictions {:activeNetworkTokens {:operation ""
:value 0}
:brandVariants {:operation ""
:value []}
:countries {:operation ""
:value []}
:dayOfWeek {:operation ""
:value []}
:differentCurrencies {:operation ""
:value false}
:entryModes {:operation ""
:value []}
:internationalTransaction {:operation ""
:value false}
:matchingTransactions {:operation ""
:value 0}
:mccs {:operation ""
:value []}
:merchantNames {:operation ""
:value [{:operation ""
:value ""}]}
:merchants {:operation ""
:value [{:acquirerId ""
:merchantId ""}]}
:processingTypes {:operation ""
:value []}
:timeOfDay {:operation ""
:value {:endTime ""
:startTime ""}}
:totalAmount {:operation ""
:value {:currency ""
:value 0}}}
:score 0
:startDate ""
:status ""
:type ""}})
require "http/client"
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/transactionRules/:transactionRuleId"),
Content = new StringContent("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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}}/transactionRules/:transactionRuleId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/transactionRules/:transactionRuleId"
payload := strings.NewReader("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}
PATCH /baseUrl/transactionRules/:transactionRuleId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1729
{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/transactionRules/:transactionRuleId")
.setHeader("content-type", "application/json")
.setBody("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/transactionRules/:transactionRuleId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/transactionRules/:transactionRuleId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/transactionRules/:transactionRuleId")
.header("content-type", "application/json")
.body("{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
.asString();
const data = JSON.stringify({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {
entityReference: '',
entityType: ''
},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {
unit: '',
value: 0
},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {
operation: '',
value: 0
},
brandVariants: {
operation: '',
value: []
},
countries: {
operation: '',
value: []
},
dayOfWeek: {
operation: '',
value: []
},
differentCurrencies: {
operation: '',
value: false
},
entryModes: {
operation: '',
value: []
},
internationalTransaction: {
operation: '',
value: false
},
matchingTransactions: {
operation: '',
value: 0
},
mccs: {
operation: '',
value: []
},
merchantNames: {
operation: '',
value: [
{
operation: '',
value: ''
}
]
},
merchants: {
operation: '',
value: [
{
acquirerId: '',
merchantId: ''
}
]
},
processingTypes: {
operation: '',
value: []
},
timeOfDay: {
operation: '',
value: {
endTime: '',
startTime: ''
}
},
totalAmount: {
operation: '',
value: {
currency: '',
value: 0
}
}
},
score: 0,
startDate: '',
status: '',
type: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/transactionRules/:transactionRuleId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/transactionRules/:transactionRuleId',
headers: {'content-type': 'application/json'},
data: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"aggregationLevel":"","description":"","endDate":"","entityKey":{"entityReference":"","entityType":""},"interval":{"dayOfMonth":0,"dayOfWeek":"","duration":{"unit":"","value":0},"timeOfDay":"","timeZone":"","type":""},"outcomeType":"","reference":"","requestType":"","ruleRestrictions":{"activeNetworkTokens":{"operation":"","value":0},"brandVariants":{"operation":"","value":[]},"countries":{"operation":"","value":[]},"dayOfWeek":{"operation":"","value":[]},"differentCurrencies":{"operation":"","value":false},"entryModes":{"operation":"","value":[]},"internationalTransaction":{"operation":"","value":false},"matchingTransactions":{"operation":"","value":0},"mccs":{"operation":"","value":[]},"merchantNames":{"operation":"","value":[{"operation":"","value":""}]},"merchants":{"operation":"","value":[{"acquirerId":"","merchantId":""}]},"processingTypes":{"operation":"","value":[]},"timeOfDay":{"operation":"","value":{"endTime":"","startTime":""}},"totalAmount":{"operation":"","value":{"currency":"","value":0}}},"score":0,"startDate":"","status":"","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}}/transactionRules/:transactionRuleId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "aggregationLevel": "",\n "description": "",\n "endDate": "",\n "entityKey": {\n "entityReference": "",\n "entityType": ""\n },\n "interval": {\n "dayOfMonth": 0,\n "dayOfWeek": "",\n "duration": {\n "unit": "",\n "value": 0\n },\n "timeOfDay": "",\n "timeZone": "",\n "type": ""\n },\n "outcomeType": "",\n "reference": "",\n "requestType": "",\n "ruleRestrictions": {\n "activeNetworkTokens": {\n "operation": "",\n "value": 0\n },\n "brandVariants": {\n "operation": "",\n "value": []\n },\n "countries": {\n "operation": "",\n "value": []\n },\n "dayOfWeek": {\n "operation": "",\n "value": []\n },\n "differentCurrencies": {\n "operation": "",\n "value": false\n },\n "entryModes": {\n "operation": "",\n "value": []\n },\n "internationalTransaction": {\n "operation": "",\n "value": false\n },\n "matchingTransactions": {\n "operation": "",\n "value": 0\n },\n "mccs": {\n "operation": "",\n "value": []\n },\n "merchantNames": {\n "operation": "",\n "value": [\n {\n "operation": "",\n "value": ""\n }\n ]\n },\n "merchants": {\n "operation": "",\n "value": [\n {\n "acquirerId": "",\n "merchantId": ""\n }\n ]\n },\n "processingTypes": {\n "operation": "",\n "value": []\n },\n "timeOfDay": {\n "operation": "",\n "value": {\n "endTime": "",\n "startTime": ""\n }\n },\n "totalAmount": {\n "operation": "",\n "value": {\n "currency": "",\n "value": 0\n }\n }\n },\n "score": 0,\n "startDate": "",\n "status": "",\n "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 \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/transactionRules/:transactionRuleId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/transactionRules/:transactionRuleId',
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({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/transactionRules/:transactionRuleId',
headers: {'content-type': 'application/json'},
body: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
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('PATCH', '{{baseUrl}}/transactionRules/:transactionRuleId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {
entityReference: '',
entityType: ''
},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {
unit: '',
value: 0
},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {
operation: '',
value: 0
},
brandVariants: {
operation: '',
value: []
},
countries: {
operation: '',
value: []
},
dayOfWeek: {
operation: '',
value: []
},
differentCurrencies: {
operation: '',
value: false
},
entryModes: {
operation: '',
value: []
},
internationalTransaction: {
operation: '',
value: false
},
matchingTransactions: {
operation: '',
value: 0
},
mccs: {
operation: '',
value: []
},
merchantNames: {
operation: '',
value: [
{
operation: '',
value: ''
}
]
},
merchants: {
operation: '',
value: [
{
acquirerId: '',
merchantId: ''
}
]
},
processingTypes: {
operation: '',
value: []
},
timeOfDay: {
operation: '',
value: {
endTime: '',
startTime: ''
}
},
totalAmount: {
operation: '',
value: {
currency: '',
value: 0
}
}
},
score: 0,
startDate: '',
status: '',
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: 'PATCH',
url: '{{baseUrl}}/transactionRules/:transactionRuleId',
headers: {'content-type': 'application/json'},
data: {
aggregationLevel: '',
description: '',
endDate: '',
entityKey: {entityReference: '', entityType: ''},
interval: {
dayOfMonth: 0,
dayOfWeek: '',
duration: {unit: '', value: 0},
timeOfDay: '',
timeZone: '',
type: ''
},
outcomeType: '',
reference: '',
requestType: '',
ruleRestrictions: {
activeNetworkTokens: {operation: '', value: 0},
brandVariants: {operation: '', value: []},
countries: {operation: '', value: []},
dayOfWeek: {operation: '', value: []},
differentCurrencies: {operation: '', value: false},
entryModes: {operation: '', value: []},
internationalTransaction: {operation: '', value: false},
matchingTransactions: {operation: '', value: 0},
mccs: {operation: '', value: []},
merchantNames: {operation: '', value: [{operation: '', value: ''}]},
merchants: {operation: '', value: [{acquirerId: '', merchantId: ''}]},
processingTypes: {operation: '', value: []},
timeOfDay: {operation: '', value: {endTime: '', startTime: ''}},
totalAmount: {operation: '', value: {currency: '', value: 0}}
},
score: 0,
startDate: '',
status: '',
type: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/transactionRules/:transactionRuleId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"aggregationLevel":"","description":"","endDate":"","entityKey":{"entityReference":"","entityType":""},"interval":{"dayOfMonth":0,"dayOfWeek":"","duration":{"unit":"","value":0},"timeOfDay":"","timeZone":"","type":""},"outcomeType":"","reference":"","requestType":"","ruleRestrictions":{"activeNetworkTokens":{"operation":"","value":0},"brandVariants":{"operation":"","value":[]},"countries":{"operation":"","value":[]},"dayOfWeek":{"operation":"","value":[]},"differentCurrencies":{"operation":"","value":false},"entryModes":{"operation":"","value":[]},"internationalTransaction":{"operation":"","value":false},"matchingTransactions":{"operation":"","value":0},"mccs":{"operation":"","value":[]},"merchantNames":{"operation":"","value":[{"operation":"","value":""}]},"merchants":{"operation":"","value":[{"acquirerId":"","merchantId":""}]},"processingTypes":{"operation":"","value":[]},"timeOfDay":{"operation":"","value":{"endTime":"","startTime":""}},"totalAmount":{"operation":"","value":{"currency":"","value":0}}},"score":0,"startDate":"","status":"","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 = @{ @"aggregationLevel": @"",
@"description": @"",
@"endDate": @"",
@"entityKey": @{ @"entityReference": @"", @"entityType": @"" },
@"interval": @{ @"dayOfMonth": @0, @"dayOfWeek": @"", @"duration": @{ @"unit": @"", @"value": @0 }, @"timeOfDay": @"", @"timeZone": @"", @"type": @"" },
@"outcomeType": @"",
@"reference": @"",
@"requestType": @"",
@"ruleRestrictions": @{ @"activeNetworkTokens": @{ @"operation": @"", @"value": @0 }, @"brandVariants": @{ @"operation": @"", @"value": @[ ] }, @"countries": @{ @"operation": @"", @"value": @[ ] }, @"dayOfWeek": @{ @"operation": @"", @"value": @[ ] }, @"differentCurrencies": @{ @"operation": @"", @"value": @NO }, @"entryModes": @{ @"operation": @"", @"value": @[ ] }, @"internationalTransaction": @{ @"operation": @"", @"value": @NO }, @"matchingTransactions": @{ @"operation": @"", @"value": @0 }, @"mccs": @{ @"operation": @"", @"value": @[ ] }, @"merchantNames": @{ @"operation": @"", @"value": @[ @{ @"operation": @"", @"value": @"" } ] }, @"merchants": @{ @"operation": @"", @"value": @[ @{ @"acquirerId": @"", @"merchantId": @"" } ] }, @"processingTypes": @{ @"operation": @"", @"value": @[ ] }, @"timeOfDay": @{ @"operation": @"", @"value": @{ @"endTime": @"", @"startTime": @"" } }, @"totalAmount": @{ @"operation": @"", @"value": @{ @"currency": @"", @"value": @0 } } },
@"score": @0,
@"startDate": @"",
@"status": @"",
@"type": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/transactionRules/:transactionRuleId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[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}}/transactionRules/:transactionRuleId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/transactionRules/:transactionRuleId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'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('PATCH', '{{baseUrl}}/transactionRules/:transactionRuleId', [
'body' => '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'type' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'aggregationLevel' => '',
'description' => '',
'endDate' => '',
'entityKey' => [
'entityReference' => '',
'entityType' => ''
],
'interval' => [
'dayOfMonth' => 0,
'dayOfWeek' => '',
'duration' => [
'unit' => '',
'value' => 0
],
'timeOfDay' => '',
'timeZone' => '',
'type' => ''
],
'outcomeType' => '',
'reference' => '',
'requestType' => '',
'ruleRestrictions' => [
'activeNetworkTokens' => [
'operation' => '',
'value' => 0
],
'brandVariants' => [
'operation' => '',
'value' => [
]
],
'countries' => [
'operation' => '',
'value' => [
]
],
'dayOfWeek' => [
'operation' => '',
'value' => [
]
],
'differentCurrencies' => [
'operation' => '',
'value' => null
],
'entryModes' => [
'operation' => '',
'value' => [
]
],
'internationalTransaction' => [
'operation' => '',
'value' => null
],
'matchingTransactions' => [
'operation' => '',
'value' => 0
],
'mccs' => [
'operation' => '',
'value' => [
]
],
'merchantNames' => [
'operation' => '',
'value' => [
[
'operation' => '',
'value' => ''
]
]
],
'merchants' => [
'operation' => '',
'value' => [
[
'acquirerId' => '',
'merchantId' => ''
]
]
],
'processingTypes' => [
'operation' => '',
'value' => [
]
],
'timeOfDay' => [
'operation' => '',
'value' => [
'endTime' => '',
'startTime' => ''
]
],
'totalAmount' => [
'operation' => '',
'value' => [
'currency' => '',
'value' => 0
]
]
],
'score' => 0,
'startDate' => '',
'status' => '',
'type' => ''
]));
$request->setRequestUrl('{{baseUrl}}/transactionRules/:transactionRuleId');
$request->setRequestMethod('PATCH');
$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}}/transactionRules/:transactionRuleId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/transactionRules/:transactionRuleId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/transactionRules/:transactionRuleId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/transactionRules/:transactionRuleId"
payload = {
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": False
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": False
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/transactionRules/:transactionRuleId"
payload <- "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/transactionRules/:transactionRuleId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"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.patch('/baseUrl/transactionRules/:transactionRuleId') do |req|
req.body = "{\n \"aggregationLevel\": \"\",\n \"description\": \"\",\n \"endDate\": \"\",\n \"entityKey\": {\n \"entityReference\": \"\",\n \"entityType\": \"\"\n },\n \"interval\": {\n \"dayOfMonth\": 0,\n \"dayOfWeek\": \"\",\n \"duration\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"timeOfDay\": \"\",\n \"timeZone\": \"\",\n \"type\": \"\"\n },\n \"outcomeType\": \"\",\n \"reference\": \"\",\n \"requestType\": \"\",\n \"ruleRestrictions\": {\n \"activeNetworkTokens\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"brandVariants\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"countries\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"dayOfWeek\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"differentCurrencies\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"entryModes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"internationalTransaction\": {\n \"operation\": \"\",\n \"value\": false\n },\n \"matchingTransactions\": {\n \"operation\": \"\",\n \"value\": 0\n },\n \"mccs\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"merchantNames\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"operation\": \"\",\n \"value\": \"\"\n }\n ]\n },\n \"merchants\": {\n \"operation\": \"\",\n \"value\": [\n {\n \"acquirerId\": \"\",\n \"merchantId\": \"\"\n }\n ]\n },\n \"processingTypes\": {\n \"operation\": \"\",\n \"value\": []\n },\n \"timeOfDay\": {\n \"operation\": \"\",\n \"value\": {\n \"endTime\": \"\",\n \"startTime\": \"\"\n }\n },\n \"totalAmount\": {\n \"operation\": \"\",\n \"value\": {\n \"currency\": \"\",\n \"value\": 0\n }\n }\n },\n \"score\": 0,\n \"startDate\": \"\",\n \"status\": \"\",\n \"type\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/transactionRules/:transactionRuleId";
let payload = json!({
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": json!({
"entityReference": "",
"entityType": ""
}),
"interval": json!({
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": json!({
"unit": "",
"value": 0
}),
"timeOfDay": "",
"timeZone": "",
"type": ""
}),
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": json!({
"activeNetworkTokens": json!({
"operation": "",
"value": 0
}),
"brandVariants": json!({
"operation": "",
"value": ()
}),
"countries": json!({
"operation": "",
"value": ()
}),
"dayOfWeek": json!({
"operation": "",
"value": ()
}),
"differentCurrencies": json!({
"operation": "",
"value": false
}),
"entryModes": json!({
"operation": "",
"value": ()
}),
"internationalTransaction": json!({
"operation": "",
"value": false
}),
"matchingTransactions": json!({
"operation": "",
"value": 0
}),
"mccs": json!({
"operation": "",
"value": ()
}),
"merchantNames": json!({
"operation": "",
"value": (
json!({
"operation": "",
"value": ""
})
)
}),
"merchants": json!({
"operation": "",
"value": (
json!({
"acquirerId": "",
"merchantId": ""
})
)
}),
"processingTypes": json!({
"operation": "",
"value": ()
}),
"timeOfDay": json!({
"operation": "",
"value": json!({
"endTime": "",
"startTime": ""
})
}),
"totalAmount": json!({
"operation": "",
"value": json!({
"currency": "",
"value": 0
})
})
}),
"score": 0,
"startDate": "",
"status": "",
"type": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/transactionRules/:transactionRuleId \
--header 'content-type: application/json' \
--data '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}'
echo '{
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": {
"entityReference": "",
"entityType": ""
},
"interval": {
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": {
"unit": "",
"value": 0
},
"timeOfDay": "",
"timeZone": "",
"type": ""
},
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": {
"activeNetworkTokens": {
"operation": "",
"value": 0
},
"brandVariants": {
"operation": "",
"value": []
},
"countries": {
"operation": "",
"value": []
},
"dayOfWeek": {
"operation": "",
"value": []
},
"differentCurrencies": {
"operation": "",
"value": false
},
"entryModes": {
"operation": "",
"value": []
},
"internationalTransaction": {
"operation": "",
"value": false
},
"matchingTransactions": {
"operation": "",
"value": 0
},
"mccs": {
"operation": "",
"value": []
},
"merchantNames": {
"operation": "",
"value": [
{
"operation": "",
"value": ""
}
]
},
"merchants": {
"operation": "",
"value": [
{
"acquirerId": "",
"merchantId": ""
}
]
},
"processingTypes": {
"operation": "",
"value": []
},
"timeOfDay": {
"operation": "",
"value": {
"endTime": "",
"startTime": ""
}
},
"totalAmount": {
"operation": "",
"value": {
"currency": "",
"value": 0
}
}
},
"score": 0,
"startDate": "",
"status": "",
"type": ""
}' | \
http PATCH {{baseUrl}}/transactionRules/:transactionRuleId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "aggregationLevel": "",\n "description": "",\n "endDate": "",\n "entityKey": {\n "entityReference": "",\n "entityType": ""\n },\n "interval": {\n "dayOfMonth": 0,\n "dayOfWeek": "",\n "duration": {\n "unit": "",\n "value": 0\n },\n "timeOfDay": "",\n "timeZone": "",\n "type": ""\n },\n "outcomeType": "",\n "reference": "",\n "requestType": "",\n "ruleRestrictions": {\n "activeNetworkTokens": {\n "operation": "",\n "value": 0\n },\n "brandVariants": {\n "operation": "",\n "value": []\n },\n "countries": {\n "operation": "",\n "value": []\n },\n "dayOfWeek": {\n "operation": "",\n "value": []\n },\n "differentCurrencies": {\n "operation": "",\n "value": false\n },\n "entryModes": {\n "operation": "",\n "value": []\n },\n "internationalTransaction": {\n "operation": "",\n "value": false\n },\n "matchingTransactions": {\n "operation": "",\n "value": 0\n },\n "mccs": {\n "operation": "",\n "value": []\n },\n "merchantNames": {\n "operation": "",\n "value": [\n {\n "operation": "",\n "value": ""\n }\n ]\n },\n "merchants": {\n "operation": "",\n "value": [\n {\n "acquirerId": "",\n "merchantId": ""\n }\n ]\n },\n "processingTypes": {\n "operation": "",\n "value": []\n },\n "timeOfDay": {\n "operation": "",\n "value": {\n "endTime": "",\n "startTime": ""\n }\n },\n "totalAmount": {\n "operation": "",\n "value": {\n "currency": "",\n "value": 0\n }\n }\n },\n "score": 0,\n "startDate": "",\n "status": "",\n "type": ""\n}' \
--output-document \
- {{baseUrl}}/transactionRules/:transactionRuleId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"aggregationLevel": "",
"description": "",
"endDate": "",
"entityKey": [
"entityReference": "",
"entityType": ""
],
"interval": [
"dayOfMonth": 0,
"dayOfWeek": "",
"duration": [
"unit": "",
"value": 0
],
"timeOfDay": "",
"timeZone": "",
"type": ""
],
"outcomeType": "",
"reference": "",
"requestType": "",
"ruleRestrictions": [
"activeNetworkTokens": [
"operation": "",
"value": 0
],
"brandVariants": [
"operation": "",
"value": []
],
"countries": [
"operation": "",
"value": []
],
"dayOfWeek": [
"operation": "",
"value": []
],
"differentCurrencies": [
"operation": "",
"value": false
],
"entryModes": [
"operation": "",
"value": []
],
"internationalTransaction": [
"operation": "",
"value": false
],
"matchingTransactions": [
"operation": "",
"value": 0
],
"mccs": [
"operation": "",
"value": []
],
"merchantNames": [
"operation": "",
"value": [
[
"operation": "",
"value": ""
]
]
],
"merchants": [
"operation": "",
"value": [
[
"acquirerId": "",
"merchantId": ""
]
]
],
"processingTypes": [
"operation": "",
"value": []
],
"timeOfDay": [
"operation": "",
"value": [
"endTime": "",
"startTime": ""
]
],
"totalAmount": [
"operation": "",
"value": [
"currency": "",
"value": 0
]
]
],
"score": 0,
"startDate": "",
"status": "",
"type": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/transactionRules/:transactionRuleId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
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
{
"aggregationLevel": "paymentInstrument",
"description": "Up to 1000 EUR per card for the last 12 hours",
"entityKey": {
"entityReference": "PG3227C223222C5GXR3M5592Q",
"entityType": "paymentInstrumentGroup"
},
"id": "TR3227C223222C5GXR3XP596N",
"interval": {
"duration": {
"unit": "hours",
"value": 12
},
"timeZone": "UTC",
"type": "sliding"
},
"outcomeType": "hardBlock",
"reference": "YOUR_REFERENCE_2918A",
"requestType": "authorization",
"ruleRestrictions": {
"totalAmount": {
"operation": "greaterThan",
"value": {
"currency": "EUR",
"value": 100000
}
}
},
"startDate": "2022-11-17T00:07:09.10057663+01:00",
"status": "inactive",
"type": "velocity"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Empty input which would have resulted in a null result.",
"errorCode": "00_400",
"status": 400,
"title": "Bad request",
"type": "https://docs.adyen.com/errors/general/bad-request"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not authorized to access this service.",
"errorCode": "00_401",
"status": 401,
"title": "Unauthorized",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Not the right permission to access this service.",
"errorCode": "00_403",
"status": 403,
"title": "Forbidden",
"type": "https://docs.adyen.com/errors/security/unauthorized"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "The balanceAccountId can only be changed when the status is Inactive or Requested",
"errorCode": "30_031",
"requestId": "1W1UI15PLVGC9V8O",
"status": 422,
"title": "Invalid Payment Instrument information provided",
"type": "https://docs.adyen.com/errors/general/invalid-field-value"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Unrecoverable error while trying to create payment instrument",
"errorCode": "00_500",
"requestId": "1WAF555PLWNTLYOQ",
"status": 500,
"title": "An internal error happened",
"type": "https://docs.adyen.com/errors/general/internal"
}