Management API
GET
Get a company account
{{baseUrl}}/companies/:companyId
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId"
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}}/companies/:companyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId"
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/companies/:companyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId"))
.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}}/companies/:companyId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId")
.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}}/companies/:companyId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/companies/:companyId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId';
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}}/companies/:companyId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId',
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}}/companies/:companyId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId');
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}}/companies/:companyId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId';
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}}/companies/:companyId"]
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}}/companies/:companyId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId",
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}}/companies/:companyId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId")
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/companies/:companyId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId";
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}}/companies/:companyId
http GET {{baseUrl}}/companies/:companyId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId")! 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
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"users": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks"
}
},
"dataCenters": [
{
"livePrefix": "",
"name": "default"
}
],
"id": "YOUR_COMPANY_ACCOUNT",
"name": "YOUR_SHOP_NAME",
"status": "Active"
}
GET
Get a list of company accounts
{{baseUrl}}/companies
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies")
require "http/client"
url = "{{baseUrl}}/companies"
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}}/companies"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies"
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/companies HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies"))
.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}}/companies")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies")
.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}}/companies');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/companies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies';
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}}/companies',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies',
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}}/companies'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies');
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}}/companies'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies';
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}}/companies"]
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}}/companies" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies",
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}}/companies');
echo $response->getBody();
setUrl('{{baseUrl}}/companies');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies")
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/companies') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies";
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}}/companies
http GET {{baseUrl}}/companies
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/companies?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/companies?pageNumber=1&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"users": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks"
}
},
"dataCenters": [
{
"livePrefix": "",
"name": "default"
}
],
"id": "YOUR_COMPANY_ACCOUNT",
"name": "YOUR_COMPANY_NAME",
"status": "Active"
}
],
"itemsTotal": 1,
"pagesTotal": 1
}
GET
Get a list of merchant accounts
{{baseUrl}}/companies/:companyId/merchants
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/merchants");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/merchants")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/merchants"
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}}/companies/:companyId/merchants"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/merchants");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/merchants"
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/companies/:companyId/merchants HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/merchants")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/merchants"))
.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}}/companies/:companyId/merchants")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/merchants")
.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}}/companies/:companyId/merchants');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/merchants'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/merchants';
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}}/companies/:companyId/merchants',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/merchants")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/merchants',
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}}/companies/:companyId/merchants'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/merchants');
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}}/companies/:companyId/merchants'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/merchants';
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}}/companies/:companyId/merchants"]
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}}/companies/:companyId/merchants" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/merchants",
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}}/companies/:companyId/merchants');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/merchants');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/merchants');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/merchants' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/merchants' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/merchants")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/merchants"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/merchants"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/merchants")
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/companies/:companyId/merchants') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/merchants";
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}}/companies/:companyId/merchants
http GET {{baseUrl}}/companies/:companyId/merchants
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/merchants
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/merchants")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/merchants?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/merchants?pageNumber=3&pageSize=10"
},
"next": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/merchants?pageNumber=2&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/merchants?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_1",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_1",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_1",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "POS",
"id": "YOUR_MERCHANT_ACCOUNT_2",
"merchantCity": "",
"name": "YOUR_MERCHANT_NAME_2",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_2",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/webhooks"
}
},
"id": "YOUR_MERCHANT_ACCOUNT_3",
"merchantCity": "Amsterdam",
"primarySettlementCurrency": "EUR",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_4",
"merchantCity": "Sao Paulo",
"name": "YOUR_MERCHANT_NAME_4",
"primarySettlementCurrency": "BRL",
"shopWebAddress": "YOUR_SHOP_URL_4",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/webhooks"
}
},
"captureDelay": "3",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_5",
"name": "YOUR_MERCHANT_NAME_5",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_5",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_6/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_6"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_6/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_6/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_6",
"merchantCity": "Zagreb",
"name": "YOUR_MERCHANT_NAME_6",
"primarySettlementCurrency": "BRL",
"shopWebAddress": "YOUR_SHOP_URL_6",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/webhooks"
}
},
"captureDelay": "manual",
"defaultShopperInteraction": "Moto",
"id": "YOUR_MERCHANT_ACCOUNT_7",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_7",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_7",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_8",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_8",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_8",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/webhooks"
}
},
"captureDelay": "3",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_9",
"merchantCity": "",
"name": "YOUR_MERCHANT_NAME_9",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_9",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/webhooks"
}
},
"captureDelay": "manual",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_10",
"merchantCity": "Paris",
"name": "YOUR_MERCHANT_NAME_10",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_10",
"status": "Active"
}
],
"itemsTotal": 22,
"pagesTotal": 3
}
POST
Create a merchant account
{{baseUrl}}/merchants
BODY json
{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants");
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 \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants" {:content-type :json
:form-params {:businessLineId ""
:companyId ""
:description ""
:legalEntityId ""
:pricingPlan ""
:reference ""
:salesChannels []}})
require "http/client"
url = "{{baseUrl}}/merchants"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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}}/merchants"),
Content = new StringContent("{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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}}/merchants");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants"
payload := strings.NewReader("{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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/merchants HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 152
{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants")
.setHeader("content-type", "application/json")
.setBody("{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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 \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants")
.header("content-type", "application/json")
.body("{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}")
.asString();
const data = JSON.stringify({
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants',
headers: {'content-type': 'application/json'},
data: {
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"businessLineId":"","companyId":"","description":"","legalEntityId":"","pricingPlan":"","reference":"","salesChannels":[]}'
};
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}}/merchants',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "businessLineId": "",\n "companyId": "",\n "description": "",\n "legalEntityId": "",\n "pricingPlan": "",\n "reference": "",\n "salesChannels": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants")
.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/merchants',
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({
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants',
headers: {'content-type': 'application/json'},
body: {
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
},
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}}/merchants');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
});
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}}/merchants',
headers: {'content-type': 'application/json'},
data: {
businessLineId: '',
companyId: '',
description: '',
legalEntityId: '',
pricingPlan: '',
reference: '',
salesChannels: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"businessLineId":"","companyId":"","description":"","legalEntityId":"","pricingPlan":"","reference":"","salesChannels":[]}'
};
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 = @{ @"businessLineId": @"",
@"companyId": @"",
@"description": @"",
@"legalEntityId": @"",
@"pricingPlan": @"",
@"reference": @"",
@"salesChannels": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants"]
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}}/merchants" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants",
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([
'businessLineId' => '',
'companyId' => '',
'description' => '',
'legalEntityId' => '',
'pricingPlan' => '',
'reference' => '',
'salesChannels' => [
]
]),
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}}/merchants', [
'body' => '{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'businessLineId' => '',
'companyId' => '',
'description' => '',
'legalEntityId' => '',
'pricingPlan' => '',
'reference' => '',
'salesChannels' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'businessLineId' => '',
'companyId' => '',
'description' => '',
'legalEntityId' => '',
'pricingPlan' => '',
'reference' => '',
'salesChannels' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants');
$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}}/merchants' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants"
payload = {
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants"
payload <- "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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}}/merchants")
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 \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\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/merchants') do |req|
req.body = "{\n \"businessLineId\": \"\",\n \"companyId\": \"\",\n \"description\": \"\",\n \"legalEntityId\": \"\",\n \"pricingPlan\": \"\",\n \"reference\": \"\",\n \"salesChannels\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants";
let payload = json!({
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": ()
});
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}}/merchants \
--header 'content-type: application/json' \
--data '{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}'
echo '{
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
}' | \
http POST {{baseUrl}}/merchants \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "businessLineId": "",\n "companyId": "",\n "description": "",\n "legalEntityId": "",\n "pricingPlan": "",\n "reference": "",\n "salesChannels": []\n}' \
--output-document \
- {{baseUrl}}/merchants
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"businessLineId": "",
"companyId": "",
"description": "",
"legalEntityId": "",
"pricingPlan": "",
"reference": "",
"salesChannels": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants")! 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
{
"businessLineId": "YOUR_BUSINESS_LINE_ID",
"companyId": "YOUR_COMPANY_ACCOUNT",
"description": "YOUR_DESCRIPTION",
"id": "YOUR_OWN_REFERENCE",
"legalEntityId": "YOUR_LEGAL_ENTITY_ID",
"reference": "YOUR_OWN_REFERENCE"
}
GET
Get a list of merchant accounts (GET)
{{baseUrl}}/merchants
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants")
require "http/client"
url = "{{baseUrl}}/merchants"
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}}/merchants"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants"
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/merchants HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants"))
.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}}/merchants")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants")
.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}}/merchants');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/merchants'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants';
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}}/merchants',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants',
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}}/merchants'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants');
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}}/merchants'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants';
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}}/merchants"]
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}}/merchants" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants",
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}}/merchants');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants")
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/merchants') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants";
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}}/merchants
http GET {{baseUrl}}/merchants
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/merchants?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/merchants?pageNumber=3&pageSize=10"
},
"next": {
"href": "https://management-test.adyen.com/v1/merchants?pageNumber=2&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_1/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_1",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_1",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_1",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_2/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "POS",
"id": "YOUR_MERCHANT_ACCOUNT_2",
"merchantCity": "",
"name": "YOUR_MERCHANT_NAME_2",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_2",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_3/webhooks"
}
},
"id": "YOUR_MERCHANT_ACCOUNT_3",
"merchantCity": "Amsterdam",
"primarySettlementCurrency": "EUR",
"status": "YOUR_MERCHANT_NAME_3"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_4/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_4",
"merchantCity": "Sao Paulo",
"name": "YOUR_MERCHANT_NAME_4",
"primarySettlementCurrency": "BRL",
"shopWebAddress": "YOUR_SHOP_URL_4",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_5/webhooks"
}
},
"captureDelay": "3",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_5",
"name": "YOUR_MERCHANT_NAME_5",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_5",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_NAME_6/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_NAME_6"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_NAME_6/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_NAME_6/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_6",
"merchantCity": "Zagreb",
"name": "YOUR_MERCHANT_NAME_6",
"primarySettlementCurrency": "BRL",
"shopWebAddress": "YOUR_SHOP_URL_6",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_7/webhooks"
}
},
"captureDelay": "manual",
"defaultShopperInteraction": "Moto",
"id": "YOUR_MERCHANT_ACCOUNT_7",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_7",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_7",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_8/webhooks"
}
},
"captureDelay": "immediate",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_8",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME_8",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_8",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_9/webhooks"
}
},
"captureDelay": "3",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_9",
"merchantCity": "",
"name": "YOUR_MERCHANT_NAME_9",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_9",
"status": "Active"
},
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_10/webhooks"
}
},
"captureDelay": "manual",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT_10",
"merchantCity": "Paris",
"name": "YOUR_MERCHANT_NAME_10",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL_10",
"status": "Active"
}
],
"itemsTotal": 23,
"pagesTotal": 3
}
GET
Get a merchant account
{{baseUrl}}/merchants/:merchantId
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId"
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}}/merchants/:merchantId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId"
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/merchants/:merchantId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId"))
.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}}/merchants/:merchantId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId")
.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}}/merchants/:merchantId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/merchants/:merchantId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId';
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}}/merchants/:merchantId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId',
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}}/merchants/:merchantId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId');
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}}/merchants/:merchantId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId';
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}}/merchants/:merchantId"]
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}}/merchants/:merchantId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId",
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}}/merchants/:merchantId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId")
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/merchants/:merchantId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId";
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}}/merchants/:merchantId
http GET {{baseUrl}}/merchants/:merchantId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId")! 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
{
"_links": {
"apiCredentials": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"users": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/users"
},
"webhooks": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks"
}
},
"captureDelay": "manual",
"defaultShopperInteraction": "Ecommerce",
"id": "YOUR_MERCHANT_ACCOUNT",
"merchantCity": "Amsterdam",
"name": "YOUR_MERCHANT_NAME",
"primarySettlementCurrency": "EUR",
"shopWebAddress": "YOUR_SHOP_URL",
"status": "Active"
}
POST
Request to activate a merchant account
{{baseUrl}}/merchants/:merchantId/activate
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/activate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/activate")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/activate"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/activate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/activate");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/activate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/activate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/activate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/activate"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/activate")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/activate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/activate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/activate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/activate',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/activate")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/activate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/activate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/activate');
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}}/merchants/:merchantId/activate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/activate';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchants/:merchantId/activate" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/activate');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/activate');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/activate');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/activate' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/activate' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/merchants/:merchantId/activate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/activate"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/activate"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/merchants/:merchantId/activate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/activate";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/activate
http POST {{baseUrl}}/merchants/:merchantId/activate
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/merchants/:merchantId/activate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Create a store (POST)
{{baseUrl}}/stores
BODY json
{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/stores" {:content-type :json
:form-params {:address {:city ""
:country ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:businessLineIds []
:description ""
:externalReferenceId ""
:merchantId ""
:phoneNumber ""
:reference ""
:shopperStatement ""
:splitConfiguration {:balanceAccountId ""
:splitConfigurationId ""}}})
require "http/client"
url = "{{baseUrl}}/stores"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/stores"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\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}}/stores");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/stores HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 407
{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/stores")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\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 \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/stores")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/stores")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/stores');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/stores',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","merchantId":"","phoneNumber":"","reference":"","shopperStatement":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""}}'
};
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}}/stores',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "merchantId": "",\n "phoneNumber": "",\n "reference": "",\n "shopperStatement": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\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 \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/stores")
.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/stores',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/stores',
headers: {'content-type': 'application/json'},
body: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
},
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}}/stores');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
}
});
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}}/stores',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
merchantId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","merchantId":"","phoneNumber":"","reference":"","shopperStatement":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"country": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" },
@"businessLineIds": @[ ],
@"description": @"",
@"externalReferenceId": @"",
@"merchantId": @"",
@"phoneNumber": @"",
@"reference": @"",
@"shopperStatement": @"",
@"splitConfiguration": @{ @"balanceAccountId": @"", @"splitConfigurationId": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stores"]
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}}/stores" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'merchantId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]),
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}}/stores', [
'body' => '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/stores');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'merchantId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'merchantId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/stores');
$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}}/stores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/stores", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores"
payload = {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/stores') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"merchantId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stores";
let payload = json!({
"address": json!({
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"businessLineIds": (),
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": json!({
"balanceAccountId": "",
"splitConfigurationId": ""
})
});
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}}/stores \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
echo '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}' | \
http POST {{baseUrl}}/stores \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "merchantId": "",\n "phoneNumber": "",\n "reference": "",\n "shopperStatement": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n }\n}' \
--output-document \
- {{baseUrl}}/stores
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"merchantId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": [
"balanceAccountId": "",
"splitConfigurationId": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/YOUR_STORE_ID"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"id": "YOUR_STORE_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Spring_store_2",
"shopperStatement": "Springfield Shop",
"status": "active"
}
POST
Create a store
{{baseUrl}}/merchants/:merchantId/stores
QUERY PARAMS
merchantId
BODY json
{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/stores" {:content-type :json
:form-params {:address {:city ""
:country ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:businessLineIds []
:description ""
:externalReferenceId ""
:phoneNumber ""
:reference ""
:shopperStatement ""
:splitConfiguration {:balanceAccountId ""
:splitConfigurationId ""}}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/stores"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\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}}/merchants/:merchantId/stores");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/stores HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 387
{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/stores")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\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 \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/stores")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/stores');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/stores',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","phoneNumber":"","reference":"","shopperStatement":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""}}'
};
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}}/merchants/:merchantId/stores',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "phoneNumber": "",\n "reference": "",\n "shopperStatement": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\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 \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores")
.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/merchants/:merchantId/stores',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/stores',
headers: {'content-type': 'application/json'},
body: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
},
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}}/merchants/:merchantId/stores');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
}
});
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}}/merchants/:merchantId/stores',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
country: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
phoneNumber: '',
reference: '',
shopperStatement: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","country":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","phoneNumber":"","reference":"","shopperStatement":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"country": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" },
@"businessLineIds": @[ ],
@"description": @"",
@"externalReferenceId": @"",
@"phoneNumber": @"",
@"reference": @"",
@"shopperStatement": @"",
@"splitConfiguration": @{ @"balanceAccountId": @"", @"splitConfigurationId": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/stores"]
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}}/merchants/:merchantId/stores" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]),
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}}/merchants/:merchantId/stores', [
'body' => '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'country' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'phoneNumber' => '',
'reference' => '',
'shopperStatement' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores');
$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}}/merchants/:merchantId/stores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/stores", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores"
payload = {
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/merchants/:merchantId/stores') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"country\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"phoneNumber\": \"\",\n \"reference\": \"\",\n \"shopperStatement\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/stores";
let payload = json!({
"address": json!({
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"businessLineIds": (),
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": json!({
"balanceAccountId": "",
"splitConfigurationId": ""
})
});
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}}/merchants/:merchantId/stores \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}'
echo '{
"address": {
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
}
}' | \
http POST {{baseUrl}}/merchants/:merchantId/stores \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "country": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "phoneNumber": "",\n "reference": "",\n "shopperStatement": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n }\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"country": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"phoneNumber": "",
"reference": "",
"shopperStatement": "",
"splitConfiguration": [
"balanceAccountId": "",
"splitConfigurationId": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/YOUR_STORE_ID"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"id": "YOUR_STORE_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "1813702551707653",
"reference": "Spring_store_2",
"shopperStatement": "Springfield Shop",
"status": "active"
}
GET
Get a list of stores (GET)
{{baseUrl}}/stores
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stores")
require "http/client"
url = "{{baseUrl}}/stores"
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}}/stores"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stores");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores"
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/stores HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stores")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores"))
.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}}/stores")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stores")
.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}}/stores');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/stores'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores';
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}}/stores',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stores")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stores',
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}}/stores'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stores');
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}}/stores'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores';
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}}/stores"]
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}}/stores" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores",
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}}/stores');
echo $response->getBody();
setUrl('{{baseUrl}}/stores');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stores');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stores' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stores")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores")
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/stores') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stores";
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}}/stores
http GET {{baseUrl}}/stores
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stores
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1"
},
"last": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1"
},
"next": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1"
}
},
"data": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL5"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Springfield Shop",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL5"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL6"
}
},
"address": {
"city": "North Madison",
"country": "US",
"line1": "1492 Townline Road",
"line2": "Rowland Business Park",
"postalCode": "20577",
"stateOrProvince": "NY"
},
"description": "West location",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1211992213193020",
"reference": "Second Madison store",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL6"
}
],
"itemsTotal": 2,
"pagesTotal": 1
}
GET
Get a list of stores
{{baseUrl}}/merchants/:merchantId/stores
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/stores")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores"
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}}/merchants/:merchantId/stores"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/stores");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores"
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/merchants/:merchantId/stores HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/stores")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores"))
.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}}/merchants/:merchantId/stores")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/stores")
.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}}/merchants/:merchantId/stores');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/merchants/:merchantId/stores'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores';
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}}/merchants/:merchantId/stores',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/stores',
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}}/merchants/:merchantId/stores'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/stores');
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}}/merchants/:merchantId/stores'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores';
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}}/merchants/:merchantId/stores"]
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}}/merchants/:merchantId/stores" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores",
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}}/merchants/:merchantId/stores');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/stores' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/stores")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores")
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/merchants/:merchantId/stores') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/stores";
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}}/merchants/:merchantId/stores
http GET {{baseUrl}}/merchants/:merchantId/stores
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1"
},
"last": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1"
},
"next": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1"
}
},
"data": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL5"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Springfield Shop",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL5"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL6"
}
},
"address": {
"city": "North Madison",
"country": "US",
"line1": "1492 Townline Road",
"line2": "Rowland Business Park",
"postalCode": "20577",
"stateOrProvince": "NY"
},
"description": "West location",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1211992213193020",
"reference": "Second Madison store",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL6"
}
],
"itemsTotal": 2,
"pagesTotal": 1
}
GET
Get a store (GET)
{{baseUrl}}/stores/:storeId
QUERY PARAMS
storeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stores/:storeId")
require "http/client"
url = "{{baseUrl}}/stores/:storeId"
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}}/stores/:storeId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stores/:storeId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId"
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/stores/:storeId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stores/:storeId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId"))
.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}}/stores/:storeId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stores/:storeId")
.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}}/stores/:storeId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/stores/:storeId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId';
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}}/stores/:storeId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stores/:storeId',
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}}/stores/:storeId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stores/:storeId');
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}}/stores/:storeId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId';
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}}/stores/:storeId"]
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}}/stores/:storeId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId",
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}}/stores/:storeId');
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stores/:storeId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stores/:storeId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stores/:storeId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores/:storeId")
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/stores/:storeId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stores/:storeId";
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}}/stores/:storeId
http GET {{baseUrl}}/stores/:storeId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stores/:storeId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL5"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Springfield Shop",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL5"
}
GET
Get a store
{{baseUrl}}/merchants/:merchantId/stores/:storeId
QUERY PARAMS
merchantId
storeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:storeId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/stores/:storeId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
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}}/merchants/:merchantId/stores/:storeId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/stores/:storeId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
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/merchants/:merchantId/stores/:storeId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:storeId"))
.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}}/merchants/:merchantId/stores/:storeId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.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}}/merchants/:merchantId/stores/:storeId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/stores/:storeId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:storeId';
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}}/merchants/:merchantId/stores/:storeId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/stores/:storeId',
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}}/merchants/:merchantId/stores/:storeId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/stores/:storeId');
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}}/merchants/:merchantId/stores/:storeId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:storeId';
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}}/merchants/:merchantId/stores/:storeId"]
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}}/merchants/:merchantId/stores/:storeId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:storeId",
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}}/merchants/:merchantId/stores/:storeId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:storeId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:storeId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/stores/:storeId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:storeId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/stores/:storeId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
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/merchants/:merchantId/stores/:storeId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/stores/:storeId";
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}}/merchants/:merchantId/stores/:storeId
http GET {{baseUrl}}/merchants/:merchantId/stores/:storeId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores/:storeId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:storeId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/ST322LJ223223K5F4SQNR9XL5"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "200 Main Street",
"line2": "Building 5A",
"line3": "Suite 3",
"postalCode": "20250",
"stateOrProvince": "NY"
},
"description": "City centre store",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Springfield Shop",
"status": "active",
"storeId": "ST322LJ223223K5F4SQNR9XL5"
}
PATCH
Update a store (PATCH)
{{baseUrl}}/stores/:storeId
QUERY PARAMS
storeId
BODY json
{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/stores/:storeId" {:content-type :json
:form-params {:address {:city ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:businessLineIds []
:description ""
:externalReferenceId ""
:splitConfiguration {:balanceAccountId ""
:splitConfigurationId ""}
:status ""}})
require "http/client"
url = "{{baseUrl}}/stores/:storeId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/stores/:storeId"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stores/:storeId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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/stores/:storeId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 318
{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/stores/:storeId")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/stores/:storeId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/stores/:storeId")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
},
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/stores/:storeId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""},"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/stores/:storeId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n },\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId")
.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/stores/:storeId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId',
headers: {'content-type': 'application/json'},
body: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/stores/:storeId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
},
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""},"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" },
@"businessLineIds": @[ ],
@"description": @"",
@"externalReferenceId": @"",
@"splitConfiguration": @{ @"balanceAccountId": @"", @"splitConfigurationId": @"" },
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stores/:storeId"]
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}}/stores/:storeId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId",
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([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/stores/:storeId', [
'body' => '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/stores/:storeId');
$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}}/stores/:storeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/stores/:storeId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId"
payload = {
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/stores/:storeId")
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 \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/stores/:storeId') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/stores/:storeId";
let payload = json!({
"address": json!({
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"businessLineIds": (),
"description": "",
"externalReferenceId": "",
"splitConfiguration": json!({
"balanceAccountId": "",
"splitConfigurationId": ""
}),
"status": ""
});
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}}/stores/:storeId \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
echo '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}' | \
http PATCH {{baseUrl}}/stores/:storeId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n },\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/stores/:storeId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": [
"balanceAccountId": "",
"splitConfigurationId": ""
],
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/YOUR_STORE_ID"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "1776 West Pinewood Avenue",
"line2": "Heartland Building",
"line3": "",
"postalCode": "20251",
"stateOrProvince": "NY"
},
"description": "City centre store",
"id": "YOUR_STORE_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Spring_store_2",
"shopperStatement": "Springfield Shop",
"status": "active"
}
PATCH
Update a store
{{baseUrl}}/merchants/:merchantId/stores/:storeId
QUERY PARAMS
merchantId
storeId
BODY json
{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:storeId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/stores/:storeId" {:content-type :json
:form-params {:address {:city ""
:line1 ""
:line2 ""
:line3 ""
:postalCode ""
:stateOrProvince ""}
:businessLineIds []
:description ""
:externalReferenceId ""
:splitConfiguration {:balanceAccountId ""
:splitConfigurationId ""}
:status ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/merchants/:merchantId/stores/:storeId"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/stores/:storeId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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/merchants/:merchantId/stores/:storeId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 318
{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:storeId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
},
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/stores/:storeId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:storeId',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:storeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""},"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/stores/:storeId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n },\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:storeId")
.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/merchants/:merchantId/stores/:storeId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:storeId',
headers: {'content-type': 'application/json'},
body: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/merchants/:merchantId/stores/:storeId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
line1: '',
line2: '',
line3: '',
postalCode: '',
stateOrProvince: ''
},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {
balanceAccountId: '',
splitConfigurationId: ''
},
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:storeId',
headers: {'content-type': 'application/json'},
data: {
address: {city: '', line1: '', line2: '', line3: '', postalCode: '', stateOrProvince: ''},
businessLineIds: [],
description: '',
externalReferenceId: '',
splitConfiguration: {balanceAccountId: '', splitConfigurationId: ''},
status: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:storeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","line1":"","line2":"","line3":"","postalCode":"","stateOrProvince":""},"businessLineIds":[],"description":"","externalReferenceId":"","splitConfiguration":{"balanceAccountId":"","splitConfigurationId":""},"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"postalCode": @"", @"stateOrProvince": @"" },
@"businessLineIds": @[ ],
@"description": @"",
@"externalReferenceId": @"",
@"splitConfiguration": @{ @"balanceAccountId": @"", @"splitConfigurationId": @"" },
@"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/stores/:storeId"]
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}}/merchants/:merchantId/stores/:storeId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:storeId",
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([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/merchants/:merchantId/stores/:storeId', [
'body' => '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:storeId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'line1' => '',
'line2' => '',
'line3' => '',
'postalCode' => '',
'stateOrProvince' => ''
],
'businessLineIds' => [
],
'description' => '',
'externalReferenceId' => '',
'splitConfiguration' => [
'balanceAccountId' => '',
'splitConfigurationId' => ''
],
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:storeId');
$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}}/merchants/:merchantId/stores/:storeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:storeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/stores/:storeId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
payload = {
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:storeId"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/merchants/:merchantId/stores/:storeId")
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 \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/merchants/:merchantId/stores/:storeId') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"line3\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\"\n },\n \"businessLineIds\": [],\n \"description\": \"\",\n \"externalReferenceId\": \"\",\n \"splitConfiguration\": {\n \"balanceAccountId\": \"\",\n \"splitConfigurationId\": \"\"\n },\n \"status\": \"\"\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}}/merchants/:merchantId/stores/:storeId";
let payload = json!({
"address": json!({
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
}),
"businessLineIds": (),
"description": "",
"externalReferenceId": "",
"splitConfiguration": json!({
"balanceAccountId": "",
"splitConfigurationId": ""
}),
"status": ""
});
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}}/merchants/:merchantId/stores/:storeId \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}'
echo '{
"address": {
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
},
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": {
"balanceAccountId": "",
"splitConfigurationId": ""
},
"status": ""
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/stores/:storeId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "line1": "",\n "line2": "",\n "line3": "",\n "postalCode": "",\n "stateOrProvince": ""\n },\n "businessLineIds": [],\n "description": "",\n "externalReferenceId": "",\n "splitConfiguration": {\n "balanceAccountId": "",\n "splitConfigurationId": ""\n },\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores/:storeId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"line1": "",
"line2": "",
"line3": "",
"postalCode": "",
"stateOrProvince": ""
],
"businessLineIds": [],
"description": "",
"externalReferenceId": "",
"splitConfiguration": [
"balanceAccountId": "",
"splitConfigurationId": ""
],
"status": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:storeId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/stores/YOUR_STORE_ID"
}
},
"address": {
"city": "Springfield",
"country": "US",
"line1": "1776 West Pinewood Avenue",
"line2": "Heartland Building",
"line3": "",
"postalCode": "20251",
"stateOrProvince": "NY"
},
"description": "City centre store",
"id": "YOUR_STORE_ID",
"merchantId": "YOUR_MERCHANT_ACCOUNT_ID",
"phoneNumber": "+1813702551707653",
"reference": "Spring_store_2",
"shopperStatement": "Springfield Shop",
"status": "active"
}
POST
Create an allowed origin
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
QUERY PARAMS
companyId
apiCredentialId
BODY json
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins");
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins" {:content-type :json
:form-params {:_links {:self {:href ""}}
:domain ""
:id ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"),
Content = new StringContent("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
payload := strings.NewReader("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 86
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.setHeader("content-type", "application/json")
.setBody("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.header("content-type", "application/json")
.body("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.asString();
const data = JSON.stringify({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
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({_links: {self: {href: ''}}, domain: '', id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
body: {_links: {self: {href: ''}}, domain: '', id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"_links": @{ @"self": @{ @"href": @"" } },
@"domain": @"",
@"id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins",
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([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins', [
'body' => '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
$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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
payload = {
"_links": { "self": { "href": "" } },
"domain": "",
"id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
payload <- "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins') do |req|
req.body = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins";
let payload = json!({
"_links": json!({"self": json!({"href": ""})}),
"domain": "",
"id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins \
--header 'content-type: application/json' \
--data '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
echo '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}' | \
http POST {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"_links": ["self": ["href": ""]],
"domain": "",
"id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.eu.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
DELETE
Delete an allowed origin
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
QUERY PARAMS
companyId
apiCredentialId
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"))
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId",
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId";
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
http DELETE {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")! 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()
GET
Get a list of allowed origins
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
QUERY PARAMS
companyId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"))
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins',
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins",
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins";
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
http GET {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins")! 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
{
"data": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_1"
}
},
"domain": "https://www.eu.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN_1"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_2"
}
},
"domain": "https://www.us.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN_2"
}
]
}
GET
Get an allowed origin
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
QUERY PARAMS
companyId
apiCredentialId
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"))
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId",
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
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/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId";
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}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
http GET {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.us.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
POST
Create an allowed origin (POST)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
QUERY PARAMS
merchantId
apiCredentialId
BODY json
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins");
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins" {:content-type :json
:form-params {:_links {:self {:href ""}}
:domain ""
:id ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"),
Content = new StringContent("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
payload := strings.NewReader("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 86
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.setHeader("content-type", "application/json")
.setBody("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.header("content-type", "application/json")
.body("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.asString();
const data = JSON.stringify({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
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({_links: {self: {href: ''}}, domain: '', id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
body: {_links: {self: {href: ''}}, domain: '', id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"_links": @{ @"self": @{ @"href": @"" } },
@"domain": @"",
@"id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins",
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([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins', [
'body' => '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
$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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
payload = {
"_links": { "self": { "href": "" } },
"domain": "",
"id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
payload <- "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins') do |req|
req.body = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins";
let payload = json!({
"_links": json!({"self": json!({"href": ""})}),
"domain": "",
"id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins \
--header 'content-type: application/json' \
--data '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
echo '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"_links": ["self": ["href": ""]],
"domain": "",
"id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.eu.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
DELETE
Delete an allowed origin (DELETE)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
QUERY PARAMS
merchantId
apiCredentialId
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"))
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId",
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId";
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
http DELETE {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")! 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()
GET
Get a list of allowed origins (GET)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
QUERY PARAMS
merchantId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"))
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins',
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins",
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins";
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
http GET {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins")! 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
{
"data": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_1"
}
},
"domain": "https://www.eu.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN_1"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_2"
}
},
"domain": "https://www.us.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN_2"
}
]
}
GET
Get an allowed origin (GET)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
QUERY PARAMS
merchantId
apiCredentialId
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"))
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId',
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId",
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")
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/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId";
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
http GET {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/allowedOrigins/:originId")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.eu.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
POST
Create an API credential.
{{baseUrl}}/companies/:companyId/apiCredentials
QUERY PARAMS
companyId
BODY json
{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials");
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 \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/apiCredentials" {:content-type :json
:form-params {:allowedOrigins []
:associatedMerchantAccounts []
:description ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials"),
Content = new StringContent("{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials"
payload := strings.NewReader("{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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/companies/:companyId/apiCredentials HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 98
{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/apiCredentials")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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 \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/apiCredentials")
.header("content-type", "application/json")
.body("{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/apiCredentials');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials',
headers: {'content-type': 'application/json'},
data: {allowedOrigins: [], associatedMerchantAccounts: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedOrigins":[],"associatedMerchantAccounts":[],"description":"","roles":[]}'
};
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}}/companies/:companyId/apiCredentials',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowedOrigins": [],\n "associatedMerchantAccounts": [],\n "description": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials")
.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/companies/:companyId/apiCredentials',
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({allowedOrigins: [], associatedMerchantAccounts: [], description: '', roles: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials',
headers: {'content-type': 'application/json'},
body: {allowedOrigins: [], associatedMerchantAccounts: [], description: '', roles: []},
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}}/companies/:companyId/apiCredentials');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
});
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}}/companies/:companyId/apiCredentials',
headers: {'content-type': 'application/json'},
data: {allowedOrigins: [], associatedMerchantAccounts: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedOrigins":[],"associatedMerchantAccounts":[],"description":"","roles":[]}'
};
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 = @{ @"allowedOrigins": @[ ],
@"associatedMerchantAccounts": @[ ],
@"description": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/apiCredentials"]
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}}/companies/:companyId/apiCredentials" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials",
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([
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]),
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}}/companies/:companyId/apiCredentials', [
'body' => '{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials');
$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}}/companies/:companyId/apiCredentials' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/apiCredentials", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials"
payload = {
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials"
payload <- "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials")
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 \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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/companies/:companyId/apiCredentials') do |req|
req.body = "{\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials";
let payload = json!({
"allowedOrigins": (),
"associatedMerchantAccounts": (),
"description": "",
"roles": ()
});
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}}/companies/:companyId/apiCredentials \
--header 'content-type: application/json' \
--data '{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
echo '{
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}' | \
http POST {{baseUrl}}/companies/:companyId/apiCredentials \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowedOrigins": [],\n "associatedMerchantAccounts": [],\n "description": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
],
"apiKey": "YOUR_API_KEY",
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT_AU",
"YOUR_MERCHANT_ACCOUNT_EU",
"YOUR_MERCHANT_ACCOUNT_US"
],
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"password": "YOUR_PASSWORD",
"roles": [
"Checkout webservice role"
],
"username": "YOUR_USERNAME"
}
GET
Get a list of API credentials
{{baseUrl}}/companies/:companyId/apiCredentials
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/apiCredentials")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials"
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}}/companies/:companyId/apiCredentials"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials"
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/companies/:companyId/apiCredentials HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/apiCredentials")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials"))
.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}}/companies/:companyId/apiCredentials")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/apiCredentials")
.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}}/companies/:companyId/apiCredentials');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/apiCredentials'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials';
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}}/companies/:companyId/apiCredentials',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials',
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}}/companies/:companyId/apiCredentials'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/apiCredentials');
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}}/companies/:companyId/apiCredentials'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials';
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}}/companies/:companyId/apiCredentials"]
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}}/companies/:companyId/apiCredentials" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials",
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}}/companies/:companyId/apiCredentials');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/apiCredentials")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials")
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/companies/:companyId/apiCredentials') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials";
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}}/companies/:companyId/apiCredentials
http GET {{baseUrl}}/companies/:companyId/apiCredentials
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials?pageNumber=3&pageSize=10"
},
"next": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials?pageNumber=2&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1/allowedOrigins/YOUR_ALLOWED_ORIGIN_1"
}
},
"domain": "http://localhost",
"id": "YOUR_ALLOWED_ORIGIN_1"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_1/allowedOrigins/YOUR_ALLOWED_ORIGIN_2"
}
},
"domain": "http://localhost:3000",
"id": "YOUR_ALLOWED_ORIGIN_2"
}
],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_1",
"id": "YOUR_API_CREDENTIAL_1",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role"
],
"username": "YOUR_USERNAME_1"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_2",
"id": "YOUR_API_CREDENTIAL_2",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role"
],
"username": "YOUR_USERNAME_2"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_3",
"id": "YOUR_API_CREDENTIAL_3",
"roles": [
"API Supply MPI data with Payments",
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"API PCI Payments role",
"Checkout webservice role",
"API 3DS 2.0 to retrieve the ThreeDS2Result for authentication only"
],
"username": "YOUR_USERNAME_3"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT_1"
],
"clientKey": "YOUR_CLIENT_KEY_4",
"id": "YOUR_API_CREDENTIAL_4",
"roles": [
"Checkout encrypted cardholder data",
"Checkout webservice role"
],
"username": "YOUR_USERNAME_4"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_5",
"id": "YOUR_API_CREDENTIAL_5",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"API Authorise Referred Payments",
"API PCI Payments role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_5"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_6",
"id": "YOUR_API_CREDENTIAL_6",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_6"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT_2",
"YOUR_MERCHANT_ACCOUNT_3"
],
"clientKey": "YOUR_CLIENT_KEY_7",
"id": "YOUR_API_CREDENTIAL_7",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_7"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_8",
"id": "YOUR_API_CREDENTIAL_8",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_8"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT_4",
"YOUR_MERCHANT_ACCOUNT_5"
],
"clientKey": "YOUR_CLIENT_KEY_9",
"id": "YOUR_API_CREDENTIAL_9",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_9"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY_10",
"id": "YOUR_API_CREDENTIAL_10",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_10"
}
],
"itemsTotal": 25,
"pagesTotal": 3
}
GET
Get an API credential
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId
QUERY PARAMS
companyId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
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}}/companies/:companyId/apiCredentials/:apiCredentialId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
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/companies/:companyId/apiCredentials/:apiCredentialId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"))
.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}}/companies/:companyId/apiCredentials/:apiCredentialId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.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}}/companies/:companyId/apiCredentials/:apiCredentialId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId',
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}}/companies/:companyId/apiCredentials/:apiCredentialId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
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}}/companies/:companyId/apiCredentials/:apiCredentialId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId';
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}}/companies/:companyId/apiCredentials/:apiCredentialId"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId",
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}}/companies/:companyId/apiCredentials/:apiCredentialId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
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/companies/:companyId/apiCredentials/:apiCredentialId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId";
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}}/companies/:companyId/apiCredentials/:apiCredentialId
http GET {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_1"
}
},
"domain": "http://localhost",
"id": "YOUR_ALLOWED_ORIGIN_1"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN_2"
}
},
"domain": "http://localhost:3000",
"id": "YOUR_ALLOWED_ORIGIN_2"
}
],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role"
],
"username": "YOUR_USERNAME"
}
PATCH
Update an API credential.
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId
QUERY PARAMS
companyId
apiCredentialId
BODY json
{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId");
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 \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId" {:content-type :json
:form-params {:active false
:allowedOrigins []
:associatedMerchantAccounts []
:description ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials/:apiCredentialId"),
Content = new StringContent("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials/:apiCredentialId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
payload := strings.NewReader("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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/companies/:companyId/apiCredentials/:apiCredentialId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 117
{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.setHeader("content-type", "application/json")
.setBody("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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 \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.header("content-type", "application/json")
.body("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
data: {
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"active":false,"allowedOrigins":[],"associatedMerchantAccounts":[],"description":"","roles":[]}'
};
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}}/companies/:companyId/apiCredentials/:apiCredentialId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "active": false,\n "allowedOrigins": [],\n "associatedMerchantAccounts": [],\n "description": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")
.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/companies/:companyId/apiCredentials/:apiCredentialId',
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({
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
body: {
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
},
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}}/companies/:companyId/apiCredentials/:apiCredentialId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
});
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}}/companies/:companyId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
data: {
active: false,
allowedOrigins: [],
associatedMerchantAccounts: [],
description: '',
roles: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"active":false,"allowedOrigins":[],"associatedMerchantAccounts":[],"description":"","roles":[]}'
};
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 = @{ @"active": @NO,
@"allowedOrigins": @[ ],
@"associatedMerchantAccounts": @[ ],
@"description": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"]
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}}/companies/:companyId/apiCredentials/:apiCredentialId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId",
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([
'active' => null,
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]),
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}}/companies/:companyId/apiCredentials/:apiCredentialId', [
'body' => '{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'active' => null,
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'active' => null,
'allowedOrigins' => [
],
'associatedMerchantAccounts' => [
],
'description' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId');
$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}}/companies/:companyId/apiCredentials/:apiCredentialId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
payload = {
"active": False,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId"
payload <- "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials/:apiCredentialId")
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 \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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/companies/:companyId/apiCredentials/:apiCredentialId') do |req|
req.body = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"associatedMerchantAccounts\": [],\n \"description\": \"\",\n \"roles\": []\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}}/companies/:companyId/apiCredentials/:apiCredentialId";
let payload = json!({
"active": false,
"allowedOrigins": (),
"associatedMerchantAccounts": (),
"description": "",
"roles": ()
});
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}}/companies/:companyId/apiCredentials/:apiCredentialId \
--header 'content-type: application/json' \
--data '{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}'
echo '{
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
}' | \
http PATCH {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "active": false,\n "allowedOrigins": [],\n "associatedMerchantAccounts": [],\n "description": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"active": false,
"allowedOrigins": [],
"associatedMerchantAccounts": [],
"description": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins"
},
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"associatedMerchantAccounts": [],
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"roles": [
"Management API - Accounts read",
"Management API - Webhooks read",
"Management API - API credentials read and write",
"Management API - Stores read",
"Management API — Payment methods read",
"Management API - Stores read and write",
"Management API - Webhooks read and write",
"Merchant Recurring role",
"Data Protection API",
"Management API - Payout Account Settings Read",
"Checkout webservice role",
"Management API - Accounts read and write",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME"
}
POST
Create an API credential
{{baseUrl}}/merchants/:merchantId/apiCredentials
QUERY PARAMS
merchantId
BODY json
{
"allowedOrigins": [],
"description": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials");
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 \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/apiCredentials" {:content-type :json
:form-params {:allowedOrigins []
:description ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials"),
Content = new StringContent("{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials"
payload := strings.NewReader("{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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/merchants/:merchantId/apiCredentials HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 62
{
"allowedOrigins": [],
"description": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/apiCredentials")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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 \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/apiCredentials")
.header("content-type", "application/json")
.body("{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
allowedOrigins: [],
description: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials',
headers: {'content-type': 'application/json'},
data: {allowedOrigins: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedOrigins":[],"description":"","roles":[]}'
};
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}}/merchants/:merchantId/apiCredentials',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowedOrigins": [],\n "description": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials")
.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/merchants/:merchantId/apiCredentials',
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({allowedOrigins: [], description: '', roles: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials',
headers: {'content-type': 'application/json'},
body: {allowedOrigins: [], description: '', roles: []},
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}}/merchants/:merchantId/apiCredentials');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowedOrigins: [],
description: '',
roles: []
});
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}}/merchants/:merchantId/apiCredentials',
headers: {'content-type': 'application/json'},
data: {allowedOrigins: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedOrigins":[],"description":"","roles":[]}'
};
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 = @{ @"allowedOrigins": @[ ],
@"description": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/apiCredentials"]
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}}/merchants/:merchantId/apiCredentials" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials",
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([
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]),
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}}/merchants/:merchantId/apiCredentials', [
'body' => '{
"allowedOrigins": [],
"description": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials');
$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}}/merchants/:merchantId/apiCredentials' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedOrigins": [],
"description": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedOrigins": [],
"description": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/apiCredentials", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials"
payload = {
"allowedOrigins": [],
"description": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials"
payload <- "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials")
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 \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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/merchants/:merchantId/apiCredentials') do |req|
req.body = "{\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials";
let payload = json!({
"allowedOrigins": (),
"description": "",
"roles": ()
});
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}}/merchants/:merchantId/apiCredentials \
--header 'content-type: application/json' \
--data '{
"allowedOrigins": [],
"description": "",
"roles": []
}'
echo '{
"allowedOrigins": [],
"description": "",
"roles": []
}' | \
http POST {{baseUrl}}/merchants/:merchantId/apiCredentials \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowedOrigins": [],\n "description": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowedOrigins": [],
"description": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
],
"apiKey": "YOUR_API_KEY",
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"password": "YOUR_PASSWORD",
"roles": [
"Checkout webservice role"
],
"username": "YOUR_USERNAME"
}
GET
Get a list of API credentials (GET)
{{baseUrl}}/merchants/:merchantId/apiCredentials
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/apiCredentials")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials"
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}}/merchants/:merchantId/apiCredentials"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials"
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/merchants/:merchantId/apiCredentials HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/apiCredentials")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials"))
.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}}/merchants/:merchantId/apiCredentials")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/apiCredentials")
.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}}/merchants/:merchantId/apiCredentials');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials';
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}}/merchants/:merchantId/apiCredentials',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials',
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}}/merchants/:merchantId/apiCredentials'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/apiCredentials');
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}}/merchants/:merchantId/apiCredentials'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials';
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}}/merchants/:merchantId/apiCredentials"]
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}}/merchants/:merchantId/apiCredentials" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials",
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}}/merchants/:merchantId/apiCredentials');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/apiCredentials")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials")
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/merchants/:merchantId/apiCredentials') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials";
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}}/merchants/:merchantId/apiCredentials
http GET {{baseUrl}}/merchants/:merchantId/apiCredentials
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials?pageNumber=2&pageSize=10"
},
"next": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials?pageNumber=2&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL_1/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL_1/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL_1/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL_1"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_1",
"id": "YOUR_API_CREDENTIAL_1",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME_1"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_2"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_2",
"id": "YOUR_API_CREDENTIAL_2",
"roles": [
"Merchant Rss feed role"
],
"username": "YOUR_USERNAME_2"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/allowedOrigins/YOUR_ALLOWED_ORIGIN_1"
}
},
"domain": "YOUR_DOMAIN_1",
"id": "YOUR_ALLOWED_ORIGIN_1"
},
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_3/allowedOrigins/YOUR_ALLOWED_ORIGIN_2"
}
},
"domain": "YOUR_DOMAIN_2",
"id": "YOUR_ALLOWED_ORIGIN_2"
}
],
"clientKey": "YOUR_CLIENT_KEY_3",
"id": "YOUR_API_CREDENTIAL_3",
"roles": [
"Merchant iDeal-API Webservice role",
"Management API - Accounts read",
"Management API - API credentials read and write",
"Management API — Payment methods read",
"Merchant PAL Donation role",
"Merchant PAL Charity role",
"Checkout encrypted cardholder data",
"Checkout webservice role",
"Store payout detail and submit payout - withdrawal",
"Management API - Accounts read and write",
"Management API - Webhooks read",
"Merchant Payout role",
"API tokenise payment details",
"General API Payments role",
"API Supply MPI data with Payments",
"API Authorise Referred Payments",
"API PCI Payments role",
"CSC Tokenization Webservice role",
"Management API - Stores read",
"API Payment RefundWithData",
"API Clientside Encryption Payments role",
"API to retrieve authentication data",
"Management API - Stores read and write",
"Management API - Webhooks read and write",
"Mastercard inControl service",
"Merchant Recurring role",
"Management API - Payout Account Settings Read",
"API surcharge cost estimation and regulatory information",
"Store payout detail",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_3"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_4"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_4",
"id": "YOUR_API_CREDENTIAL_4",
"roles": [
"API Clientside Encryption Payments role",
"API tokenise payment details",
"General API Payments role",
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"API PCI Payments role",
"CSC Tokenization Webservice role",
"Checkout webservice role",
"ThreeDSecure WebService Role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_4"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_5"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_5",
"id": "YOUR_API_CREDENTIAL_5",
"roles": [
"Merchant iDeal-API Webservice role",
"General API Payments role",
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_5"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_6"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_6",
"id": "YOUR_API_CREDENTIAL_6",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"API PCI Payments role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_6"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_7"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_7",
"id": "YOUR_API_CREDENTIAL_7",
"roles": [
"Checkout encrypted cardholder data",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_7"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_8"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_8",
"id": "YOUR_API_CREDENTIAL_8",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_8"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_9"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_9",
"id": "YOUR_API_CREDENTIAL_9",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"API PCI Payments role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_9"
},
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL_10"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY_10",
"id": "YOUR_API_CREDENTIAL_10",
"roles": [
"Checkout encrypted cardholder data",
"Merchant Recurring role",
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME_10"
}
],
"itemsTotal": 11,
"pagesTotal": 2
}
GET
Get an API credential (GET)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId
QUERY PARAMS
merchantId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
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/merchants/:merchantId/apiCredentials/:apiCredentialId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"))
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.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}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId',
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId';
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId",
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
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/merchants/:merchantId/apiCredentials/:apiCredentialId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId";
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId
http GET {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/apiCredentials/YOUR_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"roles": [
"Merchant Report Download role"
],
"username": "YOUR_USERNAME"
}
PATCH
Update an API credential
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId
QUERY PARAMS
merchantId
apiCredentialId
BODY json
{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId");
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 \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId" {:content-type :json
:form-params {:active false
:allowedOrigins []
:description ""
:roles []}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials/:apiCredentialId"),
Content = new StringContent("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials/:apiCredentialId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
payload := strings.NewReader("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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/merchants/:merchantId/apiCredentials/:apiCredentialId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 81
{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.setHeader("content-type", "application/json")
.setBody("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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 \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.header("content-type", "application/json")
.body("{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
.asString();
const data = JSON.stringify({
active: false,
allowedOrigins: [],
description: '',
roles: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
data: {active: false, allowedOrigins: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"active":false,"allowedOrigins":[],"description":"","roles":[]}'
};
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "active": false,\n "allowedOrigins": [],\n "description": "",\n "roles": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
.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/merchants/:merchantId/apiCredentials/:apiCredentialId',
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({active: false, allowedOrigins: [], description: '', roles: []}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
body: {active: false, allowedOrigins: [], description: '', roles: []},
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
active: false,
allowedOrigins: [],
description: '',
roles: []
});
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId',
headers: {'content-type': 'application/json'},
data: {active: false, allowedOrigins: [], description: '', roles: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"active":false,"allowedOrigins":[],"description":"","roles":[]}'
};
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 = @{ @"active": @NO,
@"allowedOrigins": @[ ],
@"description": @"",
@"roles": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"]
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId",
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([
'active' => null,
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]),
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId', [
'body' => '{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'active' => null,
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'active' => null,
'allowedOrigins' => [
],
'description' => '',
'roles' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId');
$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}}/merchants/:merchantId/apiCredentials/:apiCredentialId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
payload = {
"active": False,
"allowedOrigins": [],
"description": "",
"roles": []
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId"
payload <- "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials/:apiCredentialId")
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 \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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/merchants/:merchantId/apiCredentials/:apiCredentialId') do |req|
req.body = "{\n \"active\": false,\n \"allowedOrigins\": [],\n \"description\": \"\",\n \"roles\": []\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}}/merchants/:merchantId/apiCredentials/:apiCredentialId";
let payload = json!({
"active": false,
"allowedOrigins": (),
"description": "",
"roles": ()
});
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId \
--header 'content-type: application/json' \
--data '{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}'
echo '{
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "active": false,\n "allowedOrigins": [],\n "description": "",\n "roles": []\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"active": false,
"allowedOrigins": [],
"description": "",
"roles": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId")! 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
{
"_links": {
"allowedOrigins": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins"
},
"generateApiKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateApiKey"
},
"generateClientKey": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/generateClientKey"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL"
}
},
"active": true,
"allowedIpAddresses": [],
"allowedOrigins": [
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/apiCredentials/YOUR_API_CREDENTIAL/allowedOrigins/YOUR_ALLOWED_ORIGIN"
}
},
"domain": "https://www.mystore.com",
"id": "YOUR_ALLOWED_ORIGIN"
}
],
"clientKey": "YOUR_CLIENT_KEY",
"id": "YOUR_API_CREDENTIAL",
"roles": [
"Checkout webservice role",
"Merchant PAL Webservice role"
],
"username": "YOUR_USERNAME"
}
POST
Generate new API key
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey
QUERY PARAMS
companyId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey');
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}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey
http POST {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateApiKey")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Generate new API key (POST)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey
QUERY PARAMS
merchantId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey
http POST {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateApiKey")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Generate new client key
{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey
QUERY PARAMS
companyId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey');
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}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey
http POST {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/apiCredentials/:apiCredentialId/generateClientKey")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Generate new client key (POST)
{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey
QUERY PARAMS
merchantId
apiCredentialId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey');
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}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey
http POST {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/apiCredentials/:apiCredentialId/generateClientKey")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Add allowed origin
{{baseUrl}}/me/allowedOrigins
BODY json
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/me/allowedOrigins");
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/me/allowedOrigins" {:content-type :json
:form-params {:_links {:self {:href ""}}
:domain ""
:id ""}})
require "http/client"
url = "{{baseUrl}}/me/allowedOrigins"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/me/allowedOrigins"),
Content = new StringContent("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/me/allowedOrigins");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/me/allowedOrigins"
payload := strings.NewReader("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/me/allowedOrigins HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 86
{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/me/allowedOrigins")
.setHeader("content-type", "application/json")
.setBody("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/me/allowedOrigins"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/me/allowedOrigins")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/me/allowedOrigins")
.header("content-type", "application/json")
.body("{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
.asString();
const data = JSON.stringify({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/me/allowedOrigins');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/me/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/me/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/me/allowedOrigins',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/me/allowedOrigins")
.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/me/allowedOrigins',
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({_links: {self: {href: ''}}, domain: '', id: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/me/allowedOrigins',
headers: {'content-type': 'application/json'},
body: {_links: {self: {href: ''}}, domain: '', id: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/me/allowedOrigins');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
_links: {
self: {
href: ''
}
},
domain: '',
id: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/me/allowedOrigins',
headers: {'content-type': 'application/json'},
data: {_links: {self: {href: ''}}, domain: '', id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/me/allowedOrigins';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"_links":{"self":{"href":""}},"domain":"","id":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"_links": @{ @"self": @{ @"href": @"" } },
@"domain": @"",
@"id": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/me/allowedOrigins"]
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}}/me/allowedOrigins" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/me/allowedOrigins",
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([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/me/allowedOrigins', [
'body' => '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/me/allowedOrigins');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'_links' => [
'self' => [
'href' => ''
]
],
'domain' => '',
'id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/me/allowedOrigins');
$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}}/me/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/me/allowedOrigins' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/me/allowedOrigins", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/me/allowedOrigins"
payload = {
"_links": { "self": { "href": "" } },
"domain": "",
"id": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/me/allowedOrigins"
payload <- "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/me/allowedOrigins")
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 \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/me/allowedOrigins') do |req|
req.body = "{\n \"_links\": {\n \"self\": {\n \"href\": \"\"\n }\n },\n \"domain\": \"\",\n \"id\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/me/allowedOrigins";
let payload = json!({
"_links": json!({"self": json!({"href": ""})}),
"domain": "",
"id": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/me/allowedOrigins \
--header 'content-type: application/json' \
--data '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}'
echo '{
"_links": {
"self": {
"href": ""
}
},
"domain": "",
"id": ""
}' | \
http POST {{baseUrl}}/me/allowedOrigins \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "_links": {\n "self": {\n "href": ""\n }\n },\n "domain": "",\n "id": ""\n}' \
--output-document \
- {{baseUrl}}/me/allowedOrigins
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"_links": ["self": ["href": ""]],
"domain": "",
"id": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/me/allowedOrigins")! 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()
GET
Get API credential details
{{baseUrl}}/me
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/me");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/me")
require "http/client"
url = "{{baseUrl}}/me"
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}}/me"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/me");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/me"
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/me HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/me")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/me"))
.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}}/me")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/me")
.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}}/me');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/me'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/me';
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}}/me',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/me")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/me',
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}}/me'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/me');
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}}/me'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/me';
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}}/me"]
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}}/me" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/me",
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}}/me');
echo $response->getBody();
setUrl('{{baseUrl}}/me');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/me');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/me' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/me' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/me")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/me"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/me"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/me")
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/me') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/me";
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}}/me
http GET {{baseUrl}}/me
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/me
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/me")! 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()
GET
Get allowed origin details
{{baseUrl}}/me/allowedOrigins/:originId
QUERY PARAMS
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/me/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/me/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/me/allowedOrigins/:originId"
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}}/me/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/me/allowedOrigins/:originId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/me/allowedOrigins/:originId"
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/me/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/me/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/me/allowedOrigins/:originId"))
.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}}/me/allowedOrigins/:originId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/me/allowedOrigins/:originId")
.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}}/me/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/me/allowedOrigins/:originId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/me/allowedOrigins/:originId';
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}}/me/allowedOrigins/:originId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/me/allowedOrigins/:originId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/me/allowedOrigins/:originId',
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}}/me/allowedOrigins/:originId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/me/allowedOrigins/:originId');
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}}/me/allowedOrigins/:originId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/me/allowedOrigins/:originId';
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}}/me/allowedOrigins/:originId"]
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}}/me/allowedOrigins/:originId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/me/allowedOrigins/:originId",
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}}/me/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/me/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/me/allowedOrigins/:originId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/me/allowedOrigins/:originId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/me/allowedOrigins/:originId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/me/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/me/allowedOrigins/:originId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/me/allowedOrigins/:originId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/me/allowedOrigins/:originId")
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/me/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/me/allowedOrigins/:originId";
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}}/me/allowedOrigins/:originId
http GET {{baseUrl}}/me/allowedOrigins/:originId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/me/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/me/allowedOrigins/:originId")! 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()
GET
Get allowed origins
{{baseUrl}}/me/allowedOrigins
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/me/allowedOrigins");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/me/allowedOrigins")
require "http/client"
url = "{{baseUrl}}/me/allowedOrigins"
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}}/me/allowedOrigins"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/me/allowedOrigins");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/me/allowedOrigins"
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/me/allowedOrigins HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/me/allowedOrigins")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/me/allowedOrigins"))
.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}}/me/allowedOrigins")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/me/allowedOrigins")
.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}}/me/allowedOrigins');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/me/allowedOrigins'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/me/allowedOrigins';
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}}/me/allowedOrigins',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/me/allowedOrigins")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/me/allowedOrigins',
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}}/me/allowedOrigins'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/me/allowedOrigins');
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}}/me/allowedOrigins'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/me/allowedOrigins';
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}}/me/allowedOrigins"]
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}}/me/allowedOrigins" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/me/allowedOrigins",
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}}/me/allowedOrigins');
echo $response->getBody();
setUrl('{{baseUrl}}/me/allowedOrigins');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/me/allowedOrigins');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/me/allowedOrigins' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/me/allowedOrigins' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/me/allowedOrigins")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/me/allowedOrigins"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/me/allowedOrigins"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/me/allowedOrigins")
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/me/allowedOrigins') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/me/allowedOrigins";
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}}/me/allowedOrigins
http GET {{baseUrl}}/me/allowedOrigins
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/me/allowedOrigins
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/me/allowedOrigins")! 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()
DELETE
Remove allowed origin
{{baseUrl}}/me/allowedOrigins/:originId
QUERY PARAMS
originId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/me/allowedOrigins/:originId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/me/allowedOrigins/:originId")
require "http/client"
url = "{{baseUrl}}/me/allowedOrigins/:originId"
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}}/me/allowedOrigins/:originId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/me/allowedOrigins/:originId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/me/allowedOrigins/:originId"
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/me/allowedOrigins/:originId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/me/allowedOrigins/:originId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/me/allowedOrigins/:originId"))
.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}}/me/allowedOrigins/:originId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/me/allowedOrigins/:originId")
.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}}/me/allowedOrigins/:originId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/me/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/me/allowedOrigins/:originId';
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}}/me/allowedOrigins/:originId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/me/allowedOrigins/:originId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/me/allowedOrigins/:originId',
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}}/me/allowedOrigins/:originId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/me/allowedOrigins/:originId');
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}}/me/allowedOrigins/:originId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/me/allowedOrigins/:originId';
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}}/me/allowedOrigins/:originId"]
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}}/me/allowedOrigins/:originId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/me/allowedOrigins/:originId",
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}}/me/allowedOrigins/:originId');
echo $response->getBody();
setUrl('{{baseUrl}}/me/allowedOrigins/:originId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/me/allowedOrigins/:originId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/me/allowedOrigins/:originId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/me/allowedOrigins/:originId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/me/allowedOrigins/:originId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/me/allowedOrigins/:originId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/me/allowedOrigins/:originId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/me/allowedOrigins/:originId")
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/me/allowedOrigins/:originId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/me/allowedOrigins/:originId";
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}}/me/allowedOrigins/:originId
http DELETE {{baseUrl}}/me/allowedOrigins/:originId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/me/allowedOrigins/:originId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/me/allowedOrigins/:originId")! 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()
POST
Add an Apple Pay domain
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains
QUERY PARAMS
merchantId
paymentMethodId
BODY json
{
"domains": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains");
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 \"domains\": [\n \"https://example.com\"\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains" {:content-type :json
:form-params {:domains ["https://example.com"]}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"domains\": [\n \"https://example.com\"\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"),
Content = new StringContent("{\n \"domains\": [\n \"https://example.com\"\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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"domains\": [\n \"https://example.com\"\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"
payload := strings.NewReader("{\n \"domains\": [\n \"https://example.com\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 48
{
"domains": [
"https://example.com"
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")
.setHeader("content-type", "application/json")
.setBody("{\n \"domains\": [\n \"https://example.com\"\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"domains\": [\n \"https://example.com\"\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 \"domains\": [\n \"https://example.com\"\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")
.header("content-type", "application/json")
.body("{\n \"domains\": [\n \"https://example.com\"\n ]\n}")
.asString();
const data = JSON.stringify({
domains: [
'https://example.com'
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains',
headers: {'content-type': 'application/json'},
data: {domains: ['https://example.com']}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domains":["https://example.com"]}'
};
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "domains": [\n "https://example.com"\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 \"domains\": [\n \"https://example.com\"\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")
.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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains',
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({domains: ['https://example.com']}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains',
headers: {'content-type': 'application/json'},
body: {domains: ['https://example.com']},
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
domains: [
'https://example.com'
]
});
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains',
headers: {'content-type': 'application/json'},
data: {domains: ['https://example.com']}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"domains":["https://example.com"]}'
};
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 = @{ @"domains": @[ @"https://example.com" ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"]
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"domains\": [\n \"https://example.com\"\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains",
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([
'domains' => [
'https://example.com'
]
]),
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains', [
'body' => '{
"domains": [
"https://example.com"
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'domains' => [
'https://example.com'
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'domains' => [
'https://example.com'
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains');
$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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domains": [
"https://example.com"
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"domains": [
"https://example.com"
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"domains\": [\n \"https://example.com\"\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"
payload = { "domains": ["https://example.com"] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains"
payload <- "{\n \"domains\": [\n \"https://example.com\"\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")
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 \"domains\": [\n \"https://example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains') do |req|
req.body = "{\n \"domains\": [\n \"https://example.com\"\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains";
let payload = json!({"domains": ("https://example.com")});
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains \
--header 'content-type: application/json' \
--data '{
"domains": [
"https://example.com"
]
}'
echo '{
"domains": [
"https://example.com"
]
}' | \
http POST {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "domains": [\n "https://example.com"\n ]\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["domains": ["https://example.com"]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/addApplePayDomains")! 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()
GET
Get Apple Pay domains
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains
QUERY PARAMS
merchantId
paymentMethodId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"
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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"))
.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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
.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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains';
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains',
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains');
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains';
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"]
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains",
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")
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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains";
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains
http GET {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId/getApplePayDomains")! 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()
GET
Get all payment methods
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
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}}/merchants/:merchantId/paymentMethodSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
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/merchants/:merchantId/paymentMethodSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"))
.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}}/merchants/:merchantId/paymentMethodSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.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}}/merchants/:merchantId/paymentMethodSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings';
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}}/merchants/:merchantId/paymentMethodSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/paymentMethodSettings',
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}}/merchants/:merchantId/paymentMethodSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
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}}/merchants/:merchantId/paymentMethodSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings';
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}}/merchants/:merchantId/paymentMethodSettings"]
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}}/merchants/:merchantId/paymentMethodSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings",
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}}/merchants/:merchantId/paymentMethodSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/paymentMethodSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
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/merchants/:merchantId/paymentMethodSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings";
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}}/merchants/:merchantId/paymentMethodSettings
http GET {{baseUrl}}/merchants/:merchantId/paymentMethodSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")! 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()
GET
Get payment method details
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
QUERY PARAMS
merchantId
paymentMethodId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"))
.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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId';
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId';
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"]
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId",
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId";
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
http GET {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")! 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()
POST
Request a payment method
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings
QUERY PARAMS
merchantId
BODY json
{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings");
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 \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings" {:content-type :json
:form-params {:applePay {:domains []}
:bcmc {:enableBcmcMobile false}
:businessLineId ""
:cartesBancaires {:siret ""}
:countries []
:currencies []
:customRoutingFlags []
:giroPay {:supportEmail ""}
:googlePay {:merchantId ""
:reuseMerchantId false}
:klarna {:autoCapture false
:disputeEmail ""
:region ""
:supportEmail ""}
:mealVoucher_FR {:conecsId ""
:siret ""
:subTypes []}
:paypal {:directCapture false
:payerId ""
:subject ""}
:reference ""
:shopperInteraction ""
:sofort {:currencyCode ""
:logo ""}
:storeId ""
:swish {:swishNumber ""}
:type ""
:vipps {:logo ""
:subscriptionCancelUrl ""}}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"),
Content = new StringContent("{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\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}}/merchants/:merchantId/paymentMethodSettings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
payload := strings.NewReader("{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/paymentMethodSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 858
{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\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 \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.header("content-type", "application/json")
.body("{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
applePay: {
domains: []
},
bcmc: {
enableBcmcMobile: false
},
businessLineId: '',
cartesBancaires: {
siret: ''
},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {
supportEmail: ''
},
googlePay: {
merchantId: '',
reuseMerchantId: false
},
klarna: {
autoCapture: false,
disputeEmail: '',
region: '',
supportEmail: ''
},
mealVoucher_FR: {
conecsId: '',
siret: '',
subTypes: []
},
paypal: {
directCapture: false,
payerId: '',
subject: ''
},
reference: '',
shopperInteraction: '',
sofort: {
currencyCode: '',
logo: ''
},
storeId: '',
swish: {
swishNumber: ''
},
type: '',
vipps: {
logo: '',
subscriptionCancelUrl: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings',
headers: {'content-type': 'application/json'},
data: {
applePay: {domains: []},
bcmc: {enableBcmcMobile: false},
businessLineId: '',
cartesBancaires: {siret: ''},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {supportEmail: ''},
googlePay: {merchantId: '', reuseMerchantId: false},
klarna: {autoCapture: false, disputeEmail: '', region: '', supportEmail: ''},
mealVoucher_FR: {conecsId: '', siret: '', subTypes: []},
paypal: {directCapture: false, payerId: '', subject: ''},
reference: '',
shopperInteraction: '',
sofort: {currencyCode: '', logo: ''},
storeId: '',
swish: {swishNumber: ''},
type: '',
vipps: {logo: '', subscriptionCancelUrl: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applePay":{"domains":[]},"bcmc":{"enableBcmcMobile":false},"businessLineId":"","cartesBancaires":{"siret":""},"countries":[],"currencies":[],"customRoutingFlags":[],"giroPay":{"supportEmail":""},"googlePay":{"merchantId":"","reuseMerchantId":false},"klarna":{"autoCapture":false,"disputeEmail":"","region":"","supportEmail":""},"mealVoucher_FR":{"conecsId":"","siret":"","subTypes":[]},"paypal":{"directCapture":false,"payerId":"","subject":""},"reference":"","shopperInteraction":"","sofort":{"currencyCode":"","logo":""},"storeId":"","swish":{"swishNumber":""},"type":"","vipps":{"logo":"","subscriptionCancelUrl":""}}'
};
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}}/merchants/:merchantId/paymentMethodSettings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "applePay": {\n "domains": []\n },\n "bcmc": {\n "enableBcmcMobile": false\n },\n "businessLineId": "",\n "cartesBancaires": {\n "siret": ""\n },\n "countries": [],\n "currencies": [],\n "customRoutingFlags": [],\n "giroPay": {\n "supportEmail": ""\n },\n "googlePay": {\n "merchantId": "",\n "reuseMerchantId": false\n },\n "klarna": {\n "autoCapture": false,\n "disputeEmail": "",\n "region": "",\n "supportEmail": ""\n },\n "mealVoucher_FR": {\n "conecsId": "",\n "siret": "",\n "subTypes": []\n },\n "paypal": {\n "directCapture": false,\n "payerId": "",\n "subject": ""\n },\n "reference": "",\n "shopperInteraction": "",\n "sofort": {\n "currencyCode": "",\n "logo": ""\n },\n "storeId": "",\n "swish": {\n "swishNumber": ""\n },\n "type": "",\n "vipps": {\n "logo": "",\n "subscriptionCancelUrl": ""\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 \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
.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/merchants/:merchantId/paymentMethodSettings',
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({
applePay: {domains: []},
bcmc: {enableBcmcMobile: false},
businessLineId: '',
cartesBancaires: {siret: ''},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {supportEmail: ''},
googlePay: {merchantId: '', reuseMerchantId: false},
klarna: {autoCapture: false, disputeEmail: '', region: '', supportEmail: ''},
mealVoucher_FR: {conecsId: '', siret: '', subTypes: []},
paypal: {directCapture: false, payerId: '', subject: ''},
reference: '',
shopperInteraction: '',
sofort: {currencyCode: '', logo: ''},
storeId: '',
swish: {swishNumber: ''},
type: '',
vipps: {logo: '', subscriptionCancelUrl: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings',
headers: {'content-type': 'application/json'},
body: {
applePay: {domains: []},
bcmc: {enableBcmcMobile: false},
businessLineId: '',
cartesBancaires: {siret: ''},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {supportEmail: ''},
googlePay: {merchantId: '', reuseMerchantId: false},
klarna: {autoCapture: false, disputeEmail: '', region: '', supportEmail: ''},
mealVoucher_FR: {conecsId: '', siret: '', subTypes: []},
paypal: {directCapture: false, payerId: '', subject: ''},
reference: '',
shopperInteraction: '',
sofort: {currencyCode: '', logo: ''},
storeId: '',
swish: {swishNumber: ''},
type: '',
vipps: {logo: '', subscriptionCancelUrl: ''}
},
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}}/merchants/:merchantId/paymentMethodSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
applePay: {
domains: []
},
bcmc: {
enableBcmcMobile: false
},
businessLineId: '',
cartesBancaires: {
siret: ''
},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {
supportEmail: ''
},
googlePay: {
merchantId: '',
reuseMerchantId: false
},
klarna: {
autoCapture: false,
disputeEmail: '',
region: '',
supportEmail: ''
},
mealVoucher_FR: {
conecsId: '',
siret: '',
subTypes: []
},
paypal: {
directCapture: false,
payerId: '',
subject: ''
},
reference: '',
shopperInteraction: '',
sofort: {
currencyCode: '',
logo: ''
},
storeId: '',
swish: {
swishNumber: ''
},
type: '',
vipps: {
logo: '',
subscriptionCancelUrl: ''
}
});
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}}/merchants/:merchantId/paymentMethodSettings',
headers: {'content-type': 'application/json'},
data: {
applePay: {domains: []},
bcmc: {enableBcmcMobile: false},
businessLineId: '',
cartesBancaires: {siret: ''},
countries: [],
currencies: [],
customRoutingFlags: [],
giroPay: {supportEmail: ''},
googlePay: {merchantId: '', reuseMerchantId: false},
klarna: {autoCapture: false, disputeEmail: '', region: '', supportEmail: ''},
mealVoucher_FR: {conecsId: '', siret: '', subTypes: []},
paypal: {directCapture: false, payerId: '', subject: ''},
reference: '',
shopperInteraction: '',
sofort: {currencyCode: '', logo: ''},
storeId: '',
swish: {swishNumber: ''},
type: '',
vipps: {logo: '', subscriptionCancelUrl: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"applePay":{"domains":[]},"bcmc":{"enableBcmcMobile":false},"businessLineId":"","cartesBancaires":{"siret":""},"countries":[],"currencies":[],"customRoutingFlags":[],"giroPay":{"supportEmail":""},"googlePay":{"merchantId":"","reuseMerchantId":false},"klarna":{"autoCapture":false,"disputeEmail":"","region":"","supportEmail":""},"mealVoucher_FR":{"conecsId":"","siret":"","subTypes":[]},"paypal":{"directCapture":false,"payerId":"","subject":""},"reference":"","shopperInteraction":"","sofort":{"currencyCode":"","logo":""},"storeId":"","swish":{"swishNumber":""},"type":"","vipps":{"logo":"","subscriptionCancelUrl":""}}'
};
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 = @{ @"applePay": @{ @"domains": @[ ] },
@"bcmc": @{ @"enableBcmcMobile": @NO },
@"businessLineId": @"",
@"cartesBancaires": @{ @"siret": @"" },
@"countries": @[ ],
@"currencies": @[ ],
@"customRoutingFlags": @[ ],
@"giroPay": @{ @"supportEmail": @"" },
@"googlePay": @{ @"merchantId": @"", @"reuseMerchantId": @NO },
@"klarna": @{ @"autoCapture": @NO, @"disputeEmail": @"", @"region": @"", @"supportEmail": @"" },
@"mealVoucher_FR": @{ @"conecsId": @"", @"siret": @"", @"subTypes": @[ ] },
@"paypal": @{ @"directCapture": @NO, @"payerId": @"", @"subject": @"" },
@"reference": @"",
@"shopperInteraction": @"",
@"sofort": @{ @"currencyCode": @"", @"logo": @"" },
@"storeId": @"",
@"swish": @{ @"swishNumber": @"" },
@"type": @"",
@"vipps": @{ @"logo": @"", @"subscriptionCancelUrl": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"]
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}}/merchants/:merchantId/paymentMethodSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings",
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([
'applePay' => [
'domains' => [
]
],
'bcmc' => [
'enableBcmcMobile' => null
],
'businessLineId' => '',
'cartesBancaires' => [
'siret' => ''
],
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'giroPay' => [
'supportEmail' => ''
],
'googlePay' => [
'merchantId' => '',
'reuseMerchantId' => null
],
'klarna' => [
'autoCapture' => null,
'disputeEmail' => '',
'region' => '',
'supportEmail' => ''
],
'mealVoucher_FR' => [
'conecsId' => '',
'siret' => '',
'subTypes' => [
]
],
'paypal' => [
'directCapture' => null,
'payerId' => '',
'subject' => ''
],
'reference' => '',
'shopperInteraction' => '',
'sofort' => [
'currencyCode' => '',
'logo' => ''
],
'storeId' => '',
'swish' => [
'swishNumber' => ''
],
'type' => '',
'vipps' => [
'logo' => '',
'subscriptionCancelUrl' => ''
]
]),
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}}/merchants/:merchantId/paymentMethodSettings', [
'body' => '{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'applePay' => [
'domains' => [
]
],
'bcmc' => [
'enableBcmcMobile' => null
],
'businessLineId' => '',
'cartesBancaires' => [
'siret' => ''
],
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'giroPay' => [
'supportEmail' => ''
],
'googlePay' => [
'merchantId' => '',
'reuseMerchantId' => null
],
'klarna' => [
'autoCapture' => null,
'disputeEmail' => '',
'region' => '',
'supportEmail' => ''
],
'mealVoucher_FR' => [
'conecsId' => '',
'siret' => '',
'subTypes' => [
]
],
'paypal' => [
'directCapture' => null,
'payerId' => '',
'subject' => ''
],
'reference' => '',
'shopperInteraction' => '',
'sofort' => [
'currencyCode' => '',
'logo' => ''
],
'storeId' => '',
'swish' => [
'swishNumber' => ''
],
'type' => '',
'vipps' => [
'logo' => '',
'subscriptionCancelUrl' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'applePay' => [
'domains' => [
]
],
'bcmc' => [
'enableBcmcMobile' => null
],
'businessLineId' => '',
'cartesBancaires' => [
'siret' => ''
],
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'giroPay' => [
'supportEmail' => ''
],
'googlePay' => [
'merchantId' => '',
'reuseMerchantId' => null
],
'klarna' => [
'autoCapture' => null,
'disputeEmail' => '',
'region' => '',
'supportEmail' => ''
],
'mealVoucher_FR' => [
'conecsId' => '',
'siret' => '',
'subTypes' => [
]
],
'paypal' => [
'directCapture' => null,
'payerId' => '',
'subject' => ''
],
'reference' => '',
'shopperInteraction' => '',
'sofort' => [
'currencyCode' => '',
'logo' => ''
],
'storeId' => '',
'swish' => [
'swishNumber' => ''
],
'type' => '',
'vipps' => [
'logo' => '',
'subscriptionCancelUrl' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings');
$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}}/merchants/:merchantId/paymentMethodSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/paymentMethodSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
payload = {
"applePay": { "domains": [] },
"bcmc": { "enableBcmcMobile": False },
"businessLineId": "",
"cartesBancaires": { "siret": "" },
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": { "supportEmail": "" },
"googlePay": {
"merchantId": "",
"reuseMerchantId": False
},
"klarna": {
"autoCapture": False,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": False,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": { "swishNumber": "" },
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings"
payload <- "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")
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 \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/merchants/:merchantId/paymentMethodSettings') do |req|
req.body = "{\n \"applePay\": {\n \"domains\": []\n },\n \"bcmc\": {\n \"enableBcmcMobile\": false\n },\n \"businessLineId\": \"\",\n \"cartesBancaires\": {\n \"siret\": \"\"\n },\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"giroPay\": {\n \"supportEmail\": \"\"\n },\n \"googlePay\": {\n \"merchantId\": \"\",\n \"reuseMerchantId\": false\n },\n \"klarna\": {\n \"autoCapture\": false,\n \"disputeEmail\": \"\",\n \"region\": \"\",\n \"supportEmail\": \"\"\n },\n \"mealVoucher_FR\": {\n \"conecsId\": \"\",\n \"siret\": \"\",\n \"subTypes\": []\n },\n \"paypal\": {\n \"directCapture\": false,\n \"payerId\": \"\",\n \"subject\": \"\"\n },\n \"reference\": \"\",\n \"shopperInteraction\": \"\",\n \"sofort\": {\n \"currencyCode\": \"\",\n \"logo\": \"\"\n },\n \"storeId\": \"\",\n \"swish\": {\n \"swishNumber\": \"\"\n },\n \"type\": \"\",\n \"vipps\": {\n \"logo\": \"\",\n \"subscriptionCancelUrl\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings";
let payload = json!({
"applePay": json!({"domains": ()}),
"bcmc": json!({"enableBcmcMobile": false}),
"businessLineId": "",
"cartesBancaires": json!({"siret": ""}),
"countries": (),
"currencies": (),
"customRoutingFlags": (),
"giroPay": json!({"supportEmail": ""}),
"googlePay": json!({
"merchantId": "",
"reuseMerchantId": false
}),
"klarna": json!({
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
}),
"mealVoucher_FR": json!({
"conecsId": "",
"siret": "",
"subTypes": ()
}),
"paypal": json!({
"directCapture": false,
"payerId": "",
"subject": ""
}),
"reference": "",
"shopperInteraction": "",
"sofort": json!({
"currencyCode": "",
"logo": ""
}),
"storeId": "",
"swish": json!({"swishNumber": ""}),
"type": "",
"vipps": json!({
"logo": "",
"subscriptionCancelUrl": ""
})
});
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}}/merchants/:merchantId/paymentMethodSettings \
--header 'content-type: application/json' \
--data '{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}'
echo '{
"applePay": {
"domains": []
},
"bcmc": {
"enableBcmcMobile": false
},
"businessLineId": "",
"cartesBancaires": {
"siret": ""
},
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": {
"supportEmail": ""
},
"googlePay": {
"merchantId": "",
"reuseMerchantId": false
},
"klarna": {
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
},
"mealVoucher_FR": {
"conecsId": "",
"siret": "",
"subTypes": []
},
"paypal": {
"directCapture": false,
"payerId": "",
"subject": ""
},
"reference": "",
"shopperInteraction": "",
"sofort": {
"currencyCode": "",
"logo": ""
},
"storeId": "",
"swish": {
"swishNumber": ""
},
"type": "",
"vipps": {
"logo": "",
"subscriptionCancelUrl": ""
}
}' | \
http POST {{baseUrl}}/merchants/:merchantId/paymentMethodSettings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "applePay": {\n "domains": []\n },\n "bcmc": {\n "enableBcmcMobile": false\n },\n "businessLineId": "",\n "cartesBancaires": {\n "siret": ""\n },\n "countries": [],\n "currencies": [],\n "customRoutingFlags": [],\n "giroPay": {\n "supportEmail": ""\n },\n "googlePay": {\n "merchantId": "",\n "reuseMerchantId": false\n },\n "klarna": {\n "autoCapture": false,\n "disputeEmail": "",\n "region": "",\n "supportEmail": ""\n },\n "mealVoucher_FR": {\n "conecsId": "",\n "siret": "",\n "subTypes": []\n },\n "paypal": {\n "directCapture": false,\n "payerId": "",\n "subject": ""\n },\n "reference": "",\n "shopperInteraction": "",\n "sofort": {\n "currencyCode": "",\n "logo": ""\n },\n "storeId": "",\n "swish": {\n "swishNumber": ""\n },\n "type": "",\n "vipps": {\n "logo": "",\n "subscriptionCancelUrl": ""\n }\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"applePay": ["domains": []],
"bcmc": ["enableBcmcMobile": false],
"businessLineId": "",
"cartesBancaires": ["siret": ""],
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"giroPay": ["supportEmail": ""],
"googlePay": [
"merchantId": "",
"reuseMerchantId": false
],
"klarna": [
"autoCapture": false,
"disputeEmail": "",
"region": "",
"supportEmail": ""
],
"mealVoucher_FR": [
"conecsId": "",
"siret": "",
"subTypes": []
],
"paypal": [
"directCapture": false,
"payerId": "",
"subject": ""
],
"reference": "",
"shopperInteraction": "",
"sofort": [
"currencyCode": "",
"logo": ""
],
"storeId": "",
"swish": ["swishNumber": ""],
"type": "",
"vipps": [
"logo": "",
"subscriptionCancelUrl": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings")! 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
{
"countries": [
"US"
],
"currencies": [
"USD"
],
"id": "PM3227C223224K5FH84M8CBNH",
"type": "visa"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"businessLineId": "BL322KV223222D5F8H2J4BQ6C",
"countries": [
"SE"
],
"currencies": [
"SEK"
],
"id": "PM3227C223224K5FH84M8CBNH",
"storeId": "ST322LJ223223K5F4SQNR9XL5",
"swish": {
"swishNumber": "1231111111"
},
"type": "swish"
}
PATCH
Update a payment method
{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
QUERY PARAMS
merchantId
paymentMethodId
BODY json
{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId");
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 \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId" {:content-type :json
:form-params {:countries []
:currencies []
:customRoutingFlags []
:enabled false
:shopperStatement {:doingBusinessAsName ""
:type ""}
:storeIds []}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"),
Content = new StringContent("{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
payload := strings.NewReader("{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 182
{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.setHeader("content-type", "application/json")
.setBody("{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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 \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.header("content-type", "application/json")
.body("{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}")
.asString();
const data = JSON.stringify({
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {
doingBusinessAsName: '',
type: ''
},
storeIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
headers: {'content-type': 'application/json'},
data: {
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {doingBusinessAsName: '', type: ''},
storeIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"countries":[],"currencies":[],"customRoutingFlags":[],"enabled":false,"shopperStatement":{"doingBusinessAsName":"","type":""},"storeIds":[]}'
};
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "countries": [],\n "currencies": [],\n "customRoutingFlags": [],\n "enabled": false,\n "shopperStatement": {\n "doingBusinessAsName": "",\n "type": ""\n },\n "storeIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
.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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
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({
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {doingBusinessAsName: '', type: ''},
storeIds: []
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
headers: {'content-type': 'application/json'},
body: {
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {doingBusinessAsName: '', type: ''},
storeIds: []
},
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {
doingBusinessAsName: '',
type: ''
},
storeIds: []
});
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId',
headers: {'content-type': 'application/json'},
data: {
countries: [],
currencies: [],
customRoutingFlags: [],
enabled: false,
shopperStatement: {doingBusinessAsName: '', type: ''},
storeIds: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"countries":[],"currencies":[],"customRoutingFlags":[],"enabled":false,"shopperStatement":{"doingBusinessAsName":"","type":""},"storeIds":[]}'
};
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 = @{ @"countries": @[ ],
@"currencies": @[ ],
@"customRoutingFlags": @[ ],
@"enabled": @NO,
@"shopperStatement": @{ @"doingBusinessAsName": @"", @"type": @"" },
@"storeIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"]
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId",
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([
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'enabled' => null,
'shopperStatement' => [
'doingBusinessAsName' => '',
'type' => ''
],
'storeIds' => [
]
]),
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId', [
'body' => '{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'enabled' => null,
'shopperStatement' => [
'doingBusinessAsName' => '',
'type' => ''
],
'storeIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'countries' => [
],
'currencies' => [
],
'customRoutingFlags' => [
],
'enabled' => null,
'shopperStatement' => [
'doingBusinessAsName' => '',
'type' => ''
],
'storeIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId');
$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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/paymentMethodSettings/:paymentMethodId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
payload = {
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": False,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId"
payload <- "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")
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 \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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/merchants/:merchantId/paymentMethodSettings/:paymentMethodId') do |req|
req.body = "{\n \"countries\": [],\n \"currencies\": [],\n \"customRoutingFlags\": [],\n \"enabled\": false,\n \"shopperStatement\": {\n \"doingBusinessAsName\": \"\",\n \"type\": \"\"\n },\n \"storeIds\": []\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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId";
let payload = json!({
"countries": (),
"currencies": (),
"customRoutingFlags": (),
"enabled": false,
"shopperStatement": json!({
"doingBusinessAsName": "",
"type": ""
}),
"storeIds": ()
});
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}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId \
--header 'content-type: application/json' \
--data '{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}'
echo '{
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": {
"doingBusinessAsName": "",
"type": ""
},
"storeIds": []
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "countries": [],\n "currencies": [],\n "customRoutingFlags": [],\n "enabled": false,\n "shopperStatement": {\n "doingBusinessAsName": "",\n "type": ""\n },\n "storeIds": []\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"countries": [],
"currencies": [],
"customRoutingFlags": [],
"enabled": false,
"shopperStatement": [
"doingBusinessAsName": "",
"type": ""
],
"storeIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/paymentMethodSettings/:paymentMethodId")! 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()
POST
Add a payout setting
{{baseUrl}}/merchants/:merchantId/payoutSettings
QUERY PARAMS
merchantId
BODY json
{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/payoutSettings");
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 \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/payoutSettings" {:content-type :json
:form-params {:enabled false
:enabledFromDate ""
:transferInstrumentId ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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}}/merchants/:merchantId/payoutSettings"),
Content = new StringContent("{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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}}/merchants/:merchantId/payoutSettings");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/payoutSettings"
payload := strings.NewReader("{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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/merchants/:merchantId/payoutSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 77
{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/payoutSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/payoutSettings"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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 \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/payoutSettings")
.header("content-type", "application/json")
.body("{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}")
.asString();
const data = JSON.stringify({
enabled: false,
enabledFromDate: '',
transferInstrumentId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/payoutSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings',
headers: {'content-type': 'application/json'},
data: {enabled: false, enabledFromDate: '', transferInstrumentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enabled":false,"enabledFromDate":"","transferInstrumentId":""}'
};
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}}/merchants/:merchantId/payoutSettings',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "enabled": false,\n "enabledFromDate": "",\n "transferInstrumentId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings")
.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/merchants/:merchantId/payoutSettings',
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({enabled: false, enabledFromDate: '', transferInstrumentId: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings',
headers: {'content-type': 'application/json'},
body: {enabled: false, enabledFromDate: '', transferInstrumentId: ''},
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}}/merchants/:merchantId/payoutSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
enabled: false,
enabledFromDate: '',
transferInstrumentId: ''
});
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}}/merchants/:merchantId/payoutSettings',
headers: {'content-type': 'application/json'},
data: {enabled: false, enabledFromDate: '', transferInstrumentId: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"enabled":false,"enabledFromDate":"","transferInstrumentId":""}'
};
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 = @{ @"enabled": @NO,
@"enabledFromDate": @"",
@"transferInstrumentId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/payoutSettings"]
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}}/merchants/:merchantId/payoutSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/payoutSettings",
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([
'enabled' => null,
'enabledFromDate' => '',
'transferInstrumentId' => ''
]),
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}}/merchants/:merchantId/payoutSettings', [
'body' => '{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'enabled' => null,
'enabledFromDate' => '',
'transferInstrumentId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'enabled' => null,
'enabledFromDate' => '',
'transferInstrumentId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings');
$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}}/merchants/:merchantId/payoutSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/payoutSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings"
payload = {
"enabled": False,
"enabledFromDate": "",
"transferInstrumentId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/payoutSettings"
payload <- "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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}}/merchants/:merchantId/payoutSettings")
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 \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\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/merchants/:merchantId/payoutSettings') do |req|
req.body = "{\n \"enabled\": false,\n \"enabledFromDate\": \"\",\n \"transferInstrumentId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/payoutSettings";
let payload = json!({
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
});
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}}/merchants/:merchantId/payoutSettings \
--header 'content-type: application/json' \
--data '{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}'
echo '{
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/payoutSettings \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "enabled": false,\n "enabledFromDate": "",\n "transferInstrumentId": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/payoutSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"enabled": false,
"enabledFromDate": "",
"transferInstrumentId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/payoutSettings")! 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()
DELETE
Delete a payout setting
{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
QUERY PARAMS
merchantId
payoutSettingsId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
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/merchants/:merchantId/payoutSettings/:payoutSettingsId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"))
.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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId',
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"]
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId",
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
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/merchants/:merchantId/payoutSettings/:payoutSettingsId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId";
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
http DELETE {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")! 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()
GET
Get a list of payout settings
{{baseUrl}}/merchants/:merchantId/payoutSettings
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/payoutSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/payoutSettings")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings"
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}}/merchants/:merchantId/payoutSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/payoutSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/payoutSettings"
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/merchants/:merchantId/payoutSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/payoutSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/payoutSettings"))
.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}}/merchants/:merchantId/payoutSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/payoutSettings")
.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}}/merchants/:merchantId/payoutSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings';
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}}/merchants/:merchantId/payoutSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/payoutSettings',
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}}/merchants/:merchantId/payoutSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/payoutSettings');
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}}/merchants/:merchantId/payoutSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings';
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}}/merchants/:merchantId/payoutSettings"]
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}}/merchants/:merchantId/payoutSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/payoutSettings",
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}}/merchants/:merchantId/payoutSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/payoutSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/payoutSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/payoutSettings")
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/merchants/:merchantId/payoutSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/payoutSettings";
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}}/merchants/:merchantId/payoutSettings
http GET {{baseUrl}}/merchants/:merchantId/payoutSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/payoutSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/payoutSettings")! 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()
GET
Get a payout setting
{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
QUERY PARAMS
merchantId
payoutSettingsId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
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/merchants/:merchantId/payoutSettings/:payoutSettingsId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"))
.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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId',
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"]
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId",
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
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/merchants/:merchantId/payoutSettings/:payoutSettingsId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId";
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
http GET {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")! 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()
PATCH
Update a payout setting
{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
QUERY PARAMS
merchantId
payoutSettingsId
BODY json
{
"enabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
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 \"enabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId" {:content-type :json
:form-params {:enabled false}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"enabled\": false\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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"),
Content = new StringContent("{\n \"enabled\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"enabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
payload := strings.NewReader("{\n \"enabled\": false\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/merchants/:merchantId/payoutSettings/:payoutSettingsId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 22
{
"enabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.setHeader("content-type", "application/json")
.setBody("{\n \"enabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"enabled\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"enabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.header("content-type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();
const data = JSON.stringify({
enabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
headers: {'content-type': 'application/json'},
data: {enabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"enabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "enabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"enabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
.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/merchants/:merchantId/payoutSettings/:payoutSettingsId',
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({enabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
headers: {'content-type': 'application/json'},
body: {enabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
enabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId',
headers: {'content-type': 'application/json'},
data: {enabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"enabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"enabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"]
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"enabled\": false\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId",
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([
'enabled' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId', [
'body' => '{
"enabled": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'enabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'enabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId');
$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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"enabled": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"enabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"enabled\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
payload = { "enabled": False }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId"
payload <- "{\n \"enabled\": false\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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")
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 \"enabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/merchants/:merchantId/payoutSettings/:payoutSettingsId') do |req|
req.body = "{\n \"enabled\": false\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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId";
let payload = json!({"enabled": false});
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}}/merchants/:merchantId/payoutSettings/:payoutSettingsId \
--header 'content-type: application/json' \
--data '{
"enabled": false
}'
echo '{
"enabled": false
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "enabled": false\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["enabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/payoutSettings/:payoutSettingsId")! 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()
GET
Get a list of Android apps
{{baseUrl}}/companies/:companyId/androidApps
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/androidApps");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/androidApps")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/androidApps"
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}}/companies/:companyId/androidApps"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/androidApps");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/androidApps"
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/companies/:companyId/androidApps HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/androidApps")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/androidApps"))
.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}}/companies/:companyId/androidApps")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/androidApps")
.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}}/companies/:companyId/androidApps');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/androidApps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/androidApps';
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}}/companies/:companyId/androidApps',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/androidApps")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/androidApps',
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}}/companies/:companyId/androidApps'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/androidApps');
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}}/companies/:companyId/androidApps'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/androidApps';
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}}/companies/:companyId/androidApps"]
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}}/companies/:companyId/androidApps" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/androidApps",
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}}/companies/:companyId/androidApps');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/androidApps');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/androidApps');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/androidApps' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/androidApps' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/androidApps")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/androidApps"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/androidApps"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/androidApps")
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/companies/:companyId/androidApps') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/androidApps";
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}}/companies/:companyId/androidApps
http GET {{baseUrl}}/companies/:companyId/androidApps
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/androidApps
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/androidApps")! 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
{
"androidApps": [
{
"description": "POS2",
"id": "ANDA422LZ223223K5F694GCCF732K8",
"label": "POS system",
"packageName": "com.your_company.posapp",
"status": "ready",
"versionCode": 7700203,
"versionName": "7.7"
},
{
"description": "POS1",
"id": "ANDA422LZ223223K5F694FWCF738PL",
"label": "POS system",
"packageName": "com.your_company.posapp",
"status": "ready",
"versionCode": 7602003,
"versionName": "7.6"
}
]
}
GET
Get a list of Android certificates
{{baseUrl}}/companies/:companyId/androidCertificates
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/androidCertificates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/androidCertificates")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/androidCertificates"
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}}/companies/:companyId/androidCertificates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/androidCertificates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/androidCertificates"
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/companies/:companyId/androidCertificates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/androidCertificates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/androidCertificates"))
.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}}/companies/:companyId/androidCertificates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/androidCertificates")
.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}}/companies/:companyId/androidCertificates');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/androidCertificates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/androidCertificates';
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}}/companies/:companyId/androidCertificates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/androidCertificates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/androidCertificates',
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}}/companies/:companyId/androidCertificates'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/androidCertificates');
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}}/companies/:companyId/androidCertificates'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/androidCertificates';
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}}/companies/:companyId/androidCertificates"]
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}}/companies/:companyId/androidCertificates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/androidCertificates",
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}}/companies/:companyId/androidCertificates');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/androidCertificates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/androidCertificates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/androidCertificates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/androidCertificates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/androidCertificates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/androidCertificates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/androidCertificates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/androidCertificates")
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/companies/:companyId/androidCertificates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/androidCertificates";
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}}/companies/:companyId/androidCertificates
http GET {{baseUrl}}/companies/:companyId/androidCertificates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/androidCertificates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/androidCertificates")! 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
{
"androidCertificates": [
{
"description": "",
"extension": ".crt",
"id": "ANDC422LZ223223K5F78NVN9SL4VPH",
"name": "mycert",
"notAfter": "2038-04-12T00:00:00+02:00",
"notBefore": "2008-04-20T00:00:00+02:00",
"status": "ready"
},
{
"description": "",
"extension": ".pem",
"id": "ANDC533MA33433L689OWO0TM5WQI",
"name": "mynewcert",
"notAfter": "2048-04-12T00:00:00+02:00",
"notBefore": "20018-04-20T00:00:00+02:00",
"status": "ready"
}
]
}
GET
Get a list of terminal actions
{{baseUrl}}/companies/:companyId/terminalActions
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalActions");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalActions")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalActions"
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}}/companies/:companyId/terminalActions"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalActions");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalActions"
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/companies/:companyId/terminalActions HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalActions")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalActions"))
.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}}/companies/:companyId/terminalActions")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalActions")
.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}}/companies/:companyId/terminalActions');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalActions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalActions';
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}}/companies/:companyId/terminalActions',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalActions")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalActions',
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}}/companies/:companyId/terminalActions'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalActions');
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}}/companies/:companyId/terminalActions'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalActions';
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}}/companies/:companyId/terminalActions"]
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}}/companies/:companyId/terminalActions" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalActions",
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}}/companies/:companyId/terminalActions');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalActions');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalActions');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalActions' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalActions' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalActions")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalActions"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalActions"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalActions")
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/companies/:companyId/terminalActions') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalActions";
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}}/companies/:companyId/terminalActions
http GET {{baseUrl}}/companies/:companyId/terminalActions
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalActions
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalActions")! 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
{
"data": [
{
"actionType": "InstallAndroidApp",
"config": "{\"apps\":\"com.adyen.android.calculator:103\"}",
"confirmedAt": "2021-11-10T00:00:00+01:00",
"id": "TRAC422T2223223K5GFMQHM6WQ4KB6",
"result": "Cancelled manually by user USER@Psp.AdyenPspService",
"scheduledAt": "2021-11-10T14:53:05+01:00",
"status": "cancelled",
"terminalId": "S1E-000150183300032"
}
]
}
GET
Get terminal action
{{baseUrl}}/companies/:companyId/terminalActions/:actionId
QUERY PARAMS
companyId
actionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalActions/:actionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalActions/:actionId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalActions/:actionId"
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}}/companies/:companyId/terminalActions/:actionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalActions/:actionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalActions/:actionId"
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/companies/:companyId/terminalActions/:actionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalActions/:actionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalActions/:actionId"))
.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}}/companies/:companyId/terminalActions/:actionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalActions/:actionId")
.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}}/companies/:companyId/terminalActions/:actionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalActions/:actionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalActions/:actionId';
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}}/companies/:companyId/terminalActions/:actionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalActions/:actionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalActions/:actionId',
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}}/companies/:companyId/terminalActions/:actionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalActions/:actionId');
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}}/companies/:companyId/terminalActions/:actionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalActions/:actionId';
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}}/companies/:companyId/terminalActions/:actionId"]
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}}/companies/:companyId/terminalActions/:actionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalActions/:actionId",
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}}/companies/:companyId/terminalActions/:actionId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalActions/:actionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalActions/:actionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalActions/:actionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalActions/:actionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalActions/:actionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalActions/:actionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalActions/:actionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalActions/:actionId")
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/companies/:companyId/terminalActions/:actionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalActions/:actionId";
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}}/companies/:companyId/terminalActions/:actionId
http GET {{baseUrl}}/companies/:companyId/terminalActions/:actionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalActions/:actionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalActions/:actionId")! 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
{
"data": [
{
"actionType": "InstallAndroidCertificate",
"config": "{\"certificates\":\"5dff6b...\"}",
"confirmedAt": "2022-06-27T17:44:54+02:00",
"id": "TRAC4224Z223223K5GD89RLBWQ6CWT",
"result": "Ok",
"scheduledAt": "2022-06-27T15:44:07+02:00",
"status": "successful",
"terminalId": "S1F2-000150183300034"
}
]
}
POST
Create a terminal action
{{baseUrl}}/terminals/scheduleActions
BODY json
{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals/scheduleActions");
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 \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/terminals/scheduleActions" {:content-type :json
:form-params {:actionDetails ""
:scheduledAt ""
:storeId ""
:terminalIds []}})
require "http/client"
url = "{{baseUrl}}/terminals/scheduleActions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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}}/terminals/scheduleActions"),
Content = new StringContent("{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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}}/terminals/scheduleActions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals/scheduleActions"
payload := strings.NewReader("{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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/terminals/scheduleActions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 84
{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/terminals/scheduleActions")
.setHeader("content-type", "application/json")
.setBody("{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals/scheduleActions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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 \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/terminals/scheduleActions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/terminals/scheduleActions")
.header("content-type", "application/json")
.body("{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}")
.asString();
const data = JSON.stringify({
actionDetails: '',
scheduledAt: '',
storeId: '',
terminalIds: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/terminals/scheduleActions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/terminals/scheduleActions',
headers: {'content-type': 'application/json'},
data: {actionDetails: '', scheduledAt: '', storeId: '', terminalIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals/scheduleActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionDetails":"","scheduledAt":"","storeId":"","terminalIds":[]}'
};
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}}/terminals/scheduleActions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "actionDetails": "",\n "scheduledAt": "",\n "storeId": "",\n "terminalIds": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/terminals/scheduleActions")
.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/terminals/scheduleActions',
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({actionDetails: '', scheduledAt: '', storeId: '', terminalIds: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/terminals/scheduleActions',
headers: {'content-type': 'application/json'},
body: {actionDetails: '', scheduledAt: '', storeId: '', terminalIds: []},
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}}/terminals/scheduleActions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
actionDetails: '',
scheduledAt: '',
storeId: '',
terminalIds: []
});
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}}/terminals/scheduleActions',
headers: {'content-type': 'application/json'},
data: {actionDetails: '', scheduledAt: '', storeId: '', terminalIds: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals/scheduleActions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"actionDetails":"","scheduledAt":"","storeId":"","terminalIds":[]}'
};
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 = @{ @"actionDetails": @"",
@"scheduledAt": @"",
@"storeId": @"",
@"terminalIds": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/terminals/scheduleActions"]
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}}/terminals/scheduleActions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals/scheduleActions",
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([
'actionDetails' => '',
'scheduledAt' => '',
'storeId' => '',
'terminalIds' => [
]
]),
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}}/terminals/scheduleActions', [
'body' => '{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/terminals/scheduleActions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'actionDetails' => '',
'scheduledAt' => '',
'storeId' => '',
'terminalIds' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'actionDetails' => '',
'scheduledAt' => '',
'storeId' => '',
'terminalIds' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/terminals/scheduleActions');
$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}}/terminals/scheduleActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals/scheduleActions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/terminals/scheduleActions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals/scheduleActions"
payload = {
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals/scheduleActions"
payload <- "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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}}/terminals/scheduleActions")
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 \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\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/terminals/scheduleActions') do |req|
req.body = "{\n \"actionDetails\": \"\",\n \"scheduledAt\": \"\",\n \"storeId\": \"\",\n \"terminalIds\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/terminals/scheduleActions";
let payload = json!({
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": ()
});
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}}/terminals/scheduleActions \
--header 'content-type: application/json' \
--data '{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}'
echo '{
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
}' | \
http POST {{baseUrl}}/terminals/scheduleActions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "actionDetails": "",\n "scheduledAt": "",\n "storeId": "",\n "terminalIds": []\n}' \
--output-document \
- {{baseUrl}}/terminals/scheduleActions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"actionDetails": "",
"scheduledAt": "",
"storeId": "",
"terminalIds": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals/scheduleActions")! 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
{
"actionDetails": {
"appId": "ANDA422LZ223223K5F694GCCF732K8",
"type": "InstallAndroidApp"
},
"items": [
{
"id": "TRAC422T2223223K5GFMQHM6WQ4KB6",
"terminalId": "S1E-000150183300032"
},
{
"id": "TRAC4224X22338VQ5GD4CQJCQT5PC2",
"terminalId": "S1E-000150183300033"
},
{
"id": "TRAC4224Z223223K5GD89RLBWQ6CWT",
"terminalId": "S1F2-000150183300034"
}
],
"scheduledAt": "2021-12-12T20:21:22-0100",
"storeId": "",
"terminalIds": [
"S1E-000150183300032",
"S1E-000150183300033",
"S1F2-000150183300034"
],
"terminalsWithErrors": {},
"totalErrors": 0,
"totalScheduled": 3
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"actionDetails": {
"certificateId": "ANDC422LZ223223K5F78NVN9SL4VPH",
"type": "UninstallAndroidCertificate"
},
"items": [
{
"id": "TRAC422T2223223K5GFMQHM6WQ4KB6",
"terminalId": "S1E-000150183300032"
},
{
"id": "TRAC4224X22338VQ5GD4CQJCQT5PC2",
"terminalId": "S1E-000150183300033"
},
{
"id": "TRAC4224Z223223K5GD89RLBWQ6CWT",
"terminalId": "S1F2-000150183300034"
}
],
"scheduledAt": "2021-12-12T20:21:22-0100",
"storeId": "",
"terminalIds": [
"S1E-000150183300032",
"S1E-000150183300033",
"S1F2-000150183300034"
],
"terminalsWithErrors": {},
"totalErrors": 0,
"totalScheduled": 3
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"detail": "Terminal IDs are empty",
"errorCode": "02_005",
"status": 422,
"title": "Terminal ID verification failed.",
"type": "https://docs.adyen.com/errors/unprocessable-entity"
}
POST
Cancel an order
{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel
QUERY PARAMS
companyId
orderId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/companies/:companyId/terminalOrders/:orderId/cancel HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalOrders/:orderId/cancel',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel');
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}}/companies/:companyId/terminalOrders/:orderId/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/companies/:companyId/terminalOrders/:orderId/cancel")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/companies/:companyId/terminalOrders/:orderId/cancel') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel
http POST {{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "Netherlands",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "5265677890100681",
"items": [
{
"id": "TBOX-V400m-684-EU",
"name": "V400m Package",
"quantity": 1
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"quantity": 1
}
],
"orderDate": "2022-01-20T14:12:33Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"country": "Netherlands",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
"status": "Cancelled"
}
POST
Create a shipping location
{{baseUrl}}/companies/:companyId/shippingLocations
QUERY PARAMS
companyId
BODY json
{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/shippingLocations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/shippingLocations" {:content-type :json
:form-params {:address {:city ""
:companyName ""
:country ""
:postalCode ""
:stateOrProvince ""
:streetAddress ""
:streetAddress2 ""}
:contact {:email ""
:firstName ""
:infix ""
:lastName ""
:phoneNumber ""}
:id ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/shippingLocations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/companies/:companyId/shippingLocations"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/companies/:companyId/shippingLocations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/shippingLocations"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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/companies/:companyId/shippingLocations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 322
{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/shippingLocations")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/shippingLocations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/shippingLocations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/shippingLocations")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {
email: '',
firstName: '',
infix: '',
lastName: '',
phoneNumber: ''
},
id: '',
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/shippingLocations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/shippingLocations',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/shippingLocations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","companyName":"","country":"","postalCode":"","stateOrProvince":"","streetAddress":"","streetAddress2":""},"contact":{"email":"","firstName":"","infix":"","lastName":"","phoneNumber":""},"id":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/shippingLocations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "companyName": "",\n "country": "",\n "postalCode": "",\n "stateOrProvince": "",\n "streetAddress": "",\n "streetAddress2": ""\n },\n "contact": {\n "email": "",\n "firstName": "",\n "infix": "",\n "lastName": "",\n "phoneNumber": ""\n },\n "id": "",\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/shippingLocations")
.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/companies/:companyId/shippingLocations',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/shippingLocations',
headers: {'content-type': 'application/json'},
body: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/shippingLocations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {
email: '',
firstName: '',
infix: '',
lastName: '',
phoneNumber: ''
},
id: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/shippingLocations',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/shippingLocations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","companyName":"","country":"","postalCode":"","stateOrProvince":"","streetAddress":"","streetAddress2":""},"contact":{"email":"","firstName":"","infix":"","lastName":"","phoneNumber":""},"id":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"companyName": @"", @"country": @"", @"postalCode": @"", @"stateOrProvince": @"", @"streetAddress": @"", @"streetAddress2": @"" },
@"contact": @{ @"email": @"", @"firstName": @"", @"infix": @"", @"lastName": @"", @"phoneNumber": @"" },
@"id": @"",
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/shippingLocations"]
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}}/companies/:companyId/shippingLocations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/shippingLocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/shippingLocations', [
'body' => '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/shippingLocations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/shippingLocations');
$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}}/companies/:companyId/shippingLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/shippingLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/shippingLocations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/shippingLocations"
payload = {
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/shippingLocations"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/companies/:companyId/shippingLocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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/companies/:companyId/shippingLocations') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/shippingLocations";
let payload = json!({
"address": json!({
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
}),
"contact": json!({
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
}),
"id": "",
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/shippingLocations \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
echo '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}' | \
http POST {{baseUrl}}/companies/:companyId/shippingLocations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "companyName": "",\n "country": "",\n "postalCode": "",\n "stateOrProvince": "",\n "streetAddress": "",\n "streetAddress2": ""\n },\n "contact": {\n "email": "",\n "firstName": "",\n "infix": "",\n "lastName": "",\n "phoneNumber": ""\n },\n "id": "",\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/shippingLocations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
],
"contact": [
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
],
"id": "",
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/shippingLocations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"address": {
"city": "Amsterdam",
"companyName": "YOUR_COMPANY",
"postalCode": "1012 KS",
"stateOrProvince": "",
"streetAddress": "Rokin 21"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green",
"phoneNumber": "+31 020 1234567"
},
"id": "S2-7973536B20662642215526704F302044452F714622375D476169",
"name": "YOUR_COMPANY Rokin depot"
}
POST
Create an order
{{baseUrl}}/companies/:companyId/terminalOrders
QUERY PARAMS
companyId
BODY json
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalOrders");
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/terminalOrders" {:content-type :json
:form-params {:billingEntityId ""
:customerOrderReference ""
:items [{:id ""
:installments 0
:name ""
:quantity 0}]
:shippingLocationId ""
:taxId ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalOrders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders"),
Content = new StringContent("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalOrders"
payload := strings.NewReader("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/companies/:companyId/terminalOrders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 211
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/terminalOrders")
.setHeader("content-type", "application/json")
.setBody("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalOrders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/terminalOrders")
.header("content-type", "application/json")
.body("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.asString();
const data = JSON.stringify({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/terminalOrders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/terminalOrders',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalOrders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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}}/companies/:companyId/terminalOrders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders")
.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/companies/:companyId/terminalOrders',
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({
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/terminalOrders',
headers: {'content-type': 'application/json'},
body: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
},
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}}/companies/:companyId/terminalOrders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
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}}/companies/:companyId/terminalOrders',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalOrders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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 = @{ @"billingEntityId": @"",
@"customerOrderReference": @"",
@"items": @[ @{ @"id": @"", @"installments": @0, @"name": @"", @"quantity": @0 } ],
@"shippingLocationId": @"",
@"taxId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/terminalOrders"]
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}}/companies/:companyId/terminalOrders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalOrders",
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([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]),
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}}/companies/:companyId/terminalOrders', [
'body' => '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalOrders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/terminalOrders');
$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}}/companies/:companyId/terminalOrders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalOrders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/terminalOrders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalOrders"
payload = {
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalOrders"
payload <- "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders")
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/companies/:companyId/terminalOrders') do |req|
req.body = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalOrders";
let payload = json!({
"billingEntityId": "",
"customerOrderReference": "",
"items": (
json!({
"id": "",
"installments": 0,
"name": "",
"quantity": 0
})
),
"shippingLocationId": "",
"taxId": ""
});
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}}/companies/:companyId/terminalOrders \
--header 'content-type: application/json' \
--data '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
echo '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}' | \
http POST {{baseUrl}}/companies/:companyId/terminalOrders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalOrders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billingEntityId": "",
"customerOrderReference": "",
"items": [
[
"id": "",
"installments": 0,
"name": "",
"quantity": 0
]
],
"shippingLocationId": "",
"taxId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalOrders")! 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
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "5265677890100681",
"items": [
{
"id": "TBOX-V400m-684-EU",
"name": "V400m Package",
"quantity": 1
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"quantity": 1
}
],
"orderDate": "2022-01-20T14:12:33Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
"status": "Placed"
}
GET
Get a list of billing entities
{{baseUrl}}/companies/:companyId/billingEntities
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/billingEntities");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/billingEntities")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/billingEntities"
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}}/companies/:companyId/billingEntities"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/billingEntities");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/billingEntities"
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/companies/:companyId/billingEntities HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/billingEntities")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/billingEntities"))
.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}}/companies/:companyId/billingEntities")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/billingEntities")
.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}}/companies/:companyId/billingEntities');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/billingEntities'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/billingEntities';
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}}/companies/:companyId/billingEntities',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/billingEntities")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/billingEntities',
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}}/companies/:companyId/billingEntities'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/billingEntities');
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}}/companies/:companyId/billingEntities'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/billingEntities';
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}}/companies/:companyId/billingEntities"]
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}}/companies/:companyId/billingEntities" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/billingEntities",
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}}/companies/:companyId/billingEntities');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/billingEntities');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/billingEntities');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/billingEntities' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/billingEntities' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/billingEntities")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/billingEntities"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/billingEntities"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/billingEntities")
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/companies/:companyId/billingEntities') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/billingEntities";
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}}/companies/:companyId/billingEntities
http GET {{baseUrl}}/companies/:companyId/billingEntities
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/billingEntities
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/billingEntities")! 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
{
"data": [
{
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
{
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
}
]
}
GET
Get a list of orders
{{baseUrl}}/companies/:companyId/terminalOrders
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalOrders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalOrders")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalOrders"
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}}/companies/:companyId/terminalOrders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalOrders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalOrders"
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/companies/:companyId/terminalOrders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalOrders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalOrders"))
.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}}/companies/:companyId/terminalOrders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalOrders")
.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}}/companies/:companyId/terminalOrders');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalOrders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalOrders';
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}}/companies/:companyId/terminalOrders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalOrders',
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}}/companies/:companyId/terminalOrders'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalOrders');
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}}/companies/:companyId/terminalOrders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalOrders';
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}}/companies/:companyId/terminalOrders"]
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}}/companies/:companyId/terminalOrders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalOrders",
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}}/companies/:companyId/terminalOrders');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalOrders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalOrders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalOrders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalOrders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalOrders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalOrders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalOrders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalOrders")
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/companies/:companyId/terminalOrders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalOrders";
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}}/companies/:companyId/terminalOrders
http GET {{baseUrl}}/companies/:companyId/terminalOrders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalOrders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalOrders")! 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
{
"data": [
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_C2",
"id": "5265677890100681",
"items": [
{
"id": "TBOX-MX925-422-EU",
"name": "MX925 Package",
"quantity": 1
}
],
"orderDate": "2020-06-10T17:03:11.000Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
"status": "Placed"
},
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_C1",
"id": "9415936144678634",
"items": [
{
"id": "TBOX-V400m-774-EU",
"name": "V400m Package",
"quantity": 5
}
],
"orderDate": "2022-01-03T16:41:07.000Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
"status": "Cancelled"
}
]
}
GET
Get a list of shipping locations
{{baseUrl}}/companies/:companyId/shippingLocations
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/shippingLocations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/shippingLocations")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/shippingLocations"
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}}/companies/:companyId/shippingLocations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/shippingLocations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/shippingLocations"
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/companies/:companyId/shippingLocations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/shippingLocations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/shippingLocations"))
.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}}/companies/:companyId/shippingLocations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/shippingLocations")
.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}}/companies/:companyId/shippingLocations');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/shippingLocations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/shippingLocations';
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}}/companies/:companyId/shippingLocations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/shippingLocations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/shippingLocations',
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}}/companies/:companyId/shippingLocations'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/shippingLocations');
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}}/companies/:companyId/shippingLocations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/shippingLocations';
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}}/companies/:companyId/shippingLocations"]
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}}/companies/:companyId/shippingLocations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/shippingLocations",
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}}/companies/:companyId/shippingLocations');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/shippingLocations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/shippingLocations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/shippingLocations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/shippingLocations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/shippingLocations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/shippingLocations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/shippingLocations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/shippingLocations")
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/companies/:companyId/shippingLocations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/shippingLocations";
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}}/companies/:companyId/shippingLocations
http GET {{baseUrl}}/companies/:companyId/shippingLocations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/shippingLocations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/shippingLocations")! 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
{
"data": [
{
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
{
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
}
]
}
GET
Get a list of terminal models
{{baseUrl}}/companies/:companyId/terminalModels
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalModels");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalModels")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalModels"
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}}/companies/:companyId/terminalModels"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalModels");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalModels"
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/companies/:companyId/terminalModels HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalModels")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalModels"))
.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}}/companies/:companyId/terminalModels")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalModels")
.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}}/companies/:companyId/terminalModels');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalModels'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalModels';
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}}/companies/:companyId/terminalModels',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalModels")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalModels',
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}}/companies/:companyId/terminalModels'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalModels');
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}}/companies/:companyId/terminalModels'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalModels';
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}}/companies/:companyId/terminalModels"]
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}}/companies/:companyId/terminalModels" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalModels",
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}}/companies/:companyId/terminalModels');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalModels');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalModels');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalModels' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalModels' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalModels")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalModels"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalModels"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalModels")
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/companies/:companyId/terminalModels') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalModels";
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}}/companies/:companyId/terminalModels
http GET {{baseUrl}}/companies/:companyId/terminalModels
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalModels
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalModels")! 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
{
"data": [
{
"id": "Verifone.e315",
"name": "Verifone e315"
},
{
"id": "Verifone.e315M",
"name": "Verifone e315M"
},
{
"id": "Verifone.E355",
"name": "Verifone E355"
},
{
"id": "Verifone.M400",
"name": "Verifone M400"
},
{
"id": "Verifone.MX915",
"name": "Verifone MX915"
},
{
"id": "Verifone.MX925",
"name": "Verifone MX925"
},
{
"id": "Verifone.P400",
"name": "Verifone P400"
},
{
"id": "Verifone.P400Plus",
"name": "Verifone P400Plus"
},
{
"id": "Verifone.P400Eth",
"name": "Verifone P400Eth"
},
{
"id": "Verifone.V240m",
"name": "Verifone V240m"
},
{
"id": "Verifone.V240mPlus",
"name": "Verifone V240mPlus"
},
{
"id": "Verifone.UX300",
"name": "Verifone UX300"
},
{
"id": "Verifone.V200cPlus",
"name": "Verifone V200cPlus"
},
{
"id": "Verifone.V400cPlus",
"name": "Verifone V400cPlus"
},
{
"id": "Verifone.V400m",
"name": "Verifone V400m"
},
{
"id": "Verifone.V210mPlus",
"name": "Verifone V210mPlus"
},
{
"id": "Verifone.VX520",
"name": "Verifone VX520"
},
{
"id": "Verifone.VX6753G",
"name": "Verifone VX6753G"
},
{
"id": "Verifone.VX675WIFIBT",
"name": "Verifone VX675WIFIBT"
},
{
"id": "Verifone.VX680",
"name": "Verifone VX680"
},
{
"id": "Verifone.VX6803G",
"name": "Verifone VX6803G"
},
{
"id": "Verifone.VX690",
"name": "Verifone VX690"
},
{
"id": "Verifone.VX700",
"name": "Verifone VX700"
},
{
"id": "Verifone.VX810",
"name": "Verifone VX810"
},
{
"id": "Verifone.VX820",
"name": "Verifone VX820"
},
{
"id": "Verifone.VX825",
"name": "Verifone VX825"
},
{
"id": "Verifone.e285",
"name": "Verifone e285"
},
{
"id": "Verifone.E285",
"name": "Verifone E285"
},
{
"id": "Verifone.e285p",
"name": "Verifone e285p"
},
{
"id": "Verifone.e280",
"name": "Verifone e280"
},
{
"id": "Verifone.UX410",
"name": "Verifone UX410"
},
{
"id": "Castles.S1E",
"name": "Castles S1E"
},
{
"id": "Castles.S1EL",
"name": "Castles S1EL"
},
{
"id": "Castles.S1F",
"name": "Castles S1F"
},
{
"id": "Castles.S1F2",
"name": "Castles S1F2"
},
{
"id": "Castles.S1F2L",
"name": "Castles S1F2L"
},
{
"id": "Castles.S1E2",
"name": "Castles S1E2"
},
{
"id": "Castles.S1E2L",
"name": "Castles S1E2L"
}
]
}
GET
Get a list of terminal products
{{baseUrl}}/companies/:companyId/terminalProducts
QUERY PARAMS
country
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalProducts?country=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalProducts" {:query-params {:country ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalProducts?country="
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}}/companies/:companyId/terminalProducts?country="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalProducts?country=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalProducts?country="
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/companies/:companyId/terminalProducts?country= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalProducts?country=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalProducts?country="))
.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}}/companies/:companyId/terminalProducts?country=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalProducts?country=")
.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}}/companies/:companyId/terminalProducts?country=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalProducts',
params: {country: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalProducts?country=';
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}}/companies/:companyId/terminalProducts?country=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalProducts?country=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalProducts?country=',
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}}/companies/:companyId/terminalProducts',
qs: {country: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalProducts');
req.query({
country: ''
});
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}}/companies/:companyId/terminalProducts',
params: {country: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalProducts?country=';
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}}/companies/:companyId/terminalProducts?country="]
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}}/companies/:companyId/terminalProducts?country=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalProducts?country=",
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}}/companies/:companyId/terminalProducts?country=');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalProducts');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'country' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalProducts');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'country' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalProducts?country=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalProducts?country=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalProducts?country=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalProducts"
querystring = {"country":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalProducts"
queryString <- list(country = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalProducts?country=")
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/companies/:companyId/terminalProducts') do |req|
req.params['country'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalProducts";
let querystring = [
("country", ""),
];
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}}/companies/:companyId/terminalProducts?country='
http GET '{{baseUrl}}/companies/:companyId/terminalProducts?country='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/companies/:companyId/terminalProducts?country='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalProducts?country=")! 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
{
"data": [
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-327486-EU",
"name": "Battery - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-745984-EU",
"name": "Power Supply EU - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"description": "Includes an EU Power Supply, SIM Card and battery",
"id": "TBOX-V400m-684-EU",
"itemsIncluded": [
"Receipt Roll",
"Terminal Device V400m EU/GB"
],
"name": "V400m Package",
"price": {
"currency": "EUR",
"value": 0
}
}
]
}
GET
Get an order
{{baseUrl}}/companies/:companyId/terminalOrders/:orderId
QUERY PARAMS
companyId
orderId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
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}}/companies/:companyId/terminalOrders/:orderId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
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/companies/:companyId/terminalOrders/:orderId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"))
.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}}/companies/:companyId/terminalOrders/:orderId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.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}}/companies/:companyId/terminalOrders/:orderId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId';
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}}/companies/:companyId/terminalOrders/:orderId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalOrders/:orderId',
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}}/companies/:companyId/terminalOrders/:orderId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
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}}/companies/:companyId/terminalOrders/:orderId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId';
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}}/companies/:companyId/terminalOrders/:orderId"]
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}}/companies/:companyId/terminalOrders/:orderId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalOrders/:orderId",
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}}/companies/:companyId/terminalOrders/:orderId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalOrders/:orderId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
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/companies/:companyId/terminalOrders/:orderId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId";
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}}/companies/:companyId/terminalOrders/:orderId
http GET {{baseUrl}}/companies/:companyId/terminalOrders/:orderId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalOrders/:orderId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")! 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
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_1",
"id": "5265677890100681",
"items": [
{
"id": "TBOX-V400m-684-EU",
"name": "V400m Package",
"quantity": 1
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"quantity": 1
}
],
"orderDate": "2022-01-20T14:12:33Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat",
"streetAddress2": "6-50"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green"
},
"id": "S2-232A6D2967356F424F4369432B3F486B6A6D",
"name": "YOUR_COMPANY HQ - POS Ops"
},
"status": "Placed"
}
PATCH
Update an order
{{baseUrl}}/companies/:companyId/terminalOrders/:orderId
QUERY PARAMS
companyId
orderId
BODY json
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId");
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId" {:content-type :json
:form-params {:billingEntityId ""
:customerOrderReference ""
:items [{:id ""
:installments 0
:name ""
:quantity 0}]
:shippingLocationId ""
:taxId ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders/:orderId"),
Content = new StringContent("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders/:orderId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
payload := strings.NewReader("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/companies/:companyId/terminalOrders/:orderId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 211
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.setHeader("content-type", "application/json")
.setBody("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.header("content-type", "application/json")
.body("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.asString();
const data = JSON.stringify({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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}}/companies/:companyId/terminalOrders/:orderId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")
.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/companies/:companyId/terminalOrders/:orderId',
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({
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
body: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
},
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}}/companies/:companyId/terminalOrders/:orderId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
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}}/companies/:companyId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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 = @{ @"billingEntityId": @"",
@"customerOrderReference": @"",
@"items": @[ @{ @"id": @"", @"installments": @0, @"name": @"", @"quantity": @0 } ],
@"shippingLocationId": @"",
@"taxId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"]
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}}/companies/:companyId/terminalOrders/:orderId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalOrders/:orderId",
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([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]),
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}}/companies/:companyId/terminalOrders/:orderId', [
'body' => '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/terminalOrders/:orderId');
$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}}/companies/:companyId/terminalOrders/:orderId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalOrders/:orderId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/terminalOrders/:orderId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
payload = {
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId"
payload <- "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders/:orderId")
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/companies/:companyId/terminalOrders/:orderId') do |req|
req.body = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/companies/:companyId/terminalOrders/:orderId";
let payload = json!({
"billingEntityId": "",
"customerOrderReference": "",
"items": (
json!({
"id": "",
"installments": 0,
"name": "",
"quantity": 0
})
),
"shippingLocationId": "",
"taxId": ""
});
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}}/companies/:companyId/terminalOrders/:orderId \
--header 'content-type: application/json' \
--data '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
echo '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}' | \
http PATCH {{baseUrl}}/companies/:companyId/terminalOrders/:orderId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalOrders/:orderId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billingEntityId": "",
"customerOrderReference": "",
"items": [
[
"id": "",
"installments": 0,
"name": "",
"quantity": 0
]
],
"shippingLocationId": "",
"taxId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalOrders/:orderId")! 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
{
"billingEntity": {
"address": {
"city": "Amsterdam",
"country": "NL",
"postalCode": "1011 DJ",
"streetAddress": "Simon Carmiggeltstraat 6-50"
},
"email": "Paul.Green@company.com",
"id": "Company.YOUR_COMPANY",
"name": "YOUR_COMPANY",
"taxId": "NL1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_1",
"id": "5265677890100681",
"items": [
{
"id": "TBOX-V400m-684-EU",
"name": "V400m Package",
"quantity": 1
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"quantity": 1
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 5
}
],
"orderDate": "2022-01-20T14:12:33Z",
"shippingLocation": {
"address": {
"city": "Amsterdam",
"companyName": "YOUR_COMPANY",
"country": "NL",
"postalCode": "1012 KS",
"stateOrProvince": "",
"streetAddress": "Rokin 21"
},
"contact": {
"email": "Paul.Green@company.com",
"firstName": "Paul",
"lastName": "Green",
"phoneNumber": "+31 020 1234567"
},
"id": "S2-7973536B20662642215526704F302044452F714622375D476169",
"name": "YOUR_COMPANY Rokin depot"
},
"status": "Placed"
}
POST
Cancel an order (POST)
{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel
QUERY PARAMS
merchantId
orderId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/terminalOrders/:orderId/cancel HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalOrders/:orderId/cancel',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel');
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}}/merchants/:merchantId/terminalOrders/:orderId/cancel'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/merchants/:merchantId/terminalOrders/:orderId/cancel")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/merchants/:merchantId/terminalOrders/:orderId/cancel') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel
http POST {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "4154567890100682",
"items": [
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"quantity": 2
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 20
}
],
"orderDate": "2022-01-21T16:12:33Z",
"shippingLocation": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
},
"status": "Cancelled"
}
POST
Create a shipping location (POST)
{{baseUrl}}/merchants/:merchantId/shippingLocations
QUERY PARAMS
merchantId
BODY json
{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/shippingLocations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/shippingLocations" {:content-type :json
:form-params {:address {:city ""
:companyName ""
:country ""
:postalCode ""
:stateOrProvince ""
:streetAddress ""
:streetAddress2 ""}
:contact {:email ""
:firstName ""
:infix ""
:lastName ""
:phoneNumber ""}
:id ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/shippingLocations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/merchants/:merchantId/shippingLocations"),
Content = new StringContent("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/merchants/:merchantId/shippingLocations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/shippingLocations"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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/merchants/:merchantId/shippingLocations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 322
{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/shippingLocations")
.setHeader("content-type", "application/json")
.setBody("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/shippingLocations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/shippingLocations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/shippingLocations")
.header("content-type", "application/json")
.body("{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {
email: '',
firstName: '',
infix: '',
lastName: '',
phoneNumber: ''
},
id: '',
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/shippingLocations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/shippingLocations',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/shippingLocations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","companyName":"","country":"","postalCode":"","stateOrProvince":"","streetAddress":"","streetAddress2":""},"contact":{"email":"","firstName":"","infix":"","lastName":"","phoneNumber":""},"id":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/shippingLocations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address": {\n "city": "",\n "companyName": "",\n "country": "",\n "postalCode": "",\n "stateOrProvince": "",\n "streetAddress": "",\n "streetAddress2": ""\n },\n "contact": {\n "email": "",\n "firstName": "",\n "infix": "",\n "lastName": "",\n "phoneNumber": ""\n },\n "id": "",\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/shippingLocations")
.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/merchants/:merchantId/shippingLocations',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/shippingLocations',
headers: {'content-type': 'application/json'},
body: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/shippingLocations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {
email: '',
firstName: '',
infix: '',
lastName: '',
phoneNumber: ''
},
id: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/shippingLocations',
headers: {'content-type': 'application/json'},
data: {
address: {
city: '',
companyName: '',
country: '',
postalCode: '',
stateOrProvince: '',
streetAddress: '',
streetAddress2: ''
},
contact: {email: '', firstName: '', infix: '', lastName: '', phoneNumber: ''},
id: '',
name: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/shippingLocations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"address":{"city":"","companyName":"","country":"","postalCode":"","stateOrProvince":"","streetAddress":"","streetAddress2":""},"contact":{"email":"","firstName":"","infix":"","lastName":"","phoneNumber":""},"id":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address": @{ @"city": @"", @"companyName": @"", @"country": @"", @"postalCode": @"", @"stateOrProvince": @"", @"streetAddress": @"", @"streetAddress2": @"" },
@"contact": @{ @"email": @"", @"firstName": @"", @"infix": @"", @"lastName": @"", @"phoneNumber": @"" },
@"id": @"",
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/shippingLocations"]
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}}/merchants/:merchantId/shippingLocations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/shippingLocations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/shippingLocations', [
'body' => '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/shippingLocations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address' => [
'city' => '',
'companyName' => '',
'country' => '',
'postalCode' => '',
'stateOrProvince' => '',
'streetAddress' => '',
'streetAddress2' => ''
],
'contact' => [
'email' => '',
'firstName' => '',
'infix' => '',
'lastName' => '',
'phoneNumber' => ''
],
'id' => '',
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/shippingLocations');
$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}}/merchants/:merchantId/shippingLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/shippingLocations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/shippingLocations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/shippingLocations"
payload = {
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/shippingLocations"
payload <- "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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}}/merchants/:merchantId/shippingLocations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\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/merchants/:merchantId/shippingLocations') do |req|
req.body = "{\n \"address\": {\n \"city\": \"\",\n \"companyName\": \"\",\n \"country\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"streetAddress\": \"\",\n \"streetAddress2\": \"\"\n },\n \"contact\": {\n \"email\": \"\",\n \"firstName\": \"\",\n \"infix\": \"\",\n \"lastName\": \"\",\n \"phoneNumber\": \"\"\n },\n \"id\": \"\",\n \"name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/shippingLocations";
let payload = json!({
"address": json!({
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
}),
"contact": json!({
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
}),
"id": "",
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/shippingLocations \
--header 'content-type: application/json' \
--data '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}'
echo '{
"address": {
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
},
"contact": {
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
},
"id": "",
"name": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/shippingLocations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "address": {\n "city": "",\n "companyName": "",\n "country": "",\n "postalCode": "",\n "stateOrProvince": "",\n "streetAddress": "",\n "streetAddress2": ""\n },\n "contact": {\n "email": "",\n "firstName": "",\n "infix": "",\n "lastName": "",\n "phoneNumber": ""\n },\n "id": "",\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/shippingLocations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address": [
"city": "",
"companyName": "",
"country": "",
"postalCode": "",
"stateOrProvince": "",
"streetAddress": "",
"streetAddress2": ""
],
"contact": [
"email": "",
"firstName": "",
"infix": "",
"lastName": "",
"phoneNumber": ""
],
"id": "",
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/shippingLocations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"address": {
"city": "Barcelona",
"companyName": "YOUR_COMPANY",
"postalCode": "08012",
"stateOrProvince": "",
"streetAddress": "El quinto pino 42"
},
"contact": {
"email": "Rita.Perengano@company.com",
"firstName": "Rita",
"lastName": "Perengano",
"phoneNumber": "+34931234567"
},
"id": "S2-73536B20665526704F30792642212044452F714622375D477270",
"name": "YOUR_MERCHANT_ACCOUNT Barcelona depot"
}
POST
Create an order (POST)
{{baseUrl}}/merchants/:merchantId/terminalOrders
QUERY PARAMS
merchantId
BODY json
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalOrders");
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/terminalOrders" {:content-type :json
:form-params {:billingEntityId ""
:customerOrderReference ""
:items [{:id ""
:installments 0
:name ""
:quantity 0}]
:shippingLocationId ""
:taxId ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders"),
Content = new StringContent("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalOrders"
payload := strings.NewReader("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/merchants/:merchantId/terminalOrders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 211
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/terminalOrders")
.setHeader("content-type", "application/json")
.setBody("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalOrders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/terminalOrders")
.header("content-type", "application/json")
.body("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.asString();
const data = JSON.stringify({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/terminalOrders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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}}/merchants/:merchantId/terminalOrders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders")
.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/merchants/:merchantId/terminalOrders',
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({
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders',
headers: {'content-type': 'application/json'},
body: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
},
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}}/merchants/:merchantId/terminalOrders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
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}}/merchants/:merchantId/terminalOrders',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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 = @{ @"billingEntityId": @"",
@"customerOrderReference": @"",
@"items": @[ @{ @"id": @"", @"installments": @0, @"name": @"", @"quantity": @0 } ],
@"shippingLocationId": @"",
@"taxId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/terminalOrders"]
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}}/merchants/:merchantId/terminalOrders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalOrders",
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([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]),
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}}/merchants/:merchantId/terminalOrders', [
'body' => '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders');
$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}}/merchants/:merchantId/terminalOrders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/terminalOrders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders"
payload = {
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalOrders"
payload <- "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders")
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/merchants/:merchantId/terminalOrders') do |req|
req.body = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalOrders";
let payload = json!({
"billingEntityId": "",
"customerOrderReference": "",
"items": (
json!({
"id": "",
"installments": 0,
"name": "",
"quantity": 0
})
),
"shippingLocationId": "",
"taxId": ""
});
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}}/merchants/:merchantId/terminalOrders \
--header 'content-type: application/json' \
--data '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
echo '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/terminalOrders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalOrders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billingEntityId": "",
"customerOrderReference": "",
"items": [
[
"id": "",
"installments": 0,
"name": "",
"quantity": 0
]
],
"shippingLocationId": "",
"taxId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalOrders")! 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
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "4154567890100682",
"items": [
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"quantity": 2
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 20
}
],
"orderDate": "2022-01-21T16:12:33Z",
"shippingLocation": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
},
"status": "Placed"
}
GET
Get a list of billing entities (GET)
{{baseUrl}}/merchants/:merchantId/billingEntities
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/billingEntities");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/billingEntities")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/billingEntities"
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}}/merchants/:merchantId/billingEntities"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/billingEntities");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/billingEntities"
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/merchants/:merchantId/billingEntities HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/billingEntities")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/billingEntities"))
.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}}/merchants/:merchantId/billingEntities")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/billingEntities")
.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}}/merchants/:merchantId/billingEntities');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/billingEntities'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/billingEntities';
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}}/merchants/:merchantId/billingEntities',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/billingEntities")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/billingEntities',
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}}/merchants/:merchantId/billingEntities'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/billingEntities');
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}}/merchants/:merchantId/billingEntities'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/billingEntities';
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}}/merchants/:merchantId/billingEntities"]
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}}/merchants/:merchantId/billingEntities" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/billingEntities",
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}}/merchants/:merchantId/billingEntities');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/billingEntities');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/billingEntities');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/billingEntities' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/billingEntities' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/billingEntities")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/billingEntities"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/billingEntities"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/billingEntities")
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/merchants/:merchantId/billingEntities') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/billingEntities";
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}}/merchants/:merchantId/billingEntities
http GET {{baseUrl}}/merchants/:merchantId/billingEntities
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/billingEntities
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/billingEntities")! 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
{
"data": [
{
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
}
]
}
GET
Get a list of orders (GET)
{{baseUrl}}/merchants/:merchantId/terminalOrders
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalOrders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalOrders")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders"
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}}/merchants/:merchantId/terminalOrders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalOrders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalOrders"
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/merchants/:merchantId/terminalOrders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalOrders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalOrders"))
.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}}/merchants/:merchantId/terminalOrders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalOrders")
.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}}/merchants/:merchantId/terminalOrders');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders';
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}}/merchants/:merchantId/terminalOrders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalOrders',
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}}/merchants/:merchantId/terminalOrders'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalOrders');
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}}/merchants/:merchantId/terminalOrders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders';
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}}/merchants/:merchantId/terminalOrders"]
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}}/merchants/:merchantId/terminalOrders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalOrders",
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}}/merchants/:merchantId/terminalOrders');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalOrders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalOrders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalOrders")
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/merchants/:merchantId/terminalOrders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalOrders";
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}}/merchants/:merchantId/terminalOrders
http GET {{baseUrl}}/merchants/:merchantId/terminalOrders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalOrders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalOrders")! 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
{
"data": [
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_M2",
"id": "4154567890100682",
"items": [
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"quantity": 2
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 20
}
],
"orderDate": "2022-01-21T16:12:33Z",
"shippingLocation": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
},
"status": "Placed"
},
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE_M1",
"id": "8315943674501996",
"items": [
{
"id": "TBOX-V400m-774-EU",
"name": "V400m Package",
"quantity": 1
}
],
"orderDate": "2022-01-04T09:41:07.000Z",
"shippingLocation": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
},
"status": "Cancelled"
}
]
}
GET
Get a list of shipping locations (GET)
{{baseUrl}}/merchants/:merchantId/shippingLocations
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/shippingLocations");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/shippingLocations")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/shippingLocations"
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}}/merchants/:merchantId/shippingLocations"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/shippingLocations");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/shippingLocations"
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/merchants/:merchantId/shippingLocations HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/shippingLocations")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/shippingLocations"))
.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}}/merchants/:merchantId/shippingLocations")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/shippingLocations")
.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}}/merchants/:merchantId/shippingLocations');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/shippingLocations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/shippingLocations';
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}}/merchants/:merchantId/shippingLocations',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/shippingLocations")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/shippingLocations',
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}}/merchants/:merchantId/shippingLocations'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/shippingLocations');
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}}/merchants/:merchantId/shippingLocations'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/shippingLocations';
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}}/merchants/:merchantId/shippingLocations"]
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}}/merchants/:merchantId/shippingLocations" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/shippingLocations",
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}}/merchants/:merchantId/shippingLocations');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/shippingLocations');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/shippingLocations');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/shippingLocations' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/shippingLocations' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/shippingLocations")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/shippingLocations"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/shippingLocations"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/shippingLocations")
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/merchants/:merchantId/shippingLocations') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/shippingLocations";
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}}/merchants/:merchantId/shippingLocations
http GET {{baseUrl}}/merchants/:merchantId/shippingLocations
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/shippingLocations
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/shippingLocations")! 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
{
"data": [
{
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
}
]
}
GET
Get a list of terminal models (GET)
{{baseUrl}}/merchants/:merchantId/terminalModels
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalModels");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalModels")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalModels"
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}}/merchants/:merchantId/terminalModels"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalModels");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalModels"
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/merchants/:merchantId/terminalModels HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalModels")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalModels"))
.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}}/merchants/:merchantId/terminalModels")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalModels")
.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}}/merchants/:merchantId/terminalModels');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalModels'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalModels';
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}}/merchants/:merchantId/terminalModels',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalModels")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalModels',
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}}/merchants/:merchantId/terminalModels'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalModels');
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}}/merchants/:merchantId/terminalModels'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalModels';
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}}/merchants/:merchantId/terminalModels"]
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}}/merchants/:merchantId/terminalModels" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalModels",
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}}/merchants/:merchantId/terminalModels');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalModels');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalModels');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalModels' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalModels' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalModels")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalModels"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalModels"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalModels")
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/merchants/:merchantId/terminalModels') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalModels";
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}}/merchants/:merchantId/terminalModels
http GET {{baseUrl}}/merchants/:merchantId/terminalModels
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalModels
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalModels")! 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
{
"data": [
{
"id": "Verifone.e315",
"name": "Verifone e315"
},
{
"id": "Verifone.e315M",
"name": "Verifone e315M"
},
{
"id": "Verifone.E355",
"name": "Verifone E355"
},
{
"id": "Verifone.M400",
"name": "Verifone M400"
},
{
"id": "Verifone.MX915",
"name": "Verifone MX915"
},
{
"id": "Verifone.MX925",
"name": "Verifone MX925"
},
{
"id": "Verifone.P400",
"name": "Verifone P400"
},
{
"id": "Verifone.P400Plus",
"name": "Verifone P400Plus"
},
{
"id": "Verifone.P400Eth",
"name": "Verifone P400Eth"
},
{
"id": "Verifone.V240m",
"name": "Verifone V240m"
},
{
"id": "Verifone.V240mPlus",
"name": "Verifone V240mPlus"
},
{
"id": "Verifone.UX300",
"name": "Verifone UX300"
},
{
"id": "Verifone.V200cPlus",
"name": "Verifone V200cPlus"
},
{
"id": "Verifone.V400cPlus",
"name": "Verifone V400cPlus"
},
{
"id": "Verifone.V400m",
"name": "Verifone V400m"
},
{
"id": "Verifone.V210mPlus",
"name": "Verifone V210mPlus"
},
{
"id": "Verifone.VX520",
"name": "Verifone VX520"
},
{
"id": "Verifone.VX6753G",
"name": "Verifone VX6753G"
},
{
"id": "Verifone.VX675WIFIBT",
"name": "Verifone VX675WIFIBT"
},
{
"id": "Verifone.VX680",
"name": "Verifone VX680"
},
{
"id": "Verifone.VX6803G",
"name": "Verifone VX6803G"
},
{
"id": "Verifone.VX690",
"name": "Verifone VX690"
},
{
"id": "Verifone.VX700",
"name": "Verifone VX700"
},
{
"id": "Verifone.VX810",
"name": "Verifone VX810"
},
{
"id": "Verifone.VX820",
"name": "Verifone VX820"
},
{
"id": "Verifone.VX825",
"name": "Verifone VX825"
},
{
"id": "Verifone.e285",
"name": "Verifone e285"
},
{
"id": "Verifone.E285",
"name": "Verifone E285"
},
{
"id": "Verifone.e285p",
"name": "Verifone e285p"
},
{
"id": "Verifone.e280",
"name": "Verifone e280"
},
{
"id": "Verifone.UX410",
"name": "Verifone UX410"
},
{
"id": "Castles.S1E",
"name": "Castles S1E"
},
{
"id": "Castles.S1EL",
"name": "Castles S1EL"
},
{
"id": "Castles.S1F",
"name": "Castles S1F"
},
{
"id": "Castles.S1F2",
"name": "Castles S1F2"
},
{
"id": "Castles.S1F2L",
"name": "Castles S1F2L"
},
{
"id": "Castles.S1E2",
"name": "Castles S1E2"
},
{
"id": "Castles.S1E2L",
"name": "Castles S1E2L"
}
]
}
GET
Get a list of terminal products (GET)
{{baseUrl}}/merchants/:merchantId/terminalProducts
QUERY PARAMS
country
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalProducts?country=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalProducts" {:query-params {:country ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalProducts?country="
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}}/merchants/:merchantId/terminalProducts?country="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalProducts?country=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalProducts?country="
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/merchants/:merchantId/terminalProducts?country= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalProducts?country=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalProducts?country="))
.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}}/merchants/:merchantId/terminalProducts?country=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalProducts?country=")
.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}}/merchants/:merchantId/terminalProducts?country=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalProducts',
params: {country: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalProducts?country=';
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}}/merchants/:merchantId/terminalProducts?country=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalProducts?country=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalProducts?country=',
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}}/merchants/:merchantId/terminalProducts',
qs: {country: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalProducts');
req.query({
country: ''
});
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}}/merchants/:merchantId/terminalProducts',
params: {country: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalProducts?country=';
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}}/merchants/:merchantId/terminalProducts?country="]
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}}/merchants/:merchantId/terminalProducts?country=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalProducts?country=",
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}}/merchants/:merchantId/terminalProducts?country=');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalProducts');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'country' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalProducts');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'country' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalProducts?country=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalProducts?country=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalProducts?country=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalProducts"
querystring = {"country":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalProducts"
queryString <- list(country = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalProducts?country=")
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/merchants/:merchantId/terminalProducts') do |req|
req.params['country'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalProducts";
let querystring = [
("country", ""),
];
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}}/merchants/:merchantId/terminalProducts?country='
http GET '{{baseUrl}}/merchants/:merchantId/terminalProducts?country='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/merchants/:merchantId/terminalProducts?country='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalProducts?country=")! 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
{
"data": [
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-175746-EU",
"name": "Adyen Test Card",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-327486-EU",
"name": "Battery - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"id": "PART-745984-EU",
"name": "Power Supply EU - V400m",
"price": {
"currency": "EUR",
"value": 0
}
},
{
"description": "Includes an EU Power Supply, SIM Card and battery",
"id": "TBOX-V400m-684-EU",
"itemsIncluded": [
"Receipt Roll",
"Terminal Device V400m EU/GB"
],
"name": "V400m Package",
"price": {
"currency": "EUR",
"value": 0
}
}
]
}
GET
Get an order (GET)
{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId
QUERY PARAMS
merchantId
orderId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
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}}/merchants/:merchantId/terminalOrders/:orderId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
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/merchants/:merchantId/terminalOrders/:orderId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"))
.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}}/merchants/:merchantId/terminalOrders/:orderId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.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}}/merchants/:merchantId/terminalOrders/:orderId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId';
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}}/merchants/:merchantId/terminalOrders/:orderId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalOrders/:orderId',
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}}/merchants/:merchantId/terminalOrders/:orderId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
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}}/merchants/:merchantId/terminalOrders/:orderId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId';
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}}/merchants/:merchantId/terminalOrders/:orderId"]
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}}/merchants/:merchantId/terminalOrders/:orderId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId",
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}}/merchants/:merchantId/terminalOrders/:orderId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalOrders/:orderId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
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/merchants/:merchantId/terminalOrders/:orderId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId";
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}}/merchants/:merchantId/terminalOrders/:orderId
http GET {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")! 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
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "4154567890100682",
"items": [
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"quantity": 2
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 20
}
],
"orderDate": "2022-01-21T16:12:33Z",
"shippingLocation": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43",
"streetAddress2": "7 piso"
},
"contact": {
"email": "Pablo.Mengano@company.com",
"firstName": "Pablo",
"lastName": "Mengano",
"phoneNumber": "+34911234567"
},
"id": "S2-6A6C2E3432747D4F2F2C3455485E3836457D",
"name": "YOUR_COMPANY Spain"
},
"status": "Placed"
}
PATCH
Update an order (PATCH)
{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId
QUERY PARAMS
merchantId
orderId
BODY json
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId");
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId" {:content-type :json
:form-params {:billingEntityId ""
:customerOrderReference ""
:items [{:id ""
:installments 0
:name ""
:quantity 0}]
:shippingLocationId ""
:taxId ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders/:orderId"),
Content = new StringContent("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders/:orderId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
payload := strings.NewReader("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/merchants/:merchantId/terminalOrders/:orderId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 211
{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.setHeader("content-type", "application/json")
.setBody("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.header("content-type", "application/json")
.body("{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
.asString();
const data = JSON.stringify({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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}}/merchants/:merchantId/terminalOrders/:orderId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")
.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/merchants/:merchantId/terminalOrders/:orderId',
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({
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
body: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
},
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}}/merchants/:merchantId/terminalOrders/:orderId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billingEntityId: '',
customerOrderReference: '',
items: [
{
id: '',
installments: 0,
name: '',
quantity: 0
}
],
shippingLocationId: '',
taxId: ''
});
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}}/merchants/:merchantId/terminalOrders/:orderId',
headers: {'content-type': 'application/json'},
data: {
billingEntityId: '',
customerOrderReference: '',
items: [{id: '', installments: 0, name: '', quantity: 0}],
shippingLocationId: '',
taxId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billingEntityId":"","customerOrderReference":"","items":[{"id":"","installments":0,"name":"","quantity":0}],"shippingLocationId":"","taxId":""}'
};
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 = @{ @"billingEntityId": @"",
@"customerOrderReference": @"",
@"items": @[ @{ @"id": @"", @"installments": @0, @"name": @"", @"quantity": @0 } ],
@"shippingLocationId": @"",
@"taxId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"]
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}}/merchants/:merchantId/terminalOrders/:orderId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId",
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([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]),
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}}/merchants/:merchantId/terminalOrders/:orderId', [
'body' => '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billingEntityId' => '',
'customerOrderReference' => '',
'items' => [
[
'id' => '',
'installments' => 0,
'name' => '',
'quantity' => 0
]
],
'shippingLocationId' => '',
'taxId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId');
$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}}/merchants/:merchantId/terminalOrders/:orderId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/terminalOrders/:orderId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
payload = {
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId"
payload <- "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders/:orderId")
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 \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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/merchants/:merchantId/terminalOrders/:orderId') do |req|
req.body = "{\n \"billingEntityId\": \"\",\n \"customerOrderReference\": \"\",\n \"items\": [\n {\n \"id\": \"\",\n \"installments\": 0,\n \"name\": \"\",\n \"quantity\": 0\n }\n ],\n \"shippingLocationId\": \"\",\n \"taxId\": \"\"\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}}/merchants/:merchantId/terminalOrders/:orderId";
let payload = json!({
"billingEntityId": "",
"customerOrderReference": "",
"items": (
json!({
"id": "",
"installments": 0,
"name": "",
"quantity": 0
})
),
"shippingLocationId": "",
"taxId": ""
});
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}}/merchants/:merchantId/terminalOrders/:orderId \
--header 'content-type: application/json' \
--data '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}'
echo '{
"billingEntityId": "",
"customerOrderReference": "",
"items": [
{
"id": "",
"installments": 0,
"name": "",
"quantity": 0
}
],
"shippingLocationId": "",
"taxId": ""
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "billingEntityId": "",\n "customerOrderReference": "",\n "items": [\n {\n "id": "",\n "installments": 0,\n "name": "",\n "quantity": 0\n }\n ],\n "shippingLocationId": "",\n "taxId": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billingEntityId": "",
"customerOrderReference": "",
"items": [
[
"id": "",
"installments": 0,
"name": "",
"quantity": 0
]
],
"shippingLocationId": "",
"taxId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalOrders/:orderId")! 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
{
"billingEntity": {
"address": {
"city": "Madrid",
"country": "ES",
"postalCode": "28046",
"streetAddress": "Paseo de la Castellana 43, 7"
},
"email": "Pablo.Mengano@company.com",
"id": "MerchantAccount.YOUR_MERCHANT_ACCOUNT",
"name": "YOUR_MERCHANT_ACCOUNT",
"taxId": "ES1234567890"
},
"customerOrderReference": "YOUR_REFERENCE",
"id": "4154567890100682",
"items": [
{
"id": "TBOX-V400m-684-EU",
"name": "V400m Package",
"quantity": 1
},
{
"id": "PART-287001-EU",
"name": "Bluetooth Charging Base - V400m",
"quantity": 2
},
{
"id": "PART-620222-EU",
"name": "Receipt Roll",
"quantity": 20
}
],
"orderDate": "2022-01-21T16:12:33Z",
"shippingLocation": {
"address": {
"city": "Barcelona",
"companyName": "YOUR_COMPANY",
"country": "ES",
"postalCode": "08012",
"stateOrProvince": "",
"streetAddress": "El quinto pino 42"
},
"contact": {
"email": "Rita.Perengano@company.com",
"firstName": "Rita",
"lastName": "Perengano",
"phoneNumber": "+34931234567"
},
"id": "S2-73536B20665526704F30792642212044452F714622375D477270",
"name": "YOUR_MERCHANT_ACCOUNT Barcelona depot"
},
"status": "Placed"
}
GET
Get terminal settings
{{baseUrl}}/companies/:companyId/terminalSettings
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalSettings")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalSettings"
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}}/companies/:companyId/terminalSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalSettings"
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/companies/:companyId/terminalSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalSettings"))
.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}}/companies/:companyId/terminalSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalSettings")
.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}}/companies/:companyId/terminalSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalSettings';
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}}/companies/:companyId/terminalSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalSettings',
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}}/companies/:companyId/terminalSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalSettings');
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}}/companies/:companyId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalSettings';
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}}/companies/:companyId/terminalSettings"]
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}}/companies/:companyId/terminalSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalSettings",
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}}/companies/:companyId/terminalSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalSettings")
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/companies/:companyId/terminalSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalSettings";
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}}/companies/:companyId/terminalSettings
http GET {{baseUrl}}/companies/:companyId/terminalSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"hiddenSsid": false,
"name": "Guest Wi-Fi",
"psk": "4R8R2R3V456X",
"ssid": "G470P37660D4G",
"wsec": "ccmp"
}
],
"settings": {
"band": "All",
"roaming": true
}
}
}
GET
Get the terminal logo
{{baseUrl}}/companies/:companyId/terminalLogos
QUERY PARAMS
model
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalLogos?model=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/terminalLogos" {:query-params {:model ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalLogos?model="
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}}/companies/:companyId/terminalLogos?model="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/terminalLogos?model=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalLogos?model="
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/companies/:companyId/terminalLogos?model= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalLogos?model="))
.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}}/companies/:companyId/terminalLogos?model=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.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}}/companies/:companyId/terminalLogos?model=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalLogos?model=';
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}}/companies/:companyId/terminalLogos?model=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/terminalLogos?model=',
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}}/companies/:companyId/terminalLogos',
qs: {model: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/terminalLogos');
req.query({
model: ''
});
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}}/companies/:companyId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalLogos?model=';
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}}/companies/:companyId/terminalLogos?model="]
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}}/companies/:companyId/terminalLogos?model=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalLogos?model=",
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}}/companies/:companyId/terminalLogos?model=');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalLogos');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'model' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/terminalLogos');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'model' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/terminalLogos?model=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalLogos?model=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/terminalLogos?model=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalLogos"
querystring = {"model":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalLogos"
queryString <- list(model = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
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/companies/:companyId/terminalLogos') do |req|
req.params['model'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/terminalLogos";
let querystring = [
("model", ""),
];
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}}/companies/:companyId/terminalLogos?model='
http GET '{{baseUrl}}/companies/:companyId/terminalLogos?model='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/companies/:companyId/terminalLogos?model='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalLogos?model=")! 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
{
"data": "BASE-64_ENCODED_STRING"
}
PATCH
Update terminal settings
{{baseUrl}}/companies/:companyId/terminalSettings
QUERY PARAMS
companyId
BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalSettings");
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/terminalSettings" {:content-type :json
:form-params {:cardholderReceipt {:headerForAuthorizedReceipt ""}
:connectivity {:simcardStatus ""}
:gratuities [{:allowCustomAmount false
:currency ""
:predefinedTipEntries []
:usePredefinedTipEntries false}]
:hardware {:displayMaximumBackLight 0}
:nexo {:displayUrls {:localUrls [{:encrypted false
:password ""
:url ""
:username ""}]
:publicUrls [{}]}
:encryptionKey {:identifier ""
:passphrase ""
:version 0}
:eventUrls {:eventLocalUrls [{}]
:eventPublicUrls [{}]}
:nexoEventUrls []}
:offlineProcessing {:chipFloorLimit 0
:offlineSwipeLimits [{:amount 0
:currencyCode ""}]}
:opi {:enablePayAtTable false
:payAtTableStoreNumber ""
:payAtTableURL ""}
:passcodes {:adminMenuPin ""
:refundPin ""
:screenLockPin ""
:txMenuPin ""}
:payAtTable {:authenticationMethod ""
:enablePayAtTable false}
:payment {:hideMinorUnitsInCurrencies []}
:receiptOptions {:logo ""
:qrCodeData ""}
:receiptPrinting {:merchantApproved false
:merchantCancelled false
:merchantCaptureApproved false
:merchantCaptureRefused false
:merchantRefundApproved false
:merchantRefundRefused false
:merchantRefused false
:merchantVoid false
:shopperApproved false
:shopperCancelled false
:shopperCaptureApproved false
:shopperCaptureRefused false
:shopperRefundApproved false
:shopperRefundRefused false
:shopperRefused false
:shopperVoid false}
:signature {:askSignatureOnScreen false
:deviceName ""
:deviceSlogan ""
:skipSignature false}
:standalone {:currencyCode ""
:enableStandalone false}
:surcharge {:askConfirmation false
:configurations [{:brand ""
:currencies [{:amount 0
:currencyCode ""
:percentage {}}]
:sources []}]}
:timeouts {:fromActiveToSleep 0}
:wifiProfiles {:profiles [{:authType ""
:autoWifi false
:bssType ""
:channel 0
:defaultProfile false
:eap ""
:eapCaCert {:data ""
:name ""}
:eapClientCert {}
:eapClientKey {}
:eapClientPwd ""
:eapIdentity ""
:eapIntermediateCert {}
:eapPwd ""
:hiddenSsid false
:name ""
:psk ""
:ssid ""
:wsec ""}]
:settings {:band ""
:roaming false
:timeout 0}}}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/companies/:companyId/terminalSettings"),
Content = new StringContent("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/companies/:companyId/terminalSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalSettings"
payload := strings.NewReader("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/companies/:companyId/terminalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3136
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/terminalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/terminalSettings")
.header("content-type", "application/json")
.body("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.asString();
const data = JSON.stringify({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/terminalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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}}/companies/:companyId/terminalSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalSettings")
.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/companies/:companyId/terminalSettings',
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({
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalSettings',
headers: {'content-type': 'application/json'},
body: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
},
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}}/companies/:companyId/terminalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
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}}/companies/:companyId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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 = @{ @"cardholderReceipt": @{ @"headerForAuthorizedReceipt": @"" },
@"connectivity": @{ @"simcardStatus": @"" },
@"gratuities": @[ @{ @"allowCustomAmount": @NO, @"currency": @"", @"predefinedTipEntries": @[ ], @"usePredefinedTipEntries": @NO } ],
@"hardware": @{ @"displayMaximumBackLight": @0 },
@"nexo": @{ @"displayUrls": @{ @"localUrls": @[ @{ @"encrypted": @NO, @"password": @"", @"url": @"", @"username": @"" } ], @"publicUrls": @[ @{ } ] }, @"encryptionKey": @{ @"identifier": @"", @"passphrase": @"", @"version": @0 }, @"eventUrls": @{ @"eventLocalUrls": @[ @{ } ], @"eventPublicUrls": @[ @{ } ] }, @"nexoEventUrls": @[ ] },
@"offlineProcessing": @{ @"chipFloorLimit": @0, @"offlineSwipeLimits": @[ @{ @"amount": @0, @"currencyCode": @"" } ] },
@"opi": @{ @"enablePayAtTable": @NO, @"payAtTableStoreNumber": @"", @"payAtTableURL": @"" },
@"passcodes": @{ @"adminMenuPin": @"", @"refundPin": @"", @"screenLockPin": @"", @"txMenuPin": @"" },
@"payAtTable": @{ @"authenticationMethod": @"", @"enablePayAtTable": @NO },
@"payment": @{ @"hideMinorUnitsInCurrencies": @[ ] },
@"receiptOptions": @{ @"logo": @"", @"qrCodeData": @"" },
@"receiptPrinting": @{ @"merchantApproved": @NO, @"merchantCancelled": @NO, @"merchantCaptureApproved": @NO, @"merchantCaptureRefused": @NO, @"merchantRefundApproved": @NO, @"merchantRefundRefused": @NO, @"merchantRefused": @NO, @"merchantVoid": @NO, @"shopperApproved": @NO, @"shopperCancelled": @NO, @"shopperCaptureApproved": @NO, @"shopperCaptureRefused": @NO, @"shopperRefundApproved": @NO, @"shopperRefundRefused": @NO, @"shopperRefused": @NO, @"shopperVoid": @NO },
@"signature": @{ @"askSignatureOnScreen": @NO, @"deviceName": @"", @"deviceSlogan": @"", @"skipSignature": @NO },
@"standalone": @{ @"currencyCode": @"", @"enableStandalone": @NO },
@"surcharge": @{ @"askConfirmation": @NO, @"configurations": @[ @{ @"brand": @"", @"currencies": @[ @{ @"amount": @0, @"currencyCode": @"", @"percentage": @{ } } ], @"sources": @[ ] } ] },
@"timeouts": @{ @"fromActiveToSleep": @0 },
@"wifiProfiles": @{ @"profiles": @[ @{ @"authType": @"", @"autoWifi": @NO, @"bssType": @"", @"channel": @0, @"defaultProfile": @NO, @"eap": @"", @"eapCaCert": @{ @"data": @"", @"name": @"" }, @"eapClientCert": @{ }, @"eapClientKey": @{ }, @"eapClientPwd": @"", @"eapIdentity": @"", @"eapIntermediateCert": @{ }, @"eapPwd": @"", @"hiddenSsid": @NO, @"name": @"", @"psk": @"", @"ssid": @"", @"wsec": @"" } ], @"settings": @{ @"band": @"", @"roaming": @NO, @"timeout": @0 } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/terminalSettings"]
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}}/companies/:companyId/terminalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalSettings",
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([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]),
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}}/companies/:companyId/terminalSettings', [
'body' => '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/terminalSettings');
$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}}/companies/:companyId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/terminalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalSettings"
payload = {
"cardholderReceipt": { "headerForAuthorizedReceipt": "" },
"connectivity": { "simcardStatus": "" },
"gratuities": [
{
"allowCustomAmount": False,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": False
}
],
"hardware": { "displayMaximumBackLight": 0 },
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": False,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [{}]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [{}],
"eventPublicUrls": [{}]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": False,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": False
},
"payment": { "hideMinorUnitsInCurrencies": [] },
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": False,
"merchantCancelled": False,
"merchantCaptureApproved": False,
"merchantCaptureRefused": False,
"merchantRefundApproved": False,
"merchantRefundRefused": False,
"merchantRefused": False,
"merchantVoid": False,
"shopperApproved": False,
"shopperCancelled": False,
"shopperCaptureApproved": False,
"shopperCaptureRefused": False,
"shopperRefundApproved": False,
"shopperRefundRefused": False,
"shopperRefused": False,
"shopperVoid": False
},
"signature": {
"askSignatureOnScreen": False,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": False
},
"standalone": {
"currencyCode": "",
"enableStandalone": False
},
"surcharge": {
"askConfirmation": False,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": { "fromActiveToSleep": 0 },
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": False,
"bssType": "",
"channel": 0,
"defaultProfile": False,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": False,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": False,
"timeout": 0
}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalSettings"
payload <- "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/companies/:companyId/terminalSettings")
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/companies/:companyId/terminalSettings') do |req|
req.body = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/companies/:companyId/terminalSettings";
let payload = json!({
"cardholderReceipt": json!({"headerForAuthorizedReceipt": ""}),
"connectivity": json!({"simcardStatus": ""}),
"gratuities": (
json!({
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": (),
"usePredefinedTipEntries": false
})
),
"hardware": json!({"displayMaximumBackLight": 0}),
"nexo": json!({
"displayUrls": json!({
"localUrls": (
json!({
"encrypted": false,
"password": "",
"url": "",
"username": ""
})
),
"publicUrls": (json!({}))
}),
"encryptionKey": json!({
"identifier": "",
"passphrase": "",
"version": 0
}),
"eventUrls": json!({
"eventLocalUrls": (json!({})),
"eventPublicUrls": (json!({}))
}),
"nexoEventUrls": ()
}),
"offlineProcessing": json!({
"chipFloorLimit": 0,
"offlineSwipeLimits": (
json!({
"amount": 0,
"currencyCode": ""
})
)
}),
"opi": json!({
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
}),
"passcodes": json!({
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
}),
"payAtTable": json!({
"authenticationMethod": "",
"enablePayAtTable": false
}),
"payment": json!({"hideMinorUnitsInCurrencies": ()}),
"receiptOptions": json!({
"logo": "",
"qrCodeData": ""
}),
"receiptPrinting": json!({
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
}),
"signature": json!({
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
}),
"standalone": json!({
"currencyCode": "",
"enableStandalone": false
}),
"surcharge": json!({
"askConfirmation": false,
"configurations": (
json!({
"brand": "",
"currencies": (
json!({
"amount": 0,
"currencyCode": "",
"percentage": json!({})
})
),
"sources": ()
})
)
}),
"timeouts": json!({"fromActiveToSleep": 0}),
"wifiProfiles": json!({
"profiles": (
json!({
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": json!({
"data": "",
"name": ""
}),
"eapClientCert": json!({}),
"eapClientKey": json!({}),
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": json!({}),
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
})
),
"settings": json!({
"band": "",
"roaming": false,
"timeout": 0
})
})
});
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}}/companies/:companyId/terminalSettings \
--header 'content-type: application/json' \
--data '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
echo '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}' | \
http PATCH {{baseUrl}}/companies/:companyId/terminalSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\n }\n }\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/terminalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardholderReceipt": ["headerForAuthorizedReceipt": ""],
"connectivity": ["simcardStatus": ""],
"gratuities": [
[
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
]
],
"hardware": ["displayMaximumBackLight": 0],
"nexo": [
"displayUrls": [
"localUrls": [
[
"encrypted": false,
"password": "",
"url": "",
"username": ""
]
],
"publicUrls": [[]]
],
"encryptionKey": [
"identifier": "",
"passphrase": "",
"version": 0
],
"eventUrls": [
"eventLocalUrls": [[]],
"eventPublicUrls": [[]]
],
"nexoEventUrls": []
],
"offlineProcessing": [
"chipFloorLimit": 0,
"offlineSwipeLimits": [
[
"amount": 0,
"currencyCode": ""
]
]
],
"opi": [
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
],
"passcodes": [
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
],
"payAtTable": [
"authenticationMethod": "",
"enablePayAtTable": false
],
"payment": ["hideMinorUnitsInCurrencies": []],
"receiptOptions": [
"logo": "",
"qrCodeData": ""
],
"receiptPrinting": [
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
],
"signature": [
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
],
"standalone": [
"currencyCode": "",
"enableStandalone": false
],
"surcharge": [
"askConfirmation": false,
"configurations": [
[
"brand": "",
"currencies": [
[
"amount": 0,
"currencyCode": "",
"percentage": []
]
],
"sources": []
]
]
],
"timeouts": ["fromActiveToSleep": 0],
"wifiProfiles": [
"profiles": [
[
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": [
"data": "",
"name": ""
],
"eapClientCert": [],
"eapClientKey": [],
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": [],
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
]
],
"settings": [
"band": "",
"roaming": false,
"timeout": 0
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "peap",
"eapCaCert": {
"data": "MD1rKS05M2JqRVFNQ...RTtLH1tLWo=",
"name": "eap-peap-ca.pem"
},
"eapIdentity": "admin",
"eapIntermediateCert": {
"data": "PD3tUS1CRDdJTiGDR...EFoLS0tLQg=",
"name": "eap-peap-client.pem"
},
"eapPwd": "EAP_PEAP_PASSWORD",
"hiddenSsid": false,
"name": "Profile-eap-peap-1",
"ssid": "your-network",
"wsec": "ccmp"
},
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": false,
"hiddenSsid": false,
"name": "Profile-guest-wifi",
"psk": "WIFI_PASSWORD",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "tls",
"eapCaCert": {
"data": "LS0tLS05M2JqRVFNQ...EUtLS0tLQo=",
"name": "eap-tls-ca.pem"
},
"eapClientCert": {
"data": "LS0tLS1CRUdJTiBDR...EUtLS0tLQo=",
"name": "eap-tls-client.pem"
},
"eapClientKey": {
"data": "AAAB3NzaC1...Rtah3KLFwPU=",
"name": "rsa-private.key"
},
"eapClientPwd": "",
"eapIdentity": "admin",
"hiddenSsid": false,
"name": "Profile-eap-tls-1",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
PATCH
Update the terminal logo
{{baseUrl}}/companies/:companyId/terminalLogos
QUERY PARAMS
model
companyId
BODY json
{
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/terminalLogos?model=");
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 \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/terminalLogos" {:query-params {:model ""}
:content-type :json
:form-params {:data ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/terminalLogos?model="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\"\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}}/companies/:companyId/terminalLogos?model="),
Content = new StringContent("{\n \"data\": \"\"\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}}/companies/:companyId/terminalLogos?model=");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/terminalLogos?model="
payload := strings.NewReader("{\n \"data\": \"\"\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/companies/:companyId/terminalLogos?model= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/terminalLogos?model="))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\"\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 \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.header("content-type", "application/json")
.body("{\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/terminalLogos?model=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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}}/companies/:companyId/terminalLogos?model=',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
.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/companies/:companyId/terminalLogos?model=',
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({data: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/terminalLogos',
qs: {model: ''},
headers: {'content-type': 'application/json'},
body: {data: ''},
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}}/companies/:companyId/terminalLogos');
req.query({
model: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: ''
});
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}}/companies/:companyId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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 = @{ @"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/terminalLogos?model="]
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}}/companies/:companyId/terminalLogos?model=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/terminalLogos?model=",
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([
'data' => ''
]),
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}}/companies/:companyId/terminalLogos?model=', [
'body' => '{
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/terminalLogos');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setQueryData([
'model' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/terminalLogos');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'model' => ''
]));
$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}}/companies/:companyId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/terminalLogos?model=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/terminalLogos"
querystring = {"model":""}
payload = { "data": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/terminalLogos"
queryString <- list(model = "")
payload <- "{\n \"data\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/terminalLogos?model=")
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 \"data\": \"\"\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/companies/:companyId/terminalLogos') do |req|
req.params['model'] = ''
req.body = "{\n \"data\": \"\"\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}}/companies/:companyId/terminalLogos";
let querystring = [
("model", ""),
];
let payload = json!({"data": ""});
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)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url '{{baseUrl}}/companies/:companyId/terminalLogos?model=' \
--header 'content-type: application/json' \
--data '{
"data": ""
}'
echo '{
"data": ""
}' | \
http PATCH '{{baseUrl}}/companies/:companyId/terminalLogos?model=' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "data": ""\n}' \
--output-document \
- '{{baseUrl}}/companies/:companyId/terminalLogos?model='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["data": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/terminalLogos?model=")! 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
{
"data": "LOGO_INHERITED_FROM_HIGHER_LEVEL_BASE-64_ENCODED_STRING"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "BASE-64_ENCODED_STRING_FROM_THE_REQUEST"
}
GET
Get terminal settings (2)
{{baseUrl}}/merchants/:merchantId/terminalSettings
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalSettings")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalSettings"
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}}/merchants/:merchantId/terminalSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalSettings"
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/merchants/:merchantId/terminalSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalSettings"))
.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}}/merchants/:merchantId/terminalSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalSettings")
.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}}/merchants/:merchantId/terminalSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalSettings';
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}}/merchants/:merchantId/terminalSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalSettings',
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}}/merchants/:merchantId/terminalSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalSettings');
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}}/merchants/:merchantId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalSettings';
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}}/merchants/:merchantId/terminalSettings"]
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}}/merchants/:merchantId/terminalSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalSettings",
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}}/merchants/:merchantId/terminalSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalSettings")
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/merchants/:merchantId/terminalSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalSettings";
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}}/merchants/:merchantId/terminalSettings
http GET {{baseUrl}}/merchants/:merchantId/terminalSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"hiddenSsid": false,
"name": "Guest Wi-Fi",
"psk": "4R8R2R3V456X",
"ssid": "G470P37660D4G",
"wsec": "ccmp"
}
],
"settings": {
"band": "All",
"roaming": true
}
}
}
GET
Get the terminal logo (2)
{{baseUrl}}/merchants/:merchantId/terminalLogos
QUERY PARAMS
model
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/terminalLogos" {:query-params {:model ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalLogos?model="
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}}/merchants/:merchantId/terminalLogos?model="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalLogos?model="
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/merchants/:merchantId/terminalLogos?model= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalLogos?model="))
.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}}/merchants/:merchantId/terminalLogos?model=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.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}}/merchants/:merchantId/terminalLogos?model=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=';
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}}/merchants/:merchantId/terminalLogos?model=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/terminalLogos?model=',
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}}/merchants/:merchantId/terminalLogos',
qs: {model: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/terminalLogos');
req.query({
model: ''
});
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}}/merchants/:merchantId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=';
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}}/merchants/:merchantId/terminalLogos?model="]
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}}/merchants/:merchantId/terminalLogos?model=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalLogos?model=",
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}}/merchants/:merchantId/terminalLogos?model=');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalLogos');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'model' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalLogos');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'model' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/terminalLogos?model=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalLogos"
querystring = {"model":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalLogos"
queryString <- list(model = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
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/merchants/:merchantId/terminalLogos') do |req|
req.params['model'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/terminalLogos";
let querystring = [
("model", ""),
];
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}}/merchants/:merchantId/terminalLogos?model='
http GET '{{baseUrl}}/merchants/:merchantId/terminalLogos?model='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/merchants/:merchantId/terminalLogos?model='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")! 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
{
"data": "BASE-64_ENCODED_STRING"
}
PATCH
Update terminal settings (2)
{{baseUrl}}/merchants/:merchantId/terminalSettings
QUERY PARAMS
merchantId
BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalSettings");
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/terminalSettings" {:content-type :json
:form-params {:cardholderReceipt {:headerForAuthorizedReceipt ""}
:connectivity {:simcardStatus ""}
:gratuities [{:allowCustomAmount false
:currency ""
:predefinedTipEntries []
:usePredefinedTipEntries false}]
:hardware {:displayMaximumBackLight 0}
:nexo {:displayUrls {:localUrls [{:encrypted false
:password ""
:url ""
:username ""}]
:publicUrls [{}]}
:encryptionKey {:identifier ""
:passphrase ""
:version 0}
:eventUrls {:eventLocalUrls [{}]
:eventPublicUrls [{}]}
:nexoEventUrls []}
:offlineProcessing {:chipFloorLimit 0
:offlineSwipeLimits [{:amount 0
:currencyCode ""}]}
:opi {:enablePayAtTable false
:payAtTableStoreNumber ""
:payAtTableURL ""}
:passcodes {:adminMenuPin ""
:refundPin ""
:screenLockPin ""
:txMenuPin ""}
:payAtTable {:authenticationMethod ""
:enablePayAtTable false}
:payment {:hideMinorUnitsInCurrencies []}
:receiptOptions {:logo ""
:qrCodeData ""}
:receiptPrinting {:merchantApproved false
:merchantCancelled false
:merchantCaptureApproved false
:merchantCaptureRefused false
:merchantRefundApproved false
:merchantRefundRefused false
:merchantRefused false
:merchantVoid false
:shopperApproved false
:shopperCancelled false
:shopperCaptureApproved false
:shopperCaptureRefused false
:shopperRefundApproved false
:shopperRefundRefused false
:shopperRefused false
:shopperVoid false}
:signature {:askSignatureOnScreen false
:deviceName ""
:deviceSlogan ""
:skipSignature false}
:standalone {:currencyCode ""
:enableStandalone false}
:surcharge {:askConfirmation false
:configurations [{:brand ""
:currencies [{:amount 0
:currencyCode ""
:percentage {}}]
:sources []}]}
:timeouts {:fromActiveToSleep 0}
:wifiProfiles {:profiles [{:authType ""
:autoWifi false
:bssType ""
:channel 0
:defaultProfile false
:eap ""
:eapCaCert {:data ""
:name ""}
:eapClientCert {}
:eapClientKey {}
:eapClientPwd ""
:eapIdentity ""
:eapIntermediateCert {}
:eapPwd ""
:hiddenSsid false
:name ""
:psk ""
:ssid ""
:wsec ""}]
:settings {:band ""
:roaming false
:timeout 0}}}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/terminalSettings"),
Content = new StringContent("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/terminalSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalSettings"
payload := strings.NewReader("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/merchants/:merchantId/terminalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3136
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/terminalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/terminalSettings")
.header("content-type", "application/json")
.body("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.asString();
const data = JSON.stringify({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/terminalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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}}/merchants/:merchantId/terminalSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalSettings")
.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/merchants/:merchantId/terminalSettings',
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({
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalSettings',
headers: {'content-type': 'application/json'},
body: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
},
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}}/merchants/:merchantId/terminalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
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}}/merchants/:merchantId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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 = @{ @"cardholderReceipt": @{ @"headerForAuthorizedReceipt": @"" },
@"connectivity": @{ @"simcardStatus": @"" },
@"gratuities": @[ @{ @"allowCustomAmount": @NO, @"currency": @"", @"predefinedTipEntries": @[ ], @"usePredefinedTipEntries": @NO } ],
@"hardware": @{ @"displayMaximumBackLight": @0 },
@"nexo": @{ @"displayUrls": @{ @"localUrls": @[ @{ @"encrypted": @NO, @"password": @"", @"url": @"", @"username": @"" } ], @"publicUrls": @[ @{ } ] }, @"encryptionKey": @{ @"identifier": @"", @"passphrase": @"", @"version": @0 }, @"eventUrls": @{ @"eventLocalUrls": @[ @{ } ], @"eventPublicUrls": @[ @{ } ] }, @"nexoEventUrls": @[ ] },
@"offlineProcessing": @{ @"chipFloorLimit": @0, @"offlineSwipeLimits": @[ @{ @"amount": @0, @"currencyCode": @"" } ] },
@"opi": @{ @"enablePayAtTable": @NO, @"payAtTableStoreNumber": @"", @"payAtTableURL": @"" },
@"passcodes": @{ @"adminMenuPin": @"", @"refundPin": @"", @"screenLockPin": @"", @"txMenuPin": @"" },
@"payAtTable": @{ @"authenticationMethod": @"", @"enablePayAtTable": @NO },
@"payment": @{ @"hideMinorUnitsInCurrencies": @[ ] },
@"receiptOptions": @{ @"logo": @"", @"qrCodeData": @"" },
@"receiptPrinting": @{ @"merchantApproved": @NO, @"merchantCancelled": @NO, @"merchantCaptureApproved": @NO, @"merchantCaptureRefused": @NO, @"merchantRefundApproved": @NO, @"merchantRefundRefused": @NO, @"merchantRefused": @NO, @"merchantVoid": @NO, @"shopperApproved": @NO, @"shopperCancelled": @NO, @"shopperCaptureApproved": @NO, @"shopperCaptureRefused": @NO, @"shopperRefundApproved": @NO, @"shopperRefundRefused": @NO, @"shopperRefused": @NO, @"shopperVoid": @NO },
@"signature": @{ @"askSignatureOnScreen": @NO, @"deviceName": @"", @"deviceSlogan": @"", @"skipSignature": @NO },
@"standalone": @{ @"currencyCode": @"", @"enableStandalone": @NO },
@"surcharge": @{ @"askConfirmation": @NO, @"configurations": @[ @{ @"brand": @"", @"currencies": @[ @{ @"amount": @0, @"currencyCode": @"", @"percentage": @{ } } ], @"sources": @[ ] } ] },
@"timeouts": @{ @"fromActiveToSleep": @0 },
@"wifiProfiles": @{ @"profiles": @[ @{ @"authType": @"", @"autoWifi": @NO, @"bssType": @"", @"channel": @0, @"defaultProfile": @NO, @"eap": @"", @"eapCaCert": @{ @"data": @"", @"name": @"" }, @"eapClientCert": @{ }, @"eapClientKey": @{ }, @"eapClientPwd": @"", @"eapIdentity": @"", @"eapIntermediateCert": @{ }, @"eapPwd": @"", @"hiddenSsid": @NO, @"name": @"", @"psk": @"", @"ssid": @"", @"wsec": @"" } ], @"settings": @{ @"band": @"", @"roaming": @NO, @"timeout": @0 } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/terminalSettings"]
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}}/merchants/:merchantId/terminalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalSettings",
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([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]),
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}}/merchants/:merchantId/terminalSettings', [
'body' => '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalSettings');
$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}}/merchants/:merchantId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/terminalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalSettings"
payload = {
"cardholderReceipt": { "headerForAuthorizedReceipt": "" },
"connectivity": { "simcardStatus": "" },
"gratuities": [
{
"allowCustomAmount": False,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": False
}
],
"hardware": { "displayMaximumBackLight": 0 },
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": False,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [{}]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [{}],
"eventPublicUrls": [{}]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": False,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": False
},
"payment": { "hideMinorUnitsInCurrencies": [] },
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": False,
"merchantCancelled": False,
"merchantCaptureApproved": False,
"merchantCaptureRefused": False,
"merchantRefundApproved": False,
"merchantRefundRefused": False,
"merchantRefused": False,
"merchantVoid": False,
"shopperApproved": False,
"shopperCancelled": False,
"shopperCaptureApproved": False,
"shopperCaptureRefused": False,
"shopperRefundApproved": False,
"shopperRefundRefused": False,
"shopperRefused": False,
"shopperVoid": False
},
"signature": {
"askSignatureOnScreen": False,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": False
},
"standalone": {
"currencyCode": "",
"enableStandalone": False
},
"surcharge": {
"askConfirmation": False,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": { "fromActiveToSleep": 0 },
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": False,
"bssType": "",
"channel": 0,
"defaultProfile": False,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": False,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": False,
"timeout": 0
}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalSettings"
payload <- "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/terminalSettings")
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/merchants/:merchantId/terminalSettings') do |req|
req.body = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/terminalSettings";
let payload = json!({
"cardholderReceipt": json!({"headerForAuthorizedReceipt": ""}),
"connectivity": json!({"simcardStatus": ""}),
"gratuities": (
json!({
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": (),
"usePredefinedTipEntries": false
})
),
"hardware": json!({"displayMaximumBackLight": 0}),
"nexo": json!({
"displayUrls": json!({
"localUrls": (
json!({
"encrypted": false,
"password": "",
"url": "",
"username": ""
})
),
"publicUrls": (json!({}))
}),
"encryptionKey": json!({
"identifier": "",
"passphrase": "",
"version": 0
}),
"eventUrls": json!({
"eventLocalUrls": (json!({})),
"eventPublicUrls": (json!({}))
}),
"nexoEventUrls": ()
}),
"offlineProcessing": json!({
"chipFloorLimit": 0,
"offlineSwipeLimits": (
json!({
"amount": 0,
"currencyCode": ""
})
)
}),
"opi": json!({
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
}),
"passcodes": json!({
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
}),
"payAtTable": json!({
"authenticationMethod": "",
"enablePayAtTable": false
}),
"payment": json!({"hideMinorUnitsInCurrencies": ()}),
"receiptOptions": json!({
"logo": "",
"qrCodeData": ""
}),
"receiptPrinting": json!({
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
}),
"signature": json!({
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
}),
"standalone": json!({
"currencyCode": "",
"enableStandalone": false
}),
"surcharge": json!({
"askConfirmation": false,
"configurations": (
json!({
"brand": "",
"currencies": (
json!({
"amount": 0,
"currencyCode": "",
"percentage": json!({})
})
),
"sources": ()
})
)
}),
"timeouts": json!({"fromActiveToSleep": 0}),
"wifiProfiles": json!({
"profiles": (
json!({
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": json!({
"data": "",
"name": ""
}),
"eapClientCert": json!({}),
"eapClientKey": json!({}),
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": json!({}),
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
})
),
"settings": json!({
"band": "",
"roaming": false,
"timeout": 0
})
})
});
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}}/merchants/:merchantId/terminalSettings \
--header 'content-type: application/json' \
--data '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
echo '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/terminalSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\n }\n }\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/terminalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardholderReceipt": ["headerForAuthorizedReceipt": ""],
"connectivity": ["simcardStatus": ""],
"gratuities": [
[
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
]
],
"hardware": ["displayMaximumBackLight": 0],
"nexo": [
"displayUrls": [
"localUrls": [
[
"encrypted": false,
"password": "",
"url": "",
"username": ""
]
],
"publicUrls": [[]]
],
"encryptionKey": [
"identifier": "",
"passphrase": "",
"version": 0
],
"eventUrls": [
"eventLocalUrls": [[]],
"eventPublicUrls": [[]]
],
"nexoEventUrls": []
],
"offlineProcessing": [
"chipFloorLimit": 0,
"offlineSwipeLimits": [
[
"amount": 0,
"currencyCode": ""
]
]
],
"opi": [
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
],
"passcodes": [
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
],
"payAtTable": [
"authenticationMethod": "",
"enablePayAtTable": false
],
"payment": ["hideMinorUnitsInCurrencies": []],
"receiptOptions": [
"logo": "",
"qrCodeData": ""
],
"receiptPrinting": [
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
],
"signature": [
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
],
"standalone": [
"currencyCode": "",
"enableStandalone": false
],
"surcharge": [
"askConfirmation": false,
"configurations": [
[
"brand": "",
"currencies": [
[
"amount": 0,
"currencyCode": "",
"percentage": []
]
],
"sources": []
]
]
],
"timeouts": ["fromActiveToSleep": 0],
"wifiProfiles": [
"profiles": [
[
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": [
"data": "",
"name": ""
],
"eapClientCert": [],
"eapClientKey": [],
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": [],
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
]
],
"settings": [
"band": "",
"roaming": false,
"timeout": 0
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "peap",
"eapCaCert": {
"data": "MD1rKS05M2JqRVFNQ...RTtLH1tLWo=",
"name": "eap-peap-ca.pem"
},
"eapIdentity": "admin",
"eapIntermediateCert": {
"data": "PD3tUS1CRDdJTiGDR...EFoLS0tLQg=",
"name": "eap-peap-client.pem"
},
"eapPwd": "EAP_PEAP_PASSWORD",
"hiddenSsid": false,
"name": "Profile-eap-peap-1",
"ssid": "your-network",
"wsec": "ccmp"
},
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": false,
"hiddenSsid": false,
"name": "Profile-guest-wifi",
"psk": "WIFI_PASSWORD",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "tls",
"eapCaCert": {
"data": "LS0tLS05M2JqRVFNQ...EUtLS0tLQo=",
"name": "eap-tls-ca.pem"
},
"eapClientCert": {
"data": "LS0tLS1CRUdJTiBDR...EUtLS0tLQo=",
"name": "eap-tls-client.pem"
},
"eapClientKey": {
"data": "AAAB3NzaC1...Rtah3KLFwPU=",
"name": "rsa-private.key"
},
"eapClientPwd": "",
"eapIdentity": "admin",
"hiddenSsid": false,
"name": "Profile-eap-tls-1",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
PATCH
Update the terminal logo (2)
{{baseUrl}}/merchants/:merchantId/terminalLogos
QUERY PARAMS
model
merchantId
BODY json
{
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=");
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 \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/terminalLogos" {:query-params {:model ""}
:content-type :json
:form-params {:data ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/terminalLogos?model="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\"\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}}/merchants/:merchantId/terminalLogos?model="),
Content = new StringContent("{\n \"data\": \"\"\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}}/merchants/:merchantId/terminalLogos?model=");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/terminalLogos?model="
payload := strings.NewReader("{\n \"data\": \"\"\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/merchants/:merchantId/terminalLogos?model= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/terminalLogos?model="))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\"\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 \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.header("content-type", "application/json")
.body("{\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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}}/merchants/:merchantId/terminalLogos?model=',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
.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/merchants/:merchantId/terminalLogos?model=',
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({data: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/terminalLogos',
qs: {model: ''},
headers: {'content-type': 'application/json'},
body: {data: ''},
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}}/merchants/:merchantId/terminalLogos');
req.query({
model: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: ''
});
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}}/merchants/:merchantId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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 = @{ @"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/terminalLogos?model="]
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}}/merchants/:merchantId/terminalLogos?model=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/terminalLogos?model=",
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([
'data' => ''
]),
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}}/merchants/:merchantId/terminalLogos?model=', [
'body' => '{
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/terminalLogos');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setQueryData([
'model' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/terminalLogos');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'model' => ''
]));
$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}}/merchants/:merchantId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/terminalLogos?model=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/terminalLogos"
querystring = {"model":""}
payload = { "data": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/terminalLogos"
queryString <- list(model = "")
payload <- "{\n \"data\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")
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 \"data\": \"\"\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/merchants/:merchantId/terminalLogos') do |req|
req.params['model'] = ''
req.body = "{\n \"data\": \"\"\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}}/merchants/:merchantId/terminalLogos";
let querystring = [
("model", ""),
];
let payload = json!({"data": ""});
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)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=' \
--header 'content-type: application/json' \
--data '{
"data": ""
}'
echo '{
"data": ""
}' | \
http PATCH '{{baseUrl}}/merchants/:merchantId/terminalLogos?model=' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "data": ""\n}' \
--output-document \
- '{{baseUrl}}/merchants/:merchantId/terminalLogos?model='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["data": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/terminalLogos?model=")! 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
{
"data": "LOGO_INHERITED_FROM_HIGHER_LEVEL_BASE-64_ENCODED_STRING"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "BASE-64_ENCODED_STRING_FROM_THE_REQUEST"
}
GET
Get terminal settings (1)
{{baseUrl}}/stores/:storeId/terminalSettings
QUERY PARAMS
storeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId/terminalSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stores/:storeId/terminalSettings")
require "http/client"
url = "{{baseUrl}}/stores/:storeId/terminalSettings"
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}}/stores/:storeId/terminalSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stores/:storeId/terminalSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId/terminalSettings"
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/stores/:storeId/terminalSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stores/:storeId/terminalSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId/terminalSettings"))
.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}}/stores/:storeId/terminalSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stores/:storeId/terminalSettings")
.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}}/stores/:storeId/terminalSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/stores/:storeId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId/terminalSettings';
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}}/stores/:storeId/terminalSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stores/:storeId/terminalSettings',
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}}/stores/:storeId/terminalSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stores/:storeId/terminalSettings');
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}}/stores/:storeId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId/terminalSettings';
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}}/stores/:storeId/terminalSettings"]
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}}/stores/:storeId/terminalSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId/terminalSettings",
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}}/stores/:storeId/terminalSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId/terminalSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stores/:storeId/terminalSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stores/:storeId/terminalSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId/terminalSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stores/:storeId/terminalSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId/terminalSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId/terminalSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores/:storeId/terminalSettings")
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/stores/:storeId/terminalSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stores/:storeId/terminalSettings";
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}}/stores/:storeId/terminalSettings
http GET {{baseUrl}}/stores/:storeId/terminalSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/stores/:storeId/terminalSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"hiddenSsid": false,
"name": "Guest Wi-Fi",
"psk": "4R8R2R3V456X",
"ssid": "G470P37660D4G",
"wsec": "ccmp"
}
],
"settings": {
"band": "All",
"roaming": true
}
}
}
GET
Get terminal settings (GET)
{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings
QUERY PARAMS
merchantId
reference
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
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}}/merchants/:merchantId/stores/:reference/terminalSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
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/merchants/:merchantId/stores/:reference/terminalSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"))
.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}}/merchants/:merchantId/stores/:reference/terminalSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.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}}/merchants/:merchantId/stores/:reference/terminalSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings';
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}}/merchants/:merchantId/stores/:reference/terminalSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/stores/:reference/terminalSettings',
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}}/merchants/:merchantId/stores/:reference/terminalSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
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}}/merchants/:merchantId/stores/:reference/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings';
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}}/merchants/:merchantId/stores/:reference/terminalSettings"]
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}}/merchants/:merchantId/stores/:reference/terminalSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings",
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}}/merchants/:merchantId/stores/:reference/terminalSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/stores/:reference/terminalSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
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/merchants/:merchantId/stores/:reference/terminalSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings";
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}}/merchants/:merchantId/stores/:reference/terminalSettings
http GET {{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"name": "Guest Wi-Fi",
"psk": "4R8R2R3V456X",
"ssid": "G470P37660D4G",
"wsec": "ccmp"
}
],
"settings": {
"band": "All",
"roaming": true
}
}
}
GET
Get the terminal logo (1)
{{baseUrl}}/stores/:storeId/terminalLogos
QUERY PARAMS
model
storeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId/terminalLogos?model=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/stores/:storeId/terminalLogos" {:query-params {:model ""}})
require "http/client"
url = "{{baseUrl}}/stores/:storeId/terminalLogos?model="
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}}/stores/:storeId/terminalLogos?model="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/stores/:storeId/terminalLogos?model=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId/terminalLogos?model="
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/stores/:storeId/terminalLogos?model= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId/terminalLogos?model="))
.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}}/stores/:storeId/terminalLogos?model=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.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}}/stores/:storeId/terminalLogos?model=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/stores/:storeId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId/terminalLogos?model=';
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}}/stores/:storeId/terminalLogos?model=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/stores/:storeId/terminalLogos?model=',
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}}/stores/:storeId/terminalLogos',
qs: {model: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/stores/:storeId/terminalLogos');
req.query({
model: ''
});
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}}/stores/:storeId/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId/terminalLogos?model=';
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}}/stores/:storeId/terminalLogos?model="]
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}}/stores/:storeId/terminalLogos?model=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId/terminalLogos?model=",
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}}/stores/:storeId/terminalLogos?model=');
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId/terminalLogos');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'model' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/stores/:storeId/terminalLogos');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'model' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/stores/:storeId/terminalLogos?model=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId/terminalLogos?model=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/stores/:storeId/terminalLogos?model=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId/terminalLogos"
querystring = {"model":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId/terminalLogos"
queryString <- list(model = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
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/stores/:storeId/terminalLogos') do |req|
req.params['model'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/stores/:storeId/terminalLogos";
let querystring = [
("model", ""),
];
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}}/stores/:storeId/terminalLogos?model='
http GET '{{baseUrl}}/stores/:storeId/terminalLogos?model='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/stores/:storeId/terminalLogos?model='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId/terminalLogos?model=")! 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
{
"data": "BASE-64_ENCODED_STRING"
}
GET
Get the terminal logo (GET)
{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos
QUERY PARAMS
model
merchantId
reference
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos" {:query-params {:model ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="
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/merchants/:merchantId/stores/:reference/terminalLogos?model= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="))
.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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=';
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/stores/:reference/terminalLogos?model=',
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}}/merchants/:merchantId/stores/:reference/terminalLogos',
qs: {model: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos');
req.query({
model: ''
});
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}}/merchants/:merchantId/stores/:reference/terminalLogos',
params: {model: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=';
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model="]
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=",
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'model' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'model' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/stores/:reference/terminalLogos?model=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos"
querystring = {"model":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos"
queryString <- list(model = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
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/merchants/:merchantId/stores/:reference/terminalLogos') do |req|
req.params['model'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos";
let querystring = [
("model", ""),
];
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model='
http GET '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")! 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
{
"data": "BASE-64_ENCODED_STRING"
}
PATCH
Update terminal settings (1)
{{baseUrl}}/stores/:storeId/terminalSettings
QUERY PARAMS
storeId
BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId/terminalSettings");
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/stores/:storeId/terminalSettings" {:content-type :json
:form-params {:cardholderReceipt {:headerForAuthorizedReceipt ""}
:connectivity {:simcardStatus ""}
:gratuities [{:allowCustomAmount false
:currency ""
:predefinedTipEntries []
:usePredefinedTipEntries false}]
:hardware {:displayMaximumBackLight 0}
:nexo {:displayUrls {:localUrls [{:encrypted false
:password ""
:url ""
:username ""}]
:publicUrls [{}]}
:encryptionKey {:identifier ""
:passphrase ""
:version 0}
:eventUrls {:eventLocalUrls [{}]
:eventPublicUrls [{}]}
:nexoEventUrls []}
:offlineProcessing {:chipFloorLimit 0
:offlineSwipeLimits [{:amount 0
:currencyCode ""}]}
:opi {:enablePayAtTable false
:payAtTableStoreNumber ""
:payAtTableURL ""}
:passcodes {:adminMenuPin ""
:refundPin ""
:screenLockPin ""
:txMenuPin ""}
:payAtTable {:authenticationMethod ""
:enablePayAtTable false}
:payment {:hideMinorUnitsInCurrencies []}
:receiptOptions {:logo ""
:qrCodeData ""}
:receiptPrinting {:merchantApproved false
:merchantCancelled false
:merchantCaptureApproved false
:merchantCaptureRefused false
:merchantRefundApproved false
:merchantRefundRefused false
:merchantRefused false
:merchantVoid false
:shopperApproved false
:shopperCancelled false
:shopperCaptureApproved false
:shopperCaptureRefused false
:shopperRefundApproved false
:shopperRefundRefused false
:shopperRefused false
:shopperVoid false}
:signature {:askSignatureOnScreen false
:deviceName ""
:deviceSlogan ""
:skipSignature false}
:standalone {:currencyCode ""
:enableStandalone false}
:surcharge {:askConfirmation false
:configurations [{:brand ""
:currencies [{:amount 0
:currencyCode ""
:percentage {}}]
:sources []}]}
:timeouts {:fromActiveToSleep 0}
:wifiProfiles {:profiles [{:authType ""
:autoWifi false
:bssType ""
:channel 0
:defaultProfile false
:eap ""
:eapCaCert {:data ""
:name ""}
:eapClientCert {}
:eapClientKey {}
:eapClientPwd ""
:eapIdentity ""
:eapIntermediateCert {}
:eapPwd ""
:hiddenSsid false
:name ""
:psk ""
:ssid ""
:wsec ""}]
:settings {:band ""
:roaming false
:timeout 0}}}})
require "http/client"
url = "{{baseUrl}}/stores/:storeId/terminalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/stores/:storeId/terminalSettings"),
Content = new StringContent("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/stores/:storeId/terminalSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId/terminalSettings"
payload := strings.NewReader("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/stores/:storeId/terminalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3136
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/stores/:storeId/terminalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId/terminalSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/stores/:storeId/terminalSettings")
.header("content-type", "application/json")
.body("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.asString();
const data = JSON.stringify({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/stores/:storeId/terminalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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}}/stores/:storeId/terminalSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalSettings")
.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/stores/:storeId/terminalSettings',
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({
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId/terminalSettings',
headers: {'content-type': 'application/json'},
body: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
},
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}}/stores/:storeId/terminalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
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}}/stores/:storeId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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 = @{ @"cardholderReceipt": @{ @"headerForAuthorizedReceipt": @"" },
@"connectivity": @{ @"simcardStatus": @"" },
@"gratuities": @[ @{ @"allowCustomAmount": @NO, @"currency": @"", @"predefinedTipEntries": @[ ], @"usePredefinedTipEntries": @NO } ],
@"hardware": @{ @"displayMaximumBackLight": @0 },
@"nexo": @{ @"displayUrls": @{ @"localUrls": @[ @{ @"encrypted": @NO, @"password": @"", @"url": @"", @"username": @"" } ], @"publicUrls": @[ @{ } ] }, @"encryptionKey": @{ @"identifier": @"", @"passphrase": @"", @"version": @0 }, @"eventUrls": @{ @"eventLocalUrls": @[ @{ } ], @"eventPublicUrls": @[ @{ } ] }, @"nexoEventUrls": @[ ] },
@"offlineProcessing": @{ @"chipFloorLimit": @0, @"offlineSwipeLimits": @[ @{ @"amount": @0, @"currencyCode": @"" } ] },
@"opi": @{ @"enablePayAtTable": @NO, @"payAtTableStoreNumber": @"", @"payAtTableURL": @"" },
@"passcodes": @{ @"adminMenuPin": @"", @"refundPin": @"", @"screenLockPin": @"", @"txMenuPin": @"" },
@"payAtTable": @{ @"authenticationMethod": @"", @"enablePayAtTable": @NO },
@"payment": @{ @"hideMinorUnitsInCurrencies": @[ ] },
@"receiptOptions": @{ @"logo": @"", @"qrCodeData": @"" },
@"receiptPrinting": @{ @"merchantApproved": @NO, @"merchantCancelled": @NO, @"merchantCaptureApproved": @NO, @"merchantCaptureRefused": @NO, @"merchantRefundApproved": @NO, @"merchantRefundRefused": @NO, @"merchantRefused": @NO, @"merchantVoid": @NO, @"shopperApproved": @NO, @"shopperCancelled": @NO, @"shopperCaptureApproved": @NO, @"shopperCaptureRefused": @NO, @"shopperRefundApproved": @NO, @"shopperRefundRefused": @NO, @"shopperRefused": @NO, @"shopperVoid": @NO },
@"signature": @{ @"askSignatureOnScreen": @NO, @"deviceName": @"", @"deviceSlogan": @"", @"skipSignature": @NO },
@"standalone": @{ @"currencyCode": @"", @"enableStandalone": @NO },
@"surcharge": @{ @"askConfirmation": @NO, @"configurations": @[ @{ @"brand": @"", @"currencies": @[ @{ @"amount": @0, @"currencyCode": @"", @"percentage": @{ } } ], @"sources": @[ ] } ] },
@"timeouts": @{ @"fromActiveToSleep": @0 },
@"wifiProfiles": @{ @"profiles": @[ @{ @"authType": @"", @"autoWifi": @NO, @"bssType": @"", @"channel": @0, @"defaultProfile": @NO, @"eap": @"", @"eapCaCert": @{ @"data": @"", @"name": @"" }, @"eapClientCert": @{ }, @"eapClientKey": @{ }, @"eapClientPwd": @"", @"eapIdentity": @"", @"eapIntermediateCert": @{ }, @"eapPwd": @"", @"hiddenSsid": @NO, @"name": @"", @"psk": @"", @"ssid": @"", @"wsec": @"" } ], @"settings": @{ @"band": @"", @"roaming": @NO, @"timeout": @0 } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stores/:storeId/terminalSettings"]
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}}/stores/:storeId/terminalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId/terminalSettings",
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([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]),
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}}/stores/:storeId/terminalSettings', [
'body' => '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId/terminalSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
$request->setRequestUrl('{{baseUrl}}/stores/:storeId/terminalSettings');
$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}}/stores/:storeId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/stores/:storeId/terminalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId/terminalSettings"
payload = {
"cardholderReceipt": { "headerForAuthorizedReceipt": "" },
"connectivity": { "simcardStatus": "" },
"gratuities": [
{
"allowCustomAmount": False,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": False
}
],
"hardware": { "displayMaximumBackLight": 0 },
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": False,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [{}]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [{}],
"eventPublicUrls": [{}]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": False,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": False
},
"payment": { "hideMinorUnitsInCurrencies": [] },
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": False,
"merchantCancelled": False,
"merchantCaptureApproved": False,
"merchantCaptureRefused": False,
"merchantRefundApproved": False,
"merchantRefundRefused": False,
"merchantRefused": False,
"merchantVoid": False,
"shopperApproved": False,
"shopperCancelled": False,
"shopperCaptureApproved": False,
"shopperCaptureRefused": False,
"shopperRefundApproved": False,
"shopperRefundRefused": False,
"shopperRefused": False,
"shopperVoid": False
},
"signature": {
"askSignatureOnScreen": False,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": False
},
"standalone": {
"currencyCode": "",
"enableStandalone": False
},
"surcharge": {
"askConfirmation": False,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": { "fromActiveToSleep": 0 },
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": False,
"bssType": "",
"channel": 0,
"defaultProfile": False,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": False,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": False,
"timeout": 0
}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId/terminalSettings"
payload <- "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/stores/:storeId/terminalSettings")
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/stores/:storeId/terminalSettings') do |req|
req.body = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/stores/:storeId/terminalSettings";
let payload = json!({
"cardholderReceipt": json!({"headerForAuthorizedReceipt": ""}),
"connectivity": json!({"simcardStatus": ""}),
"gratuities": (
json!({
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": (),
"usePredefinedTipEntries": false
})
),
"hardware": json!({"displayMaximumBackLight": 0}),
"nexo": json!({
"displayUrls": json!({
"localUrls": (
json!({
"encrypted": false,
"password": "",
"url": "",
"username": ""
})
),
"publicUrls": (json!({}))
}),
"encryptionKey": json!({
"identifier": "",
"passphrase": "",
"version": 0
}),
"eventUrls": json!({
"eventLocalUrls": (json!({})),
"eventPublicUrls": (json!({}))
}),
"nexoEventUrls": ()
}),
"offlineProcessing": json!({
"chipFloorLimit": 0,
"offlineSwipeLimits": (
json!({
"amount": 0,
"currencyCode": ""
})
)
}),
"opi": json!({
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
}),
"passcodes": json!({
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
}),
"payAtTable": json!({
"authenticationMethod": "",
"enablePayAtTable": false
}),
"payment": json!({"hideMinorUnitsInCurrencies": ()}),
"receiptOptions": json!({
"logo": "",
"qrCodeData": ""
}),
"receiptPrinting": json!({
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
}),
"signature": json!({
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
}),
"standalone": json!({
"currencyCode": "",
"enableStandalone": false
}),
"surcharge": json!({
"askConfirmation": false,
"configurations": (
json!({
"brand": "",
"currencies": (
json!({
"amount": 0,
"currencyCode": "",
"percentage": json!({})
})
),
"sources": ()
})
)
}),
"timeouts": json!({"fromActiveToSleep": 0}),
"wifiProfiles": json!({
"profiles": (
json!({
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": json!({
"data": "",
"name": ""
}),
"eapClientCert": json!({}),
"eapClientKey": json!({}),
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": json!({}),
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
})
),
"settings": json!({
"band": "",
"roaming": false,
"timeout": 0
})
})
});
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}}/stores/:storeId/terminalSettings \
--header 'content-type: application/json' \
--data '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
echo '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}' | \
http PATCH {{baseUrl}}/stores/:storeId/terminalSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\n }\n }\n}' \
--output-document \
- {{baseUrl}}/stores/:storeId/terminalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardholderReceipt": ["headerForAuthorizedReceipt": ""],
"connectivity": ["simcardStatus": ""],
"gratuities": [
[
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
]
],
"hardware": ["displayMaximumBackLight": 0],
"nexo": [
"displayUrls": [
"localUrls": [
[
"encrypted": false,
"password": "",
"url": "",
"username": ""
]
],
"publicUrls": [[]]
],
"encryptionKey": [
"identifier": "",
"passphrase": "",
"version": 0
],
"eventUrls": [
"eventLocalUrls": [[]],
"eventPublicUrls": [[]]
],
"nexoEventUrls": []
],
"offlineProcessing": [
"chipFloorLimit": 0,
"offlineSwipeLimits": [
[
"amount": 0,
"currencyCode": ""
]
]
],
"opi": [
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
],
"passcodes": [
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
],
"payAtTable": [
"authenticationMethod": "",
"enablePayAtTable": false
],
"payment": ["hideMinorUnitsInCurrencies": []],
"receiptOptions": [
"logo": "",
"qrCodeData": ""
],
"receiptPrinting": [
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
],
"signature": [
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
],
"standalone": [
"currencyCode": "",
"enableStandalone": false
],
"surcharge": [
"askConfirmation": false,
"configurations": [
[
"brand": "",
"currencies": [
[
"amount": 0,
"currencyCode": "",
"percentage": []
]
],
"sources": []
]
]
],
"timeouts": ["fromActiveToSleep": 0],
"wifiProfiles": [
"profiles": [
[
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": [
"data": "",
"name": ""
],
"eapClientCert": [],
"eapClientKey": [],
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": [],
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
]
],
"settings": [
"band": "",
"roaming": false,
"timeout": 0
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "peap",
"eapCaCert": {
"data": "MD1rKS05M2JqRVFNQ...RTtLH1tLWo=",
"name": "eap-peap-ca.pem"
},
"eapIdentity": "admin",
"eapIntermediateCert": {
"data": "PD3tUS1CRDdJTiGDR...EFoLS0tLQg=",
"name": "eap-peap-client.pem"
},
"eapPwd": "EAP_PEAP_PASSWORD",
"hiddenSsid": false,
"name": "Profile-eap-peap-1",
"ssid": "your-network",
"wsec": "ccmp"
},
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": false,
"hiddenSsid": false,
"name": "Profile-guest-wifi",
"psk": "WIFI_PASSWORD",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "tls",
"eapCaCert": {
"data": "LS0tLS05M2JqRVFNQ...EUtLS0tLQo=",
"name": "eap-tls-ca.pem"
},
"eapClientCert": {
"data": "LS0tLS1CRUdJTiBDR...EUtLS0tLQo=",
"name": "eap-tls-client.pem"
},
"eapClientKey": {
"data": "AAAB3NzaC1...Rtah3KLFwPU=",
"name": "rsa-private.key"
},
"eapClientPwd": "",
"eapIdentity": "admin",
"hiddenSsid": false,
"name": "Profile-eap-tls-1",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
PATCH
Update terminal settings (PATCH)
{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings
QUERY PARAMS
merchantId
reference
BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings");
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings" {:content-type :json
:form-params {:cardholderReceipt {:headerForAuthorizedReceipt ""}
:connectivity {:simcardStatus ""}
:gratuities [{:allowCustomAmount false
:currency ""
:predefinedTipEntries []
:usePredefinedTipEntries false}]
:hardware {:displayMaximumBackLight 0}
:nexo {:displayUrls {:localUrls [{:encrypted false
:password ""
:url ""
:username ""}]
:publicUrls [{}]}
:encryptionKey {:identifier ""
:passphrase ""
:version 0}
:eventUrls {:eventLocalUrls [{}]
:eventPublicUrls [{}]}
:nexoEventUrls []}
:offlineProcessing {:chipFloorLimit 0
:offlineSwipeLimits [{:amount 0
:currencyCode ""}]}
:opi {:enablePayAtTable false
:payAtTableStoreNumber ""
:payAtTableURL ""}
:passcodes {:adminMenuPin ""
:refundPin ""
:screenLockPin ""
:txMenuPin ""}
:payAtTable {:authenticationMethod ""
:enablePayAtTable false}
:payment {:hideMinorUnitsInCurrencies []}
:receiptOptions {:logo ""
:qrCodeData ""}
:receiptPrinting {:merchantApproved false
:merchantCancelled false
:merchantCaptureApproved false
:merchantCaptureRefused false
:merchantRefundApproved false
:merchantRefundRefused false
:merchantRefused false
:merchantVoid false
:shopperApproved false
:shopperCancelled false
:shopperCaptureApproved false
:shopperCaptureRefused false
:shopperRefundApproved false
:shopperRefundRefused false
:shopperRefused false
:shopperVoid false}
:signature {:askSignatureOnScreen false
:deviceName ""
:deviceSlogan ""
:skipSignature false}
:standalone {:currencyCode ""
:enableStandalone false}
:surcharge {:askConfirmation false
:configurations [{:brand ""
:currencies [{:amount 0
:currencyCode ""
:percentage {}}]
:sources []}]}
:timeouts {:fromActiveToSleep 0}
:wifiProfiles {:profiles [{:authType ""
:autoWifi false
:bssType ""
:channel 0
:defaultProfile false
:eap ""
:eapCaCert {:data ""
:name ""}
:eapClientCert {}
:eapClientKey {}
:eapClientPwd ""
:eapIdentity ""
:eapIntermediateCert {}
:eapPwd ""
:hiddenSsid false
:name ""
:psk ""
:ssid ""
:wsec ""}]
:settings {:band ""
:roaming false
:timeout 0}}}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/stores/:reference/terminalSettings"),
Content = new StringContent("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/stores/:reference/terminalSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
payload := strings.NewReader("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/merchants/:merchantId/stores/:reference/terminalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3136
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.header("content-type", "application/json")
.body("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.asString();
const data = JSON.stringify({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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}}/merchants/:merchantId/stores/:reference/terminalSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")
.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/merchants/:merchantId/stores/:reference/terminalSettings',
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({
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings',
headers: {'content-type': 'application/json'},
body: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
},
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}}/merchants/:merchantId/stores/:reference/terminalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
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}}/merchants/:merchantId/stores/:reference/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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 = @{ @"cardholderReceipt": @{ @"headerForAuthorizedReceipt": @"" },
@"connectivity": @{ @"simcardStatus": @"" },
@"gratuities": @[ @{ @"allowCustomAmount": @NO, @"currency": @"", @"predefinedTipEntries": @[ ], @"usePredefinedTipEntries": @NO } ],
@"hardware": @{ @"displayMaximumBackLight": @0 },
@"nexo": @{ @"displayUrls": @{ @"localUrls": @[ @{ @"encrypted": @NO, @"password": @"", @"url": @"", @"username": @"" } ], @"publicUrls": @[ @{ } ] }, @"encryptionKey": @{ @"identifier": @"", @"passphrase": @"", @"version": @0 }, @"eventUrls": @{ @"eventLocalUrls": @[ @{ } ], @"eventPublicUrls": @[ @{ } ] }, @"nexoEventUrls": @[ ] },
@"offlineProcessing": @{ @"chipFloorLimit": @0, @"offlineSwipeLimits": @[ @{ @"amount": @0, @"currencyCode": @"" } ] },
@"opi": @{ @"enablePayAtTable": @NO, @"payAtTableStoreNumber": @"", @"payAtTableURL": @"" },
@"passcodes": @{ @"adminMenuPin": @"", @"refundPin": @"", @"screenLockPin": @"", @"txMenuPin": @"" },
@"payAtTable": @{ @"authenticationMethod": @"", @"enablePayAtTable": @NO },
@"payment": @{ @"hideMinorUnitsInCurrencies": @[ ] },
@"receiptOptions": @{ @"logo": @"", @"qrCodeData": @"" },
@"receiptPrinting": @{ @"merchantApproved": @NO, @"merchantCancelled": @NO, @"merchantCaptureApproved": @NO, @"merchantCaptureRefused": @NO, @"merchantRefundApproved": @NO, @"merchantRefundRefused": @NO, @"merchantRefused": @NO, @"merchantVoid": @NO, @"shopperApproved": @NO, @"shopperCancelled": @NO, @"shopperCaptureApproved": @NO, @"shopperCaptureRefused": @NO, @"shopperRefundApproved": @NO, @"shopperRefundRefused": @NO, @"shopperRefused": @NO, @"shopperVoid": @NO },
@"signature": @{ @"askSignatureOnScreen": @NO, @"deviceName": @"", @"deviceSlogan": @"", @"skipSignature": @NO },
@"standalone": @{ @"currencyCode": @"", @"enableStandalone": @NO },
@"surcharge": @{ @"askConfirmation": @NO, @"configurations": @[ @{ @"brand": @"", @"currencies": @[ @{ @"amount": @0, @"currencyCode": @"", @"percentage": @{ } } ], @"sources": @[ ] } ] },
@"timeouts": @{ @"fromActiveToSleep": @0 },
@"wifiProfiles": @{ @"profiles": @[ @{ @"authType": @"", @"autoWifi": @NO, @"bssType": @"", @"channel": @0, @"defaultProfile": @NO, @"eap": @"", @"eapCaCert": @{ @"data": @"", @"name": @"" }, @"eapClientCert": @{ }, @"eapClientKey": @{ }, @"eapClientPwd": @"", @"eapIdentity": @"", @"eapIntermediateCert": @{ }, @"eapPwd": @"", @"hiddenSsid": @NO, @"name": @"", @"psk": @"", @"ssid": @"", @"wsec": @"" } ], @"settings": @{ @"band": @"", @"roaming": @NO, @"timeout": @0 } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"]
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}}/merchants/:merchantId/stores/:reference/terminalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings",
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([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]),
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}}/merchants/:merchantId/stores/:reference/terminalSettings', [
'body' => '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings');
$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}}/merchants/:merchantId/stores/:reference/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/stores/:reference/terminalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
payload = {
"cardholderReceipt": { "headerForAuthorizedReceipt": "" },
"connectivity": { "simcardStatus": "" },
"gratuities": [
{
"allowCustomAmount": False,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": False
}
],
"hardware": { "displayMaximumBackLight": 0 },
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": False,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [{}]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [{}],
"eventPublicUrls": [{}]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": False,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": False
},
"payment": { "hideMinorUnitsInCurrencies": [] },
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": False,
"merchantCancelled": False,
"merchantCaptureApproved": False,
"merchantCaptureRefused": False,
"merchantRefundApproved": False,
"merchantRefundRefused": False,
"merchantRefused": False,
"merchantVoid": False,
"shopperApproved": False,
"shopperCancelled": False,
"shopperCaptureApproved": False,
"shopperCaptureRefused": False,
"shopperRefundApproved": False,
"shopperRefundRefused": False,
"shopperRefused": False,
"shopperVoid": False
},
"signature": {
"askSignatureOnScreen": False,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": False
},
"standalone": {
"currencyCode": "",
"enableStandalone": False
},
"surcharge": {
"askConfirmation": False,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": { "fromActiveToSleep": 0 },
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": False,
"bssType": "",
"channel": 0,
"defaultProfile": False,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": False,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": False,
"timeout": 0
}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings"
payload <- "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/stores/:reference/terminalSettings")
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/merchants/:merchantId/stores/:reference/terminalSettings') do |req|
req.body = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/merchants/:merchantId/stores/:reference/terminalSettings";
let payload = json!({
"cardholderReceipt": json!({"headerForAuthorizedReceipt": ""}),
"connectivity": json!({"simcardStatus": ""}),
"gratuities": (
json!({
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": (),
"usePredefinedTipEntries": false
})
),
"hardware": json!({"displayMaximumBackLight": 0}),
"nexo": json!({
"displayUrls": json!({
"localUrls": (
json!({
"encrypted": false,
"password": "",
"url": "",
"username": ""
})
),
"publicUrls": (json!({}))
}),
"encryptionKey": json!({
"identifier": "",
"passphrase": "",
"version": 0
}),
"eventUrls": json!({
"eventLocalUrls": (json!({})),
"eventPublicUrls": (json!({}))
}),
"nexoEventUrls": ()
}),
"offlineProcessing": json!({
"chipFloorLimit": 0,
"offlineSwipeLimits": (
json!({
"amount": 0,
"currencyCode": ""
})
)
}),
"opi": json!({
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
}),
"passcodes": json!({
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
}),
"payAtTable": json!({
"authenticationMethod": "",
"enablePayAtTable": false
}),
"payment": json!({"hideMinorUnitsInCurrencies": ()}),
"receiptOptions": json!({
"logo": "",
"qrCodeData": ""
}),
"receiptPrinting": json!({
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
}),
"signature": json!({
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
}),
"standalone": json!({
"currencyCode": "",
"enableStandalone": false
}),
"surcharge": json!({
"askConfirmation": false,
"configurations": (
json!({
"brand": "",
"currencies": (
json!({
"amount": 0,
"currencyCode": "",
"percentage": json!({})
})
),
"sources": ()
})
)
}),
"timeouts": json!({"fromActiveToSleep": 0}),
"wifiProfiles": json!({
"profiles": (
json!({
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": json!({
"data": "",
"name": ""
}),
"eapClientCert": json!({}),
"eapClientKey": json!({}),
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": json!({}),
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
})
),
"settings": json!({
"band": "",
"roaming": false,
"timeout": 0
})
})
});
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}}/merchants/:merchantId/stores/:reference/terminalSettings \
--header 'content-type: application/json' \
--data '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
echo '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\n }\n }\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardholderReceipt": ["headerForAuthorizedReceipt": ""],
"connectivity": ["simcardStatus": ""],
"gratuities": [
[
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
]
],
"hardware": ["displayMaximumBackLight": 0],
"nexo": [
"displayUrls": [
"localUrls": [
[
"encrypted": false,
"password": "",
"url": "",
"username": ""
]
],
"publicUrls": [[]]
],
"encryptionKey": [
"identifier": "",
"passphrase": "",
"version": 0
],
"eventUrls": [
"eventLocalUrls": [[]],
"eventPublicUrls": [[]]
],
"nexoEventUrls": []
],
"offlineProcessing": [
"chipFloorLimit": 0,
"offlineSwipeLimits": [
[
"amount": 0,
"currencyCode": ""
]
]
],
"opi": [
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
],
"passcodes": [
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
],
"payAtTable": [
"authenticationMethod": "",
"enablePayAtTable": false
],
"payment": ["hideMinorUnitsInCurrencies": []],
"receiptOptions": [
"logo": "",
"qrCodeData": ""
],
"receiptPrinting": [
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
],
"signature": [
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
],
"standalone": [
"currencyCode": "",
"enableStandalone": false
],
"surcharge": [
"askConfirmation": false,
"configurations": [
[
"brand": "",
"currencies": [
[
"amount": 0,
"currencyCode": "",
"percentage": []
]
],
"sources": []
]
]
],
"timeouts": ["fromActiveToSleep": 0],
"wifiProfiles": [
"profiles": [
[
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": [
"data": "",
"name": ""
],
"eapClientCert": [],
"eapClientKey": [],
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": [],
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
]
],
"settings": [
"band": "",
"roaming": false,
"timeout": 0
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "peap",
"eapCaCert": {
"data": "MD1rKS05M2JqRVFNQ...RTtLH1tLWo=",
"name": "eap-peap-ca.pem"
},
"eapIdentity": "admin",
"eapIntermediateCert": {
"data": "PD3tUS1CRDdJTiGDR...EFoLS0tLQg=",
"name": "eap-peap-client.pem"
},
"eapPwd": "EAP_PEAP_PASSWORD",
"name": "Profile-eap-peap-1",
"ssid": "your-network",
"wsec": "ccmp"
},
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": false,
"name": "Profile-guest-wifi",
"psk": "WIFI_PASSWORD",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "tls",
"eapCaCert": {
"data": "LS0tLS05M2JqRVFNQ...EUtLS0tLQo=",
"name": "eap-tls-ca.pem"
},
"eapClientCert": {
"data": "LS0tLS1CRUdJTiBDR...EUtLS0tLQo=",
"name": "eap-tls-client.pem"
},
"eapClientKey": {
"data": "AAAB3NzaC1...Rtah3KLFwPU=",
"name": "rsa-private.key"
},
"eapClientPwd": "",
"eapIdentity": "admin",
"name": "Profile-eap-tls-1",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
PATCH
Update the terminal logo (1)
{{baseUrl}}/stores/:storeId/terminalLogos
QUERY PARAMS
model
storeId
BODY json
{
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/stores/:storeId/terminalLogos?model=");
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 \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/stores/:storeId/terminalLogos" {:query-params {:model ""}
:content-type :json
:form-params {:data ""}})
require "http/client"
url = "{{baseUrl}}/stores/:storeId/terminalLogos?model="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\"\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}}/stores/:storeId/terminalLogos?model="),
Content = new StringContent("{\n \"data\": \"\"\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}}/stores/:storeId/terminalLogos?model=");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/stores/:storeId/terminalLogos?model="
payload := strings.NewReader("{\n \"data\": \"\"\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/stores/:storeId/terminalLogos?model= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/stores/:storeId/terminalLogos?model="))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\"\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 \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.header("content-type", "application/json")
.body("{\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/stores/:storeId/terminalLogos?model=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/stores/:storeId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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}}/stores/:storeId/terminalLogos?model=',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
.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/stores/:storeId/terminalLogos?model=',
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({data: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/stores/:storeId/terminalLogos',
qs: {model: ''},
headers: {'content-type': 'application/json'},
body: {data: ''},
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}}/stores/:storeId/terminalLogos');
req.query({
model: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: ''
});
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}}/stores/:storeId/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/stores/:storeId/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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 = @{ @"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/stores/:storeId/terminalLogos?model="]
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}}/stores/:storeId/terminalLogos?model=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/stores/:storeId/terminalLogos?model=",
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([
'data' => ''
]),
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}}/stores/:storeId/terminalLogos?model=', [
'body' => '{
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/stores/:storeId/terminalLogos');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setQueryData([
'model' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/stores/:storeId/terminalLogos');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'model' => ''
]));
$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}}/stores/:storeId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/stores/:storeId/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/stores/:storeId/terminalLogos?model=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/stores/:storeId/terminalLogos"
querystring = {"model":""}
payload = { "data": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/stores/:storeId/terminalLogos"
queryString <- list(model = "")
payload <- "{\n \"data\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/stores/:storeId/terminalLogos?model=")
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 \"data\": \"\"\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/stores/:storeId/terminalLogos') do |req|
req.params['model'] = ''
req.body = "{\n \"data\": \"\"\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}}/stores/:storeId/terminalLogos";
let querystring = [
("model", ""),
];
let payload = json!({"data": ""});
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)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url '{{baseUrl}}/stores/:storeId/terminalLogos?model=' \
--header 'content-type: application/json' \
--data '{
"data": ""
}'
echo '{
"data": ""
}' | \
http PATCH '{{baseUrl}}/stores/:storeId/terminalLogos?model=' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "data": ""\n}' \
--output-document \
- '{{baseUrl}}/stores/:storeId/terminalLogos?model='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["data": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/stores/:storeId/terminalLogos?model=")! 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
{
"data": "LOGO_INHERITED_FROM_HIGHER_LEVEL_BASE-64_ENCODED_STRING"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "BASE-64_ENCODED_STRING_FROM_THE_REQUEST"
}
PATCH
Update the terminal logo (PATCH)
{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos
QUERY PARAMS
model
merchantId
reference
BODY json
{
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=");
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 \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos" {:query-params {:model ""}
:content-type :json
:form-params {:data ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\"\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}}/merchants/:merchantId/stores/:reference/terminalLogos?model="),
Content = new StringContent("{\n \"data\": \"\"\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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="
payload := strings.NewReader("{\n \"data\": \"\"\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/merchants/:merchantId/stores/:reference/terminalLogos?model= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\"\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 \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.header("content-type", "application/json")
.body("{\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
.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/merchants/:merchantId/stores/:reference/terminalLogos?model=',
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({data: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos',
qs: {model: ''},
headers: {'content-type': 'application/json'},
body: {data: ''},
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}}/merchants/:merchantId/stores/:reference/terminalLogos');
req.query({
model: ''
});
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: ''
});
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}}/merchants/:merchantId/stores/:reference/terminalLogos',
params: {model: ''},
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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 = @{ @"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model="]
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=",
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([
'data' => ''
]),
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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=', [
'body' => '{
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setQueryData([
'model' => ''
]);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'model' => ''
]));
$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}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/stores/:reference/terminalLogos?model=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos"
querystring = {"model":""}
payload = { "data": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos"
queryString <- list(model = "")
payload <- "{\n \"data\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")
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 \"data\": \"\"\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/merchants/:merchantId/stores/:reference/terminalLogos') do |req|
req.params['model'] = ''
req.body = "{\n \"data\": \"\"\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}}/merchants/:merchantId/stores/:reference/terminalLogos";
let querystring = [
("model", ""),
];
let payload = json!({"data": ""});
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)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' \
--header 'content-type: application/json' \
--data '{
"data": ""
}'
echo '{
"data": ""
}' | \
http PATCH '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=' \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "data": ""\n}' \
--output-document \
- '{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model='
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["data": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/stores/:reference/terminalLogos?model=")! 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
{
"data": "LOGO_INHERITED_FROM_HIGHER_LEVEL_BASE-64_ENCODED_STRING"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "BASE-64_ENCODED_STRING_FROM_THE_REQUEST"
}
GET
Get terminal settings (3)
{{baseUrl}}/terminals/:terminalId/terminalSettings
QUERY PARAMS
terminalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals/:terminalId/terminalSettings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/terminals/:terminalId/terminalSettings")
require "http/client"
url = "{{baseUrl}}/terminals/:terminalId/terminalSettings"
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}}/terminals/:terminalId/terminalSettings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/terminals/:terminalId/terminalSettings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals/:terminalId/terminalSettings"
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/terminals/:terminalId/terminalSettings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/terminals/:terminalId/terminalSettings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals/:terminalId/terminalSettings"))
.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}}/terminals/:terminalId/terminalSettings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/terminals/:terminalId/terminalSettings")
.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}}/terminals/:terminalId/terminalSettings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/terminals/:terminalId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals/:terminalId/terminalSettings';
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}}/terminals/:terminalId/terminalSettings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalSettings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/terminals/:terminalId/terminalSettings',
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}}/terminals/:terminalId/terminalSettings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/terminals/:terminalId/terminalSettings');
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}}/terminals/:terminalId/terminalSettings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals/:terminalId/terminalSettings';
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}}/terminals/:terminalId/terminalSettings"]
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}}/terminals/:terminalId/terminalSettings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals/:terminalId/terminalSettings",
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}}/terminals/:terminalId/terminalSettings');
echo $response->getBody();
setUrl('{{baseUrl}}/terminals/:terminalId/terminalSettings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/terminals/:terminalId/terminalSettings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/terminals/:terminalId/terminalSettings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals/:terminalId/terminalSettings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/terminals/:terminalId/terminalSettings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals/:terminalId/terminalSettings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals/:terminalId/terminalSettings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/terminals/:terminalId/terminalSettings")
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/terminals/:terminalId/terminalSettings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/terminals/:terminalId/terminalSettings";
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}}/terminals/:terminalId/terminalSettings
http GET {{baseUrl}}/terminals/:terminalId/terminalSettings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/terminals/:terminalId/terminalSettings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals/:terminalId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"connectivity": {
"simcardStatus": "INVENTORY"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"hiddenSsid": false,
"name": "Guest Wi-Fi",
"psk": "4R8R2R3V456X",
"ssid": "G470P37660D4G",
"wsec": "ccmp"
}
],
"settings": {
"band": "All",
"roaming": true
}
}
}
GET
Get the terminal logo (3)
{{baseUrl}}/terminals/:terminalId/terminalLogos
QUERY PARAMS
terminalId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals/:terminalId/terminalLogos");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/terminals/:terminalId/terminalLogos")
require "http/client"
url = "{{baseUrl}}/terminals/:terminalId/terminalLogos"
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}}/terminals/:terminalId/terminalLogos"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/terminals/:terminalId/terminalLogos");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals/:terminalId/terminalLogos"
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/terminals/:terminalId/terminalLogos HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/terminals/:terminalId/terminalLogos")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals/:terminalId/terminalLogos"))
.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}}/terminals/:terminalId/terminalLogos")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/terminals/:terminalId/terminalLogos")
.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}}/terminals/:terminalId/terminalLogos');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/terminals/:terminalId/terminalLogos'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals/:terminalId/terminalLogos';
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}}/terminals/:terminalId/terminalLogos',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalLogos")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/terminals/:terminalId/terminalLogos',
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}}/terminals/:terminalId/terminalLogos'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/terminals/:terminalId/terminalLogos');
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}}/terminals/:terminalId/terminalLogos'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals/:terminalId/terminalLogos';
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}}/terminals/:terminalId/terminalLogos"]
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}}/terminals/:terminalId/terminalLogos" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals/:terminalId/terminalLogos",
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}}/terminals/:terminalId/terminalLogos');
echo $response->getBody();
setUrl('{{baseUrl}}/terminals/:terminalId/terminalLogos');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/terminals/:terminalId/terminalLogos');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/terminals/:terminalId/terminalLogos' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals/:terminalId/terminalLogos' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/terminals/:terminalId/terminalLogos")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals/:terminalId/terminalLogos"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals/:terminalId/terminalLogos"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/terminals/:terminalId/terminalLogos")
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/terminals/:terminalId/terminalLogos') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/terminals/:terminalId/terminalLogos";
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}}/terminals/:terminalId/terminalLogos
http GET {{baseUrl}}/terminals/:terminalId/terminalLogos
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/terminals/:terminalId/terminalLogos
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals/:terminalId/terminalLogos")! 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
{
"data": "BASE-64_ENCODED_STRING"
}
PATCH
Update terminal settings (3)
{{baseUrl}}/terminals/:terminalId/terminalSettings
QUERY PARAMS
terminalId
BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals/:terminalId/terminalSettings");
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/terminals/:terminalId/terminalSettings" {:content-type :json
:form-params {:cardholderReceipt {:headerForAuthorizedReceipt ""}
:connectivity {:simcardStatus ""}
:gratuities [{:allowCustomAmount false
:currency ""
:predefinedTipEntries []
:usePredefinedTipEntries false}]
:hardware {:displayMaximumBackLight 0}
:nexo {:displayUrls {:localUrls [{:encrypted false
:password ""
:url ""
:username ""}]
:publicUrls [{}]}
:encryptionKey {:identifier ""
:passphrase ""
:version 0}
:eventUrls {:eventLocalUrls [{}]
:eventPublicUrls [{}]}
:nexoEventUrls []}
:offlineProcessing {:chipFloorLimit 0
:offlineSwipeLimits [{:amount 0
:currencyCode ""}]}
:opi {:enablePayAtTable false
:payAtTableStoreNumber ""
:payAtTableURL ""}
:passcodes {:adminMenuPin ""
:refundPin ""
:screenLockPin ""
:txMenuPin ""}
:payAtTable {:authenticationMethod ""
:enablePayAtTable false}
:payment {:hideMinorUnitsInCurrencies []}
:receiptOptions {:logo ""
:qrCodeData ""}
:receiptPrinting {:merchantApproved false
:merchantCancelled false
:merchantCaptureApproved false
:merchantCaptureRefused false
:merchantRefundApproved false
:merchantRefundRefused false
:merchantRefused false
:merchantVoid false
:shopperApproved false
:shopperCancelled false
:shopperCaptureApproved false
:shopperCaptureRefused false
:shopperRefundApproved false
:shopperRefundRefused false
:shopperRefused false
:shopperVoid false}
:signature {:askSignatureOnScreen false
:deviceName ""
:deviceSlogan ""
:skipSignature false}
:standalone {:currencyCode ""
:enableStandalone false}
:surcharge {:askConfirmation false
:configurations [{:brand ""
:currencies [{:amount 0
:currencyCode ""
:percentage {}}]
:sources []}]}
:timeouts {:fromActiveToSleep 0}
:wifiProfiles {:profiles [{:authType ""
:autoWifi false
:bssType ""
:channel 0
:defaultProfile false
:eap ""
:eapCaCert {:data ""
:name ""}
:eapClientCert {}
:eapClientKey {}
:eapClientPwd ""
:eapIdentity ""
:eapIntermediateCert {}
:eapPwd ""
:hiddenSsid false
:name ""
:psk ""
:ssid ""
:wsec ""}]
:settings {:band ""
:roaming false
:timeout 0}}}})
require "http/client"
url = "{{baseUrl}}/terminals/:terminalId/terminalSettings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/terminals/:terminalId/terminalSettings"),
Content = new StringContent("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/terminals/:terminalId/terminalSettings");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals/:terminalId/terminalSettings"
payload := strings.NewReader("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/terminals/:terminalId/terminalSettings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3136
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/terminals/:terminalId/terminalSettings")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals/:terminalId/terminalSettings"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalSettings")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/terminals/:terminalId/terminalSettings")
.header("content-type", "application/json")
.body("{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
.asString();
const data = JSON.stringify({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/terminals/:terminalId/terminalSettings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/terminals/:terminalId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals/:terminalId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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}}/terminals/:terminalId/terminalSettings',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalSettings")
.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/terminals/:terminalId/terminalSettings',
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({
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/terminals/:terminalId/terminalSettings',
headers: {'content-type': 'application/json'},
body: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
},
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}}/terminals/:terminalId/terminalSettings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardholderReceipt: {
headerForAuthorizedReceipt: ''
},
connectivity: {
simcardStatus: ''
},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {
displayMaximumBackLight: 0
},
nexo: {
displayUrls: {
localUrls: [
{
encrypted: false,
password: '',
url: '',
username: ''
}
],
publicUrls: [
{}
]
},
encryptionKey: {
identifier: '',
passphrase: '',
version: 0
},
eventUrls: {
eventLocalUrls: [
{}
],
eventPublicUrls: [
{}
]
},
nexoEventUrls: []
},
offlineProcessing: {
chipFloorLimit: 0,
offlineSwipeLimits: [
{
amount: 0,
currencyCode: ''
}
]
},
opi: {
enablePayAtTable: false,
payAtTableStoreNumber: '',
payAtTableURL: ''
},
passcodes: {
adminMenuPin: '',
refundPin: '',
screenLockPin: '',
txMenuPin: ''
},
payAtTable: {
authenticationMethod: '',
enablePayAtTable: false
},
payment: {
hideMinorUnitsInCurrencies: []
},
receiptOptions: {
logo: '',
qrCodeData: ''
},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {
currencyCode: '',
enableStandalone: false
},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [
{
amount: 0,
currencyCode: '',
percentage: {}
}
],
sources: []
}
]
},
timeouts: {
fromActiveToSleep: 0
},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {
data: '',
name: ''
},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {
band: '',
roaming: false,
timeout: 0
}
}
});
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}}/terminals/:terminalId/terminalSettings',
headers: {'content-type': 'application/json'},
data: {
cardholderReceipt: {headerForAuthorizedReceipt: ''},
connectivity: {simcardStatus: ''},
gratuities: [
{
allowCustomAmount: false,
currency: '',
predefinedTipEntries: [],
usePredefinedTipEntries: false
}
],
hardware: {displayMaximumBackLight: 0},
nexo: {
displayUrls: {
localUrls: [{encrypted: false, password: '', url: '', username: ''}],
publicUrls: [{}]
},
encryptionKey: {identifier: '', passphrase: '', version: 0},
eventUrls: {eventLocalUrls: [{}], eventPublicUrls: [{}]},
nexoEventUrls: []
},
offlineProcessing: {chipFloorLimit: 0, offlineSwipeLimits: [{amount: 0, currencyCode: ''}]},
opi: {enablePayAtTable: false, payAtTableStoreNumber: '', payAtTableURL: ''},
passcodes: {adminMenuPin: '', refundPin: '', screenLockPin: '', txMenuPin: ''},
payAtTable: {authenticationMethod: '', enablePayAtTable: false},
payment: {hideMinorUnitsInCurrencies: []},
receiptOptions: {logo: '', qrCodeData: ''},
receiptPrinting: {
merchantApproved: false,
merchantCancelled: false,
merchantCaptureApproved: false,
merchantCaptureRefused: false,
merchantRefundApproved: false,
merchantRefundRefused: false,
merchantRefused: false,
merchantVoid: false,
shopperApproved: false,
shopperCancelled: false,
shopperCaptureApproved: false,
shopperCaptureRefused: false,
shopperRefundApproved: false,
shopperRefundRefused: false,
shopperRefused: false,
shopperVoid: false
},
signature: {
askSignatureOnScreen: false,
deviceName: '',
deviceSlogan: '',
skipSignature: false
},
standalone: {currencyCode: '', enableStandalone: false},
surcharge: {
askConfirmation: false,
configurations: [
{
brand: '',
currencies: [{amount: 0, currencyCode: '', percentage: {}}],
sources: []
}
]
},
timeouts: {fromActiveToSleep: 0},
wifiProfiles: {
profiles: [
{
authType: '',
autoWifi: false,
bssType: '',
channel: 0,
defaultProfile: false,
eap: '',
eapCaCert: {data: '', name: ''},
eapClientCert: {},
eapClientKey: {},
eapClientPwd: '',
eapIdentity: '',
eapIntermediateCert: {},
eapPwd: '',
hiddenSsid: false,
name: '',
psk: '',
ssid: '',
wsec: ''
}
],
settings: {band: '', roaming: false, timeout: 0}
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals/:terminalId/terminalSettings';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"cardholderReceipt":{"headerForAuthorizedReceipt":""},"connectivity":{"simcardStatus":""},"gratuities":[{"allowCustomAmount":false,"currency":"","predefinedTipEntries":[],"usePredefinedTipEntries":false}],"hardware":{"displayMaximumBackLight":0},"nexo":{"displayUrls":{"localUrls":[{"encrypted":false,"password":"","url":"","username":""}],"publicUrls":[{}]},"encryptionKey":{"identifier":"","passphrase":"","version":0},"eventUrls":{"eventLocalUrls":[{}],"eventPublicUrls":[{}]},"nexoEventUrls":[]},"offlineProcessing":{"chipFloorLimit":0,"offlineSwipeLimits":[{"amount":0,"currencyCode":""}]},"opi":{"enablePayAtTable":false,"payAtTableStoreNumber":"","payAtTableURL":""},"passcodes":{"adminMenuPin":"","refundPin":"","screenLockPin":"","txMenuPin":""},"payAtTable":{"authenticationMethod":"","enablePayAtTable":false},"payment":{"hideMinorUnitsInCurrencies":[]},"receiptOptions":{"logo":"","qrCodeData":""},"receiptPrinting":{"merchantApproved":false,"merchantCancelled":false,"merchantCaptureApproved":false,"merchantCaptureRefused":false,"merchantRefundApproved":false,"merchantRefundRefused":false,"merchantRefused":false,"merchantVoid":false,"shopperApproved":false,"shopperCancelled":false,"shopperCaptureApproved":false,"shopperCaptureRefused":false,"shopperRefundApproved":false,"shopperRefundRefused":false,"shopperRefused":false,"shopperVoid":false},"signature":{"askSignatureOnScreen":false,"deviceName":"","deviceSlogan":"","skipSignature":false},"standalone":{"currencyCode":"","enableStandalone":false},"surcharge":{"askConfirmation":false,"configurations":[{"brand":"","currencies":[{"amount":0,"currencyCode":"","percentage":{}}],"sources":[]}]},"timeouts":{"fromActiveToSleep":0},"wifiProfiles":{"profiles":[{"authType":"","autoWifi":false,"bssType":"","channel":0,"defaultProfile":false,"eap":"","eapCaCert":{"data":"","name":""},"eapClientCert":{},"eapClientKey":{},"eapClientPwd":"","eapIdentity":"","eapIntermediateCert":{},"eapPwd":"","hiddenSsid":false,"name":"","psk":"","ssid":"","wsec":""}],"settings":{"band":"","roaming":false,"timeout":0}}}'
};
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 = @{ @"cardholderReceipt": @{ @"headerForAuthorizedReceipt": @"" },
@"connectivity": @{ @"simcardStatus": @"" },
@"gratuities": @[ @{ @"allowCustomAmount": @NO, @"currency": @"", @"predefinedTipEntries": @[ ], @"usePredefinedTipEntries": @NO } ],
@"hardware": @{ @"displayMaximumBackLight": @0 },
@"nexo": @{ @"displayUrls": @{ @"localUrls": @[ @{ @"encrypted": @NO, @"password": @"", @"url": @"", @"username": @"" } ], @"publicUrls": @[ @{ } ] }, @"encryptionKey": @{ @"identifier": @"", @"passphrase": @"", @"version": @0 }, @"eventUrls": @{ @"eventLocalUrls": @[ @{ } ], @"eventPublicUrls": @[ @{ } ] }, @"nexoEventUrls": @[ ] },
@"offlineProcessing": @{ @"chipFloorLimit": @0, @"offlineSwipeLimits": @[ @{ @"amount": @0, @"currencyCode": @"" } ] },
@"opi": @{ @"enablePayAtTable": @NO, @"payAtTableStoreNumber": @"", @"payAtTableURL": @"" },
@"passcodes": @{ @"adminMenuPin": @"", @"refundPin": @"", @"screenLockPin": @"", @"txMenuPin": @"" },
@"payAtTable": @{ @"authenticationMethod": @"", @"enablePayAtTable": @NO },
@"payment": @{ @"hideMinorUnitsInCurrencies": @[ ] },
@"receiptOptions": @{ @"logo": @"", @"qrCodeData": @"" },
@"receiptPrinting": @{ @"merchantApproved": @NO, @"merchantCancelled": @NO, @"merchantCaptureApproved": @NO, @"merchantCaptureRefused": @NO, @"merchantRefundApproved": @NO, @"merchantRefundRefused": @NO, @"merchantRefused": @NO, @"merchantVoid": @NO, @"shopperApproved": @NO, @"shopperCancelled": @NO, @"shopperCaptureApproved": @NO, @"shopperCaptureRefused": @NO, @"shopperRefundApproved": @NO, @"shopperRefundRefused": @NO, @"shopperRefused": @NO, @"shopperVoid": @NO },
@"signature": @{ @"askSignatureOnScreen": @NO, @"deviceName": @"", @"deviceSlogan": @"", @"skipSignature": @NO },
@"standalone": @{ @"currencyCode": @"", @"enableStandalone": @NO },
@"surcharge": @{ @"askConfirmation": @NO, @"configurations": @[ @{ @"brand": @"", @"currencies": @[ @{ @"amount": @0, @"currencyCode": @"", @"percentage": @{ } } ], @"sources": @[ ] } ] },
@"timeouts": @{ @"fromActiveToSleep": @0 },
@"wifiProfiles": @{ @"profiles": @[ @{ @"authType": @"", @"autoWifi": @NO, @"bssType": @"", @"channel": @0, @"defaultProfile": @NO, @"eap": @"", @"eapCaCert": @{ @"data": @"", @"name": @"" }, @"eapClientCert": @{ }, @"eapClientKey": @{ }, @"eapClientPwd": @"", @"eapIdentity": @"", @"eapIntermediateCert": @{ }, @"eapPwd": @"", @"hiddenSsid": @NO, @"name": @"", @"psk": @"", @"ssid": @"", @"wsec": @"" } ], @"settings": @{ @"band": @"", @"roaming": @NO, @"timeout": @0 } } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/terminals/:terminalId/terminalSettings"]
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}}/terminals/:terminalId/terminalSettings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals/:terminalId/terminalSettings",
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([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]),
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}}/terminals/:terminalId/terminalSettings', [
'body' => '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/terminals/:terminalId/terminalSettings');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardholderReceipt' => [
'headerForAuthorizedReceipt' => ''
],
'connectivity' => [
'simcardStatus' => ''
],
'gratuities' => [
[
'allowCustomAmount' => null,
'currency' => '',
'predefinedTipEntries' => [
],
'usePredefinedTipEntries' => null
]
],
'hardware' => [
'displayMaximumBackLight' => 0
],
'nexo' => [
'displayUrls' => [
'localUrls' => [
[
'encrypted' => null,
'password' => '',
'url' => '',
'username' => ''
]
],
'publicUrls' => [
[
]
]
],
'encryptionKey' => [
'identifier' => '',
'passphrase' => '',
'version' => 0
],
'eventUrls' => [
'eventLocalUrls' => [
[
]
],
'eventPublicUrls' => [
[
]
]
],
'nexoEventUrls' => [
]
],
'offlineProcessing' => [
'chipFloorLimit' => 0,
'offlineSwipeLimits' => [
[
'amount' => 0,
'currencyCode' => ''
]
]
],
'opi' => [
'enablePayAtTable' => null,
'payAtTableStoreNumber' => '',
'payAtTableURL' => ''
],
'passcodes' => [
'adminMenuPin' => '',
'refundPin' => '',
'screenLockPin' => '',
'txMenuPin' => ''
],
'payAtTable' => [
'authenticationMethod' => '',
'enablePayAtTable' => null
],
'payment' => [
'hideMinorUnitsInCurrencies' => [
]
],
'receiptOptions' => [
'logo' => '',
'qrCodeData' => ''
],
'receiptPrinting' => [
'merchantApproved' => null,
'merchantCancelled' => null,
'merchantCaptureApproved' => null,
'merchantCaptureRefused' => null,
'merchantRefundApproved' => null,
'merchantRefundRefused' => null,
'merchantRefused' => null,
'merchantVoid' => null,
'shopperApproved' => null,
'shopperCancelled' => null,
'shopperCaptureApproved' => null,
'shopperCaptureRefused' => null,
'shopperRefundApproved' => null,
'shopperRefundRefused' => null,
'shopperRefused' => null,
'shopperVoid' => null
],
'signature' => [
'askSignatureOnScreen' => null,
'deviceName' => '',
'deviceSlogan' => '',
'skipSignature' => null
],
'standalone' => [
'currencyCode' => '',
'enableStandalone' => null
],
'surcharge' => [
'askConfirmation' => null,
'configurations' => [
[
'brand' => '',
'currencies' => [
[
'amount' => 0,
'currencyCode' => '',
'percentage' => [
]
]
],
'sources' => [
]
]
]
],
'timeouts' => [
'fromActiveToSleep' => 0
],
'wifiProfiles' => [
'profiles' => [
[
'authType' => '',
'autoWifi' => null,
'bssType' => '',
'channel' => 0,
'defaultProfile' => null,
'eap' => '',
'eapCaCert' => [
'data' => '',
'name' => ''
],
'eapClientCert' => [
],
'eapClientKey' => [
],
'eapClientPwd' => '',
'eapIdentity' => '',
'eapIntermediateCert' => [
],
'eapPwd' => '',
'hiddenSsid' => null,
'name' => '',
'psk' => '',
'ssid' => '',
'wsec' => ''
]
],
'settings' => [
'band' => '',
'roaming' => null,
'timeout' => 0
]
]
]));
$request->setRequestUrl('{{baseUrl}}/terminals/:terminalId/terminalSettings');
$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}}/terminals/:terminalId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals/:terminalId/terminalSettings' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\n }\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/terminals/:terminalId/terminalSettings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals/:terminalId/terminalSettings"
payload = {
"cardholderReceipt": { "headerForAuthorizedReceipt": "" },
"connectivity": { "simcardStatus": "" },
"gratuities": [
{
"allowCustomAmount": False,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": False
}
],
"hardware": { "displayMaximumBackLight": 0 },
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": False,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [{}]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [{}],
"eventPublicUrls": [{}]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": False,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": False
},
"payment": { "hideMinorUnitsInCurrencies": [] },
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": False,
"merchantCancelled": False,
"merchantCaptureApproved": False,
"merchantCaptureRefused": False,
"merchantRefundApproved": False,
"merchantRefundRefused": False,
"merchantRefused": False,
"merchantVoid": False,
"shopperApproved": False,
"shopperCancelled": False,
"shopperCaptureApproved": False,
"shopperCaptureRefused": False,
"shopperRefundApproved": False,
"shopperRefundRefused": False,
"shopperRefused": False,
"shopperVoid": False
},
"signature": {
"askSignatureOnScreen": False,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": False
},
"standalone": {
"currencyCode": "",
"enableStandalone": False
},
"surcharge": {
"askConfirmation": False,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": { "fromActiveToSleep": 0 },
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": False,
"bssType": "",
"channel": 0,
"defaultProfile": False,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": False,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": False,
"timeout": 0
}
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals/:terminalId/terminalSettings"
payload <- "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/terminals/:terminalId/terminalSettings")
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 \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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/terminals/:terminalId/terminalSettings') do |req|
req.body = "{\n \"cardholderReceipt\": {\n \"headerForAuthorizedReceipt\": \"\"\n },\n \"connectivity\": {\n \"simcardStatus\": \"\"\n },\n \"gratuities\": [\n {\n \"allowCustomAmount\": false,\n \"currency\": \"\",\n \"predefinedTipEntries\": [],\n \"usePredefinedTipEntries\": false\n }\n ],\n \"hardware\": {\n \"displayMaximumBackLight\": 0\n },\n \"nexo\": {\n \"displayUrls\": {\n \"localUrls\": [\n {\n \"encrypted\": false,\n \"password\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n }\n ],\n \"publicUrls\": [\n {}\n ]\n },\n \"encryptionKey\": {\n \"identifier\": \"\",\n \"passphrase\": \"\",\n \"version\": 0\n },\n \"eventUrls\": {\n \"eventLocalUrls\": [\n {}\n ],\n \"eventPublicUrls\": [\n {}\n ]\n },\n \"nexoEventUrls\": []\n },\n \"offlineProcessing\": {\n \"chipFloorLimit\": 0,\n \"offlineSwipeLimits\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\"\n }\n ]\n },\n \"opi\": {\n \"enablePayAtTable\": false,\n \"payAtTableStoreNumber\": \"\",\n \"payAtTableURL\": \"\"\n },\n \"passcodes\": {\n \"adminMenuPin\": \"\",\n \"refundPin\": \"\",\n \"screenLockPin\": \"\",\n \"txMenuPin\": \"\"\n },\n \"payAtTable\": {\n \"authenticationMethod\": \"\",\n \"enablePayAtTable\": false\n },\n \"payment\": {\n \"hideMinorUnitsInCurrencies\": []\n },\n \"receiptOptions\": {\n \"logo\": \"\",\n \"qrCodeData\": \"\"\n },\n \"receiptPrinting\": {\n \"merchantApproved\": false,\n \"merchantCancelled\": false,\n \"merchantCaptureApproved\": false,\n \"merchantCaptureRefused\": false,\n \"merchantRefundApproved\": false,\n \"merchantRefundRefused\": false,\n \"merchantRefused\": false,\n \"merchantVoid\": false,\n \"shopperApproved\": false,\n \"shopperCancelled\": false,\n \"shopperCaptureApproved\": false,\n \"shopperCaptureRefused\": false,\n \"shopperRefundApproved\": false,\n \"shopperRefundRefused\": false,\n \"shopperRefused\": false,\n \"shopperVoid\": false\n },\n \"signature\": {\n \"askSignatureOnScreen\": false,\n \"deviceName\": \"\",\n \"deviceSlogan\": \"\",\n \"skipSignature\": false\n },\n \"standalone\": {\n \"currencyCode\": \"\",\n \"enableStandalone\": false\n },\n \"surcharge\": {\n \"askConfirmation\": false,\n \"configurations\": [\n {\n \"brand\": \"\",\n \"currencies\": [\n {\n \"amount\": 0,\n \"currencyCode\": \"\",\n \"percentage\": {}\n }\n ],\n \"sources\": []\n }\n ]\n },\n \"timeouts\": {\n \"fromActiveToSleep\": 0\n },\n \"wifiProfiles\": {\n \"profiles\": [\n {\n \"authType\": \"\",\n \"autoWifi\": false,\n \"bssType\": \"\",\n \"channel\": 0,\n \"defaultProfile\": false,\n \"eap\": \"\",\n \"eapCaCert\": {\n \"data\": \"\",\n \"name\": \"\"\n },\n \"eapClientCert\": {},\n \"eapClientKey\": {},\n \"eapClientPwd\": \"\",\n \"eapIdentity\": \"\",\n \"eapIntermediateCert\": {},\n \"eapPwd\": \"\",\n \"hiddenSsid\": false,\n \"name\": \"\",\n \"psk\": \"\",\n \"ssid\": \"\",\n \"wsec\": \"\"\n }\n ],\n \"settings\": {\n \"band\": \"\",\n \"roaming\": false,\n \"timeout\": 0\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}}/terminals/:terminalId/terminalSettings";
let payload = json!({
"cardholderReceipt": json!({"headerForAuthorizedReceipt": ""}),
"connectivity": json!({"simcardStatus": ""}),
"gratuities": (
json!({
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": (),
"usePredefinedTipEntries": false
})
),
"hardware": json!({"displayMaximumBackLight": 0}),
"nexo": json!({
"displayUrls": json!({
"localUrls": (
json!({
"encrypted": false,
"password": "",
"url": "",
"username": ""
})
),
"publicUrls": (json!({}))
}),
"encryptionKey": json!({
"identifier": "",
"passphrase": "",
"version": 0
}),
"eventUrls": json!({
"eventLocalUrls": (json!({})),
"eventPublicUrls": (json!({}))
}),
"nexoEventUrls": ()
}),
"offlineProcessing": json!({
"chipFloorLimit": 0,
"offlineSwipeLimits": (
json!({
"amount": 0,
"currencyCode": ""
})
)
}),
"opi": json!({
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
}),
"passcodes": json!({
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
}),
"payAtTable": json!({
"authenticationMethod": "",
"enablePayAtTable": false
}),
"payment": json!({"hideMinorUnitsInCurrencies": ()}),
"receiptOptions": json!({
"logo": "",
"qrCodeData": ""
}),
"receiptPrinting": json!({
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
}),
"signature": json!({
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
}),
"standalone": json!({
"currencyCode": "",
"enableStandalone": false
}),
"surcharge": json!({
"askConfirmation": false,
"configurations": (
json!({
"brand": "",
"currencies": (
json!({
"amount": 0,
"currencyCode": "",
"percentage": json!({})
})
),
"sources": ()
})
)
}),
"timeouts": json!({"fromActiveToSleep": 0}),
"wifiProfiles": json!({
"profiles": (
json!({
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": json!({
"data": "",
"name": ""
}),
"eapClientCert": json!({}),
"eapClientKey": json!({}),
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": json!({}),
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
})
),
"settings": json!({
"band": "",
"roaming": false,
"timeout": 0
})
})
});
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}}/terminals/:terminalId/terminalSettings \
--header 'content-type: application/json' \
--data '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}'
echo '{
"cardholderReceipt": {
"headerForAuthorizedReceipt": ""
},
"connectivity": {
"simcardStatus": ""
},
"gratuities": [
{
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
}
],
"hardware": {
"displayMaximumBackLight": 0
},
"nexo": {
"displayUrls": {
"localUrls": [
{
"encrypted": false,
"password": "",
"url": "",
"username": ""
}
],
"publicUrls": [
{}
]
},
"encryptionKey": {
"identifier": "",
"passphrase": "",
"version": 0
},
"eventUrls": {
"eventLocalUrls": [
{}
],
"eventPublicUrls": [
{}
]
},
"nexoEventUrls": []
},
"offlineProcessing": {
"chipFloorLimit": 0,
"offlineSwipeLimits": [
{
"amount": 0,
"currencyCode": ""
}
]
},
"opi": {
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
},
"passcodes": {
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
},
"payAtTable": {
"authenticationMethod": "",
"enablePayAtTable": false
},
"payment": {
"hideMinorUnitsInCurrencies": []
},
"receiptOptions": {
"logo": "",
"qrCodeData": ""
},
"receiptPrinting": {
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
},
"signature": {
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
},
"standalone": {
"currencyCode": "",
"enableStandalone": false
},
"surcharge": {
"askConfirmation": false,
"configurations": [
{
"brand": "",
"currencies": [
{
"amount": 0,
"currencyCode": "",
"percentage": {}
}
],
"sources": []
}
]
},
"timeouts": {
"fromActiveToSleep": 0
},
"wifiProfiles": {
"profiles": [
{
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": {
"data": "",
"name": ""
},
"eapClientCert": {},
"eapClientKey": {},
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": {},
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
}
],
"settings": {
"band": "",
"roaming": false,
"timeout": 0
}
}
}' | \
http PATCH {{baseUrl}}/terminals/:terminalId/terminalSettings \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "cardholderReceipt": {\n "headerForAuthorizedReceipt": ""\n },\n "connectivity": {\n "simcardStatus": ""\n },\n "gratuities": [\n {\n "allowCustomAmount": false,\n "currency": "",\n "predefinedTipEntries": [],\n "usePredefinedTipEntries": false\n }\n ],\n "hardware": {\n "displayMaximumBackLight": 0\n },\n "nexo": {\n "displayUrls": {\n "localUrls": [\n {\n "encrypted": false,\n "password": "",\n "url": "",\n "username": ""\n }\n ],\n "publicUrls": [\n {}\n ]\n },\n "encryptionKey": {\n "identifier": "",\n "passphrase": "",\n "version": 0\n },\n "eventUrls": {\n "eventLocalUrls": [\n {}\n ],\n "eventPublicUrls": [\n {}\n ]\n },\n "nexoEventUrls": []\n },\n "offlineProcessing": {\n "chipFloorLimit": 0,\n "offlineSwipeLimits": [\n {\n "amount": 0,\n "currencyCode": ""\n }\n ]\n },\n "opi": {\n "enablePayAtTable": false,\n "payAtTableStoreNumber": "",\n "payAtTableURL": ""\n },\n "passcodes": {\n "adminMenuPin": "",\n "refundPin": "",\n "screenLockPin": "",\n "txMenuPin": ""\n },\n "payAtTable": {\n "authenticationMethod": "",\n "enablePayAtTable": false\n },\n "payment": {\n "hideMinorUnitsInCurrencies": []\n },\n "receiptOptions": {\n "logo": "",\n "qrCodeData": ""\n },\n "receiptPrinting": {\n "merchantApproved": false,\n "merchantCancelled": false,\n "merchantCaptureApproved": false,\n "merchantCaptureRefused": false,\n "merchantRefundApproved": false,\n "merchantRefundRefused": false,\n "merchantRefused": false,\n "merchantVoid": false,\n "shopperApproved": false,\n "shopperCancelled": false,\n "shopperCaptureApproved": false,\n "shopperCaptureRefused": false,\n "shopperRefundApproved": false,\n "shopperRefundRefused": false,\n "shopperRefused": false,\n "shopperVoid": false\n },\n "signature": {\n "askSignatureOnScreen": false,\n "deviceName": "",\n "deviceSlogan": "",\n "skipSignature": false\n },\n "standalone": {\n "currencyCode": "",\n "enableStandalone": false\n },\n "surcharge": {\n "askConfirmation": false,\n "configurations": [\n {\n "brand": "",\n "currencies": [\n {\n "amount": 0,\n "currencyCode": "",\n "percentage": {}\n }\n ],\n "sources": []\n }\n ]\n },\n "timeouts": {\n "fromActiveToSleep": 0\n },\n "wifiProfiles": {\n "profiles": [\n {\n "authType": "",\n "autoWifi": false,\n "bssType": "",\n "channel": 0,\n "defaultProfile": false,\n "eap": "",\n "eapCaCert": {\n "data": "",\n "name": ""\n },\n "eapClientCert": {},\n "eapClientKey": {},\n "eapClientPwd": "",\n "eapIdentity": "",\n "eapIntermediateCert": {},\n "eapPwd": "",\n "hiddenSsid": false,\n "name": "",\n "psk": "",\n "ssid": "",\n "wsec": ""\n }\n ],\n "settings": {\n "band": "",\n "roaming": false,\n "timeout": 0\n }\n }\n}' \
--output-document \
- {{baseUrl}}/terminals/:terminalId/terminalSettings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardholderReceipt": ["headerForAuthorizedReceipt": ""],
"connectivity": ["simcardStatus": ""],
"gratuities": [
[
"allowCustomAmount": false,
"currency": "",
"predefinedTipEntries": [],
"usePredefinedTipEntries": false
]
],
"hardware": ["displayMaximumBackLight": 0],
"nexo": [
"displayUrls": [
"localUrls": [
[
"encrypted": false,
"password": "",
"url": "",
"username": ""
]
],
"publicUrls": [[]]
],
"encryptionKey": [
"identifier": "",
"passphrase": "",
"version": 0
],
"eventUrls": [
"eventLocalUrls": [[]],
"eventPublicUrls": [[]]
],
"nexoEventUrls": []
],
"offlineProcessing": [
"chipFloorLimit": 0,
"offlineSwipeLimits": [
[
"amount": 0,
"currencyCode": ""
]
]
],
"opi": [
"enablePayAtTable": false,
"payAtTableStoreNumber": "",
"payAtTableURL": ""
],
"passcodes": [
"adminMenuPin": "",
"refundPin": "",
"screenLockPin": "",
"txMenuPin": ""
],
"payAtTable": [
"authenticationMethod": "",
"enablePayAtTable": false
],
"payment": ["hideMinorUnitsInCurrencies": []],
"receiptOptions": [
"logo": "",
"qrCodeData": ""
],
"receiptPrinting": [
"merchantApproved": false,
"merchantCancelled": false,
"merchantCaptureApproved": false,
"merchantCaptureRefused": false,
"merchantRefundApproved": false,
"merchantRefundRefused": false,
"merchantRefused": false,
"merchantVoid": false,
"shopperApproved": false,
"shopperCancelled": false,
"shopperCaptureApproved": false,
"shopperCaptureRefused": false,
"shopperRefundApproved": false,
"shopperRefundRefused": false,
"shopperRefused": false,
"shopperVoid": false
],
"signature": [
"askSignatureOnScreen": false,
"deviceName": "",
"deviceSlogan": "",
"skipSignature": false
],
"standalone": [
"currencyCode": "",
"enableStandalone": false
],
"surcharge": [
"askConfirmation": false,
"configurations": [
[
"brand": "",
"currencies": [
[
"amount": 0,
"currencyCode": "",
"percentage": []
]
],
"sources": []
]
]
],
"timeouts": ["fromActiveToSleep": 0],
"wifiProfiles": [
"profiles": [
[
"authType": "",
"autoWifi": false,
"bssType": "",
"channel": 0,
"defaultProfile": false,
"eap": "",
"eapCaCert": [
"data": "",
"name": ""
],
"eapClientCert": [],
"eapClientKey": [],
"eapClientPwd": "",
"eapIdentity": "",
"eapIntermediateCert": [],
"eapPwd": "",
"hiddenSsid": false,
"name": "",
"psk": "",
"ssid": "",
"wsec": ""
]
],
"settings": [
"band": "",
"roaming": false,
"timeout": 0
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals/:terminalId/terminalSettings")! 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
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"connectivity": {
"simcardStatus": "INVENTORY"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "peap",
"eapCaCert": {
"data": "MD1rKS05M2JqRVFNQ...RTtLH1tLWo=",
"name": "eap-peap-ca.pem"
},
"eapIdentity": "admin",
"eapIntermediateCert": {
"data": "PD3tUS1CRDdJTiGDR...EFoLS0tLQg=",
"name": "eap-peap-client.pem"
},
"eapPwd": "EAP_PEAP_PASSWORD",
"hiddenSsid": false,
"name": "Profile-eap-peap-1",
"ssid": "your-network",
"wsec": "ccmp"
},
{
"authType": "wpa-psk",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": false,
"hiddenSsid": false,
"name": "Profile-guest-wifi",
"psk": "WIFI_PASSWORD",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"cardholderReceipt": {
"headerForAuthorizedReceipt": "header1,header2,filler"
},
"connectivity": {
"simcardStatus": "INVENTORY"
},
"gratuities": [
{
"allowCustomAmount": true,
"currency": "EUR",
"predefinedTipEntries": [
"100",
"1%",
"5%"
],
"usePredefinedTipEntries": true
}
],
"hardware": {
"displayMaximumBackLight": 75
},
"nexo": {
"nexoEventUrls": [
"https://your-event-notifications-endpoint.com"
]
},
"offlineProcessing": {
"chipFloorLimit": 0
},
"opi": {
"enablePayAtTable": true,
"payAtTableStoreNumber": "1",
"payAtTableURL": "https:/your-pay-at-table-endpoint.com"
},
"receiptOptions": {
"qrCodeData": "http://www.example.com/order/${pspreference}/${merchantreference}"
},
"receiptPrinting": {
"shopperApproved": true,
"shopperCancelled": true,
"shopperRefundApproved": true,
"shopperRefundRefused": true,
"shopperRefused": true,
"shopperVoid": true
},
"signature": {
"askSignatureOnScreen": true,
"deviceName": "Amsterdam-236203386",
"skipSignature": false
},
"timeouts": {
"fromActiveToSleep": 30
},
"wifiProfiles": {
"profiles": [
{
"authType": "wpa-eap",
"autoWifi": false,
"bssType": "infra",
"channel": 0,
"defaultProfile": true,
"eap": "tls",
"eapCaCert": {
"data": "LS0tLS05M2JqRVFNQ...EUtLS0tLQo=",
"name": "eap-tls-ca.pem"
},
"eapClientCert": {
"data": "LS0tLS1CRUdJTiBDR...EUtLS0tLQo=",
"name": "eap-tls-client.pem"
},
"eapClientKey": {
"data": "AAAB3NzaC1...Rtah3KLFwPU=",
"name": "rsa-private.key"
},
"eapClientPwd": "",
"eapIdentity": "admin",
"hiddenSsid": false,
"name": "Profile-eap-tls-1",
"ssid": "your-network",
"wsec": "ccmp"
}
],
"settings": {
"band": "2.4GHz",
"roaming": true,
"timeout": 5
}
}
}
PATCH
Update the logo
{{baseUrl}}/terminals/:terminalId/terminalLogos
QUERY PARAMS
terminalId
BODY json
{
"data": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals/:terminalId/terminalLogos");
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 \"data\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/terminals/:terminalId/terminalLogos" {:content-type :json
:form-params {:data ""}})
require "http/client"
url = "{{baseUrl}}/terminals/:terminalId/terminalLogos"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"data\": \"\"\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}}/terminals/:terminalId/terminalLogos"),
Content = new StringContent("{\n \"data\": \"\"\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}}/terminals/:terminalId/terminalLogos");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"data\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals/:terminalId/terminalLogos"
payload := strings.NewReader("{\n \"data\": \"\"\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/terminals/:terminalId/terminalLogos HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"data": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/terminals/:terminalId/terminalLogos")
.setHeader("content-type", "application/json")
.setBody("{\n \"data\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals/:terminalId/terminalLogos"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"data\": \"\"\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 \"data\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalLogos")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/terminals/:terminalId/terminalLogos")
.header("content-type", "application/json")
.body("{\n \"data\": \"\"\n}")
.asString();
const data = JSON.stringify({
data: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/terminals/:terminalId/terminalLogos');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/terminals/:terminalId/terminalLogos',
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals/:terminalId/terminalLogos';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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}}/terminals/:terminalId/terminalLogos',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "data": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"data\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/terminals/:terminalId/terminalLogos")
.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/terminals/:terminalId/terminalLogos',
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({data: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/terminals/:terminalId/terminalLogos',
headers: {'content-type': 'application/json'},
body: {data: ''},
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}}/terminals/:terminalId/terminalLogos');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
data: ''
});
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}}/terminals/:terminalId/terminalLogos',
headers: {'content-type': 'application/json'},
data: {data: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals/:terminalId/terminalLogos';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"data":""}'
};
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 = @{ @"data": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/terminals/:terminalId/terminalLogos"]
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}}/terminals/:terminalId/terminalLogos" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"data\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals/:terminalId/terminalLogos",
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([
'data' => ''
]),
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}}/terminals/:terminalId/terminalLogos', [
'body' => '{
"data": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/terminals/:terminalId/terminalLogos');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'data' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'data' => ''
]));
$request->setRequestUrl('{{baseUrl}}/terminals/:terminalId/terminalLogos');
$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}}/terminals/:terminalId/terminalLogos' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals/:terminalId/terminalLogos' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"data": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"data\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/terminals/:terminalId/terminalLogos", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals/:terminalId/terminalLogos"
payload = { "data": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals/:terminalId/terminalLogos"
payload <- "{\n \"data\": \"\"\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}}/terminals/:terminalId/terminalLogos")
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 \"data\": \"\"\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/terminals/:terminalId/terminalLogos') do |req|
req.body = "{\n \"data\": \"\"\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}}/terminals/:terminalId/terminalLogos";
let payload = json!({"data": ""});
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}}/terminals/:terminalId/terminalLogos \
--header 'content-type: application/json' \
--data '{
"data": ""
}'
echo '{
"data": ""
}' | \
http PATCH {{baseUrl}}/terminals/:terminalId/terminalLogos \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "data": ""\n}' \
--output-document \
- {{baseUrl}}/terminals/:terminalId/terminalLogos
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["data": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals/:terminalId/terminalLogos")! 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
{
"data": "LOGO_INHERITED_FROM_HIGHER_LEVEL_BASE-64_ENCODED_STRING"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "BASE-64_ENCODED_STRING_FROM_THE_REQUEST"
}
GET
Get a list of terminals
{{baseUrl}}/terminals
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/terminals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/terminals")
require "http/client"
url = "{{baseUrl}}/terminals"
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}}/terminals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/terminals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/terminals"
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/terminals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/terminals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/terminals"))
.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}}/terminals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/terminals")
.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}}/terminals');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/terminals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/terminals';
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}}/terminals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/terminals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/terminals',
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}}/terminals'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/terminals');
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}}/terminals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/terminals';
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}}/terminals"]
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}}/terminals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/terminals",
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}}/terminals');
echo $response->getBody();
setUrl('{{baseUrl}}/terminals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/terminals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/terminals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/terminals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/terminals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/terminals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/terminals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/terminals")
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/terminals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/terminals";
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}}/terminals
http GET {{baseUrl}}/terminals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/terminals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/terminals")! 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
{
"data": [
{
"assigned": true,
"city": "Amsterdam",
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"countryCode": "NL",
"deviceModel": "S1F2",
"firmwareVersion": "Castles_Android 1.79.4",
"iccid": "6006491286999921374",
"id": "S1F2-000150183300032",
"lastActivityDateTime": "2022-08-09T12:44:11+02:00",
"serialNumber": "000150183300032",
"status": "OnlineToday",
"storeStatus": "Active",
"wifiIp": "198.51.100.1",
"wifiMac": "C4:6E:00:16:A1:01"
},
{
"assigned": true,
"bluetoothMac": "a4:60:11:83:0e:00",
"city": "Amsterdam",
"companyAccount": "YOUR_COMPANY_ACCOUNT",
"countryCode": "NL",
"deviceModel": "V400m",
"ethernetMac": "64:5a:ed:f5:68:55",
"firmwareVersion": "Verifone_VOS 1.79.4",
"iccid": "6064364710330000000",
"id": "V400m-080020970",
"lastActivityDateTime": "2022-08-10T14:09:14+02:00",
"serialNumber": "080-020-970",
"status": "onlineLast1Day",
"storeStatus": "Active",
"wifiIp": "198.51.100.1",
"wifiMac": "d0:17:69:7c:02:4d",
"wifiSsid": "GUEST"
}
]
}
POST
Create a new user
{{baseUrl}}/companies/:companyId/users
QUERY PARAMS
companyId
BODY json
{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/users");
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 \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/users" {:content-type :json
:form-params {:accountGroups []
:associatedMerchantAccounts []
:authnApps []
:email ""
:name {:firstName ""
:lastName ""}
:roles []
:timeZoneCode ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/users"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/users"),
Content = new StringContent("{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/users");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/users"
payload := strings.NewReader("{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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/companies/:companyId/users HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 207
{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/users")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/users"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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 \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/users")
.header("content-type", "application/json")
.body("{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/users');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/users',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"associatedMerchantAccounts":[],"authnApps":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":"","username":""}'
};
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}}/companies/:companyId/users',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountGroups": [],\n "associatedMerchantAccounts": [],\n "authnApps": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users")
.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/companies/:companyId/users',
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({
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/users',
headers: {'content-type': 'application/json'},
body: {
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
},
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}}/companies/:companyId/users');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: '',
username: ''
});
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}}/companies/:companyId/users',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
associatedMerchantAccounts: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"associatedMerchantAccounts":[],"authnApps":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":"","username":""}'
};
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 = @{ @"accountGroups": @[ ],
@"associatedMerchantAccounts": @[ ],
@"authnApps": @[ ],
@"email": @"",
@"name": @{ @"firstName": @"", @"lastName": @"" },
@"roles": @[ ],
@"timeZoneCode": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/users"]
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}}/companies/:companyId/users" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/users",
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([
'accountGroups' => [
],
'associatedMerchantAccounts' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]),
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}}/companies/:companyId/users', [
'body' => '{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/users');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountGroups' => [
],
'associatedMerchantAccounts' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountGroups' => [
],
'associatedMerchantAccounts' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/users');
$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}}/companies/:companyId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/users", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/users"
payload = {
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/users"
payload <- "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/users")
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 \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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/companies/:companyId/users') do |req|
req.body = "{\n \"accountGroups\": [],\n \"associatedMerchantAccounts\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/users";
let payload = json!({
"accountGroups": (),
"associatedMerchantAccounts": (),
"authnApps": (),
"email": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"roles": (),
"timeZoneCode": "",
"username": ""
});
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}}/companies/:companyId/users \
--header 'content-type: application/json' \
--data '{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
echo '{
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}' | \
http POST {{baseUrl}}/companies/:companyId/users \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountGroups": [],\n "associatedMerchantAccounts": [],\n "authnApps": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/users
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountGroups": [],
"associatedMerchantAccounts": [],
"authnApps": [],
"email": "",
"name": [
"firstName": "",
"lastName": ""
],
"roles": [],
"timeZoneCode": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/users")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/users/S2-5C334C6770"
}
},
"active": true,
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT"
],
"email": "john.smith@example.com",
"id": "S2-5C334C6770",
"name": {
"firstName": "John",
"gender": "UNKNOWN",
"lastName": "Smith"
},
"roles": [
"Merchant standard role",
"Merchant admin"
],
"timeZoneCode": "Europe/Amsterdam",
"username": "johnsmith"
}
GET
Get a list of users
{{baseUrl}}/companies/:companyId/users
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/users");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/users")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/users"
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}}/companies/:companyId/users"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/users");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/users"
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/companies/:companyId/users HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/users")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/users"))
.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}}/companies/:companyId/users")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/users")
.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}}/companies/:companyId/users');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/companies/:companyId/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/users';
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}}/companies/:companyId/users',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/users',
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}}/companies/:companyId/users'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/users');
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}}/companies/:companyId/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/users';
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}}/companies/:companyId/users"]
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}}/companies/:companyId/users" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/users",
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}}/companies/:companyId/users');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/users');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/users');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/users' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/users' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/users")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/users"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/users"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/users")
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/companies/:companyId/users') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/users";
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}}/companies/:companyId/users
http GET {{baseUrl}}/companies/:companyId/users
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/users
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/users")! 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()
GET
Get user details
{{baseUrl}}/companies/:companyId/users/:userId
QUERY PARAMS
companyId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/users/:userId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/users/:userId"
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}}/companies/:companyId/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/users/:userId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/users/:userId"
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/companies/:companyId/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/users/:userId"))
.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}}/companies/:companyId/users/:userId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/users/:userId")
.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}}/companies/:companyId/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/users/:userId';
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}}/companies/:companyId/users/:userId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users/:userId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/users/:userId',
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}}/companies/:companyId/users/:userId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/users/:userId');
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}}/companies/:companyId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/users/:userId';
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}}/companies/:companyId/users/:userId"]
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}}/companies/:companyId/users/:userId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/users/:userId",
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}}/companies/:companyId/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/users/:userId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/users/:userId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/users/:userId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/users/:userId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/users/:userId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/users/:userId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/users/:userId")
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/companies/:companyId/users/:userId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/users/:userId";
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}}/companies/:companyId/users/:userId
http GET {{baseUrl}}/companies/:companyId/users/:userId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/users/:userId")! 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()
PATCH
Update user details
{{baseUrl}}/companies/:companyId/users/:userId
QUERY PARAMS
companyId
userId
BODY json
{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/users/:userId");
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 \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/users/:userId" {:content-type :json
:form-params {:accountGroups []
:active false
:associatedMerchantAccounts []
:authnAppsToAdd []
:authnAppsToRemove []
:email ""
:name {:firstName ""
:lastName ""}
:roles []
:timeZoneCode ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/users/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/companies/:companyId/users/:userId"),
Content = new StringContent("{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/companies/:companyId/users/:userId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/users/:userId"
payload := strings.NewReader("{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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/companies/:companyId/users/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 240
{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/users/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/users/:userId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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 \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users/:userId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/users/:userId")
.header("content-type", "application/json")
.body("{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/users/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/users/:userId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"active":false,"associatedMerchantAccounts":[],"authnAppsToAdd":[],"authnAppsToRemove":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":""}'
};
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}}/companies/:companyId/users/:userId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountGroups": [],\n "active": false,\n "associatedMerchantAccounts": [],\n "authnAppsToAdd": [],\n "authnAppsToRemove": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/users/:userId")
.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/companies/:companyId/users/:userId',
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({
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/users/:userId',
headers: {'content-type': 'application/json'},
body: {
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
},
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}}/companies/:companyId/users/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: ''
});
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}}/companies/:companyId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
active: false,
associatedMerchantAccounts: [],
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/users/:userId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"active":false,"associatedMerchantAccounts":[],"authnAppsToAdd":[],"authnAppsToRemove":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":""}'
};
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 = @{ @"accountGroups": @[ ],
@"active": @NO,
@"associatedMerchantAccounts": @[ ],
@"authnAppsToAdd": @[ ],
@"authnAppsToRemove": @[ ],
@"email": @"",
@"name": @{ @"firstName": @"", @"lastName": @"" },
@"roles": @[ ],
@"timeZoneCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/users/:userId"]
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}}/companies/:companyId/users/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/users/:userId",
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([
'accountGroups' => [
],
'active' => null,
'associatedMerchantAccounts' => [
],
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]),
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}}/companies/:companyId/users/:userId', [
'body' => '{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/users/:userId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountGroups' => [
],
'active' => null,
'associatedMerchantAccounts' => [
],
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountGroups' => [
],
'active' => null,
'associatedMerchantAccounts' => [
],
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/users/:userId');
$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}}/companies/:companyId/users/:userId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/users/:userId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/users/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/users/:userId"
payload = {
"accountGroups": [],
"active": False,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/users/:userId"
payload <- "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/companies/:companyId/users/:userId")
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 \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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/companies/:companyId/users/:userId') do |req|
req.body = "{\n \"accountGroups\": [],\n \"active\": false,\n \"associatedMerchantAccounts\": [],\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/companies/:companyId/users/:userId";
let payload = json!({
"accountGroups": (),
"active": false,
"associatedMerchantAccounts": (),
"authnAppsToAdd": (),
"authnAppsToRemove": (),
"email": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"roles": (),
"timeZoneCode": ""
});
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}}/companies/:companyId/users/:userId \
--header 'content-type: application/json' \
--data '{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
echo '{
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}' | \
http PATCH {{baseUrl}}/companies/:companyId/users/:userId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountGroups": [],\n "active": false,\n "associatedMerchantAccounts": [],\n "authnAppsToAdd": [],\n "authnAppsToRemove": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/users/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountGroups": [],
"active": false,
"associatedMerchantAccounts": [],
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": [
"firstName": "",
"lastName": ""
],
"roles": [],
"timeZoneCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/users/:userId")! 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()
POST
Create a new user (POST)
{{baseUrl}}/merchants/:merchantId/users
QUERY PARAMS
merchantId
BODY json
{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/users");
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 \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/users" {:content-type :json
:form-params {:accountGroups []
:authnApps []
:email ""
:name {:firstName ""
:lastName ""}
:roles []
:timeZoneCode ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/users"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/users"),
Content = new StringContent("{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/users");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/users"
payload := strings.NewReader("{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/users HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 171
{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/users")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/users"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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 \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/users")
.header("content-type", "application/json")
.body("{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountGroups: [],
authnApps: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/users');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/users',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"authnApps":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":"","username":""}'
};
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}}/merchants/:merchantId/users',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountGroups": [],\n "authnApps": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users")
.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/merchants/:merchantId/users',
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({
accountGroups: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/users',
headers: {'content-type': 'application/json'},
body: {
accountGroups: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
},
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}}/merchants/:merchantId/users');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountGroups: [],
authnApps: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: '',
username: ''
});
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}}/merchants/:merchantId/users',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
authnApps: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"authnApps":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":"","username":""}'
};
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 = @{ @"accountGroups": @[ ],
@"authnApps": @[ ],
@"email": @"",
@"name": @{ @"firstName": @"", @"lastName": @"" },
@"roles": @[ ],
@"timeZoneCode": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/users"]
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}}/merchants/:merchantId/users" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/users",
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([
'accountGroups' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]),
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}}/merchants/:merchantId/users', [
'body' => '{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/users');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountGroups' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountGroups' => [
],
'authnApps' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/users');
$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}}/merchants/:merchantId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/users", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/users"
payload = {
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/users"
payload <- "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/users")
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 \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/users') do |req|
req.body = "{\n \"accountGroups\": [],\n \"authnApps\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/users";
let payload = json!({
"accountGroups": (),
"authnApps": (),
"email": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"roles": (),
"timeZoneCode": "",
"username": ""
});
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}}/merchants/:merchantId/users \
--header 'content-type: application/json' \
--data '{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}'
echo '{
"accountGroups": [],
"authnApps": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": "",
"username": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/users \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountGroups": [],\n "authnApps": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/users
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountGroups": [],
"authnApps": [],
"email": "",
"name": [
"firstName": "",
"lastName": ""
],
"roles": [],
"timeZoneCode": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/users")! 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
{
"_links": {
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/users/S2-3B3C3C3B22"
}
},
"active": true,
"associatedMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT"
],
"email": "john.smith@example.com",
"id": "S2-3B3C3C3B22",
"name": {
"firstName": "John",
"gender": "UNKNOWN",
"lastName": "Smith"
},
"roles": [
"Merchant standard role"
],
"timeZoneCode": "Europe/Amsterdam",
"username": "johnsmith"
}
GET
Get a list of users (GET)
{{baseUrl}}/merchants/:merchantId/users
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/users");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/users")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/users"
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}}/merchants/:merchantId/users"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/users");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/users"
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/merchants/:merchantId/users HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/users")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/users"))
.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}}/merchants/:merchantId/users")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/users")
.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}}/merchants/:merchantId/users');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/merchants/:merchantId/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/users';
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}}/merchants/:merchantId/users',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/users',
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}}/merchants/:merchantId/users'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/users');
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}}/merchants/:merchantId/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/users';
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}}/merchants/:merchantId/users"]
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}}/merchants/:merchantId/users" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/users",
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}}/merchants/:merchantId/users');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/users');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/users');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/users' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/users' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/users")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/users"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/users"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/users")
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/merchants/:merchantId/users') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/users";
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}}/merchants/:merchantId/users
http GET {{baseUrl}}/merchants/:merchantId/users
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/users
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/users")! 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()
GET
Get user details (GET)
{{baseUrl}}/merchants/:merchantId/users/:userId
QUERY PARAMS
merchantId
userId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/users/:userId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/users/:userId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/users/:userId"
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}}/merchants/:merchantId/users/:userId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/users/:userId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/users/:userId"
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/merchants/:merchantId/users/:userId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/users/:userId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/users/:userId"))
.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}}/merchants/:merchantId/users/:userId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/users/:userId")
.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}}/merchants/:merchantId/users/:userId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/users/:userId';
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}}/merchants/:merchantId/users/:userId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users/:userId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/users/:userId',
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}}/merchants/:merchantId/users/:userId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/users/:userId');
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}}/merchants/:merchantId/users/:userId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/users/:userId';
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}}/merchants/:merchantId/users/:userId"]
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}}/merchants/:merchantId/users/:userId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/users/:userId",
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}}/merchants/:merchantId/users/:userId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/users/:userId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/users/:userId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/users/:userId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/users/:userId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/users/:userId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/users/:userId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/users/:userId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/users/:userId")
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/merchants/:merchantId/users/:userId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/users/:userId";
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}}/merchants/:merchantId/users/:userId
http GET {{baseUrl}}/merchants/:merchantId/users/:userId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/users/:userId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/users/:userId")! 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()
PATCH
Update a user
{{baseUrl}}/merchants/:merchantId/users/:userId
QUERY PARAMS
merchantId
userId
BODY json
{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/users/:userId");
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 \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/users/:userId" {:content-type :json
:form-params {:accountGroups []
:active false
:authnAppsToAdd []
:authnAppsToRemove []
:email ""
:name {:firstName ""
:lastName ""}
:roles []
:timeZoneCode ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/users/:userId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/merchants/:merchantId/users/:userId"),
Content = new StringContent("{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/merchants/:merchantId/users/:userId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/users/:userId"
payload := strings.NewReader("{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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/merchants/:merchantId/users/:userId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 204
{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/users/:userId")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/users/:userId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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 \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users/:userId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/users/:userId")
.header("content-type", "application/json")
.body("{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
.asString();
const data = JSON.stringify({
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/users/:userId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/users/:userId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"active":false,"authnAppsToAdd":[],"authnAppsToRemove":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":""}'
};
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}}/merchants/:merchantId/users/:userId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountGroups": [],\n "active": false,\n "authnAppsToAdd": [],\n "authnAppsToRemove": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/users/:userId")
.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/merchants/:merchantId/users/:userId',
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({
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/users/:userId',
headers: {'content-type': 'application/json'},
body: {
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
},
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}}/merchants/:merchantId/users/:userId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {
firstName: '',
lastName: ''
},
roles: [],
timeZoneCode: ''
});
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}}/merchants/:merchantId/users/:userId',
headers: {'content-type': 'application/json'},
data: {
accountGroups: [],
active: false,
authnAppsToAdd: [],
authnAppsToRemove: [],
email: '',
name: {firstName: '', lastName: ''},
roles: [],
timeZoneCode: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/users/:userId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"accountGroups":[],"active":false,"authnAppsToAdd":[],"authnAppsToRemove":[],"email":"","name":{"firstName":"","lastName":""},"roles":[],"timeZoneCode":""}'
};
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 = @{ @"accountGroups": @[ ],
@"active": @NO,
@"authnAppsToAdd": @[ ],
@"authnAppsToRemove": @[ ],
@"email": @"",
@"name": @{ @"firstName": @"", @"lastName": @"" },
@"roles": @[ ],
@"timeZoneCode": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/users/:userId"]
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}}/merchants/:merchantId/users/:userId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/users/:userId",
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([
'accountGroups' => [
],
'active' => null,
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]),
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}}/merchants/:merchantId/users/:userId', [
'body' => '{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/users/:userId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountGroups' => [
],
'active' => null,
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountGroups' => [
],
'active' => null,
'authnAppsToAdd' => [
],
'authnAppsToRemove' => [
],
'email' => '',
'name' => [
'firstName' => '',
'lastName' => ''
],
'roles' => [
],
'timeZoneCode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/users/:userId');
$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}}/merchants/:merchantId/users/:userId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/users/:userId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/users/:userId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/users/:userId"
payload = {
"accountGroups": [],
"active": False,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/users/:userId"
payload <- "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/merchants/:merchantId/users/:userId")
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 \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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/merchants/:merchantId/users/:userId') do |req|
req.body = "{\n \"accountGroups\": [],\n \"active\": false,\n \"authnAppsToAdd\": [],\n \"authnAppsToRemove\": [],\n \"email\": \"\",\n \"name\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"roles\": [],\n \"timeZoneCode\": \"\"\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}}/merchants/:merchantId/users/:userId";
let payload = json!({
"accountGroups": (),
"active": false,
"authnAppsToAdd": (),
"authnAppsToRemove": (),
"email": "",
"name": json!({
"firstName": "",
"lastName": ""
}),
"roles": (),
"timeZoneCode": ""
});
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}}/merchants/:merchantId/users/:userId \
--header 'content-type: application/json' \
--data '{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}'
echo '{
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": {
"firstName": "",
"lastName": ""
},
"roles": [],
"timeZoneCode": ""
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/users/:userId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "accountGroups": [],\n "active": false,\n "authnAppsToAdd": [],\n "authnAppsToRemove": [],\n "email": "",\n "name": {\n "firstName": "",\n "lastName": ""\n },\n "roles": [],\n "timeZoneCode": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/users/:userId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountGroups": [],
"active": false,
"authnAppsToAdd": [],
"authnAppsToRemove": [],
"email": "",
"name": [
"firstName": "",
"lastName": ""
],
"roles": [],
"timeZoneCode": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/users/:userId")! 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()
POST
Generate an HMAC key
{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac
QUERY PARAMS
companyId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/companies/:companyId/webhooks/:webhookId/generateHmac HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/webhooks/:webhookId/generateHmac',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac');
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}}/companies/:companyId/webhooks/:webhookId/generateHmac'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/companies/:companyId/webhooks/:webhookId/generateHmac")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/companies/:companyId/webhooks/:webhookId/generateHmac') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac
http POST {{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/generateHmac")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"hmacKey": "7052E6804F0AF40DCC390464C817F4F963516FA42AC8816D518DC5D39F41E902"
}
GET
Get a webhook
{{baseUrl}}/companies/:companyId/webhooks/:webhookId
QUERY PARAMS
companyId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks/:webhookId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
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}}/companies/:companyId/webhooks/:webhookId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/webhooks/:webhookId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
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/companies/:companyId/webhooks/:webhookId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks/:webhookId"))
.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}}/companies/:companyId/webhooks/:webhookId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.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}}/companies/:companyId/webhooks/:webhookId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
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}}/companies/:companyId/webhooks/:webhookId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/webhooks/:webhookId',
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}}/companies/:companyId/webhooks/:webhookId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
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}}/companies/:companyId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
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}}/companies/:companyId/webhooks/:webhookId"]
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}}/companies/:companyId/webhooks/:webhookId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks/:webhookId",
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}}/companies/:companyId/webhooks/:webhookId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/webhooks/:webhookId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
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/companies/:companyId/webhooks/:webhookId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId";
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}}/companies/:companyId/webhooks/:webhookId
http GET {{baseUrl}}/companies/:companyId/webhooks/:webhookId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks/:webhookId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")! 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
{
"_links": {
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateHmac": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/generateHmac"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_COMPANY_ACCOUNT - YOUR_COMPANY_CODE",
"filterMerchantAccountType": "allAccounts",
"hasError": false,
"hasPassword": true,
"id": "S2-4A3B33202A46",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": "adyen"
}
GET
List all webhooks
{{baseUrl}}/companies/:companyId/webhooks
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/companies/:companyId/webhooks")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks"
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}}/companies/:companyId/webhooks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/webhooks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks"
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/companies/:companyId/webhooks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/companies/:companyId/webhooks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks"))
.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}}/companies/:companyId/webhooks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/companies/:companyId/webhooks")
.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}}/companies/:companyId/webhooks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/companies/:companyId/webhooks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks';
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}}/companies/:companyId/webhooks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/webhooks',
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}}/companies/:companyId/webhooks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/companies/:companyId/webhooks');
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}}/companies/:companyId/webhooks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks';
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}}/companies/:companyId/webhooks"]
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}}/companies/:companyId/webhooks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks",
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}}/companies/:companyId/webhooks');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/webhooks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/companies/:companyId/webhooks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/webhooks")
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/companies/:companyId/webhooks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks";
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}}/companies/:companyId/webhooks
http GET {{baseUrl}}/companies/:companyId/webhooks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateHmac": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/generateHmac"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_COMPANY_ACCOUNT - YOUR_COMPANY_CODE",
"filterMerchantAccountType": "allAccounts",
"hasError": false,
"hasPassword": true,
"id": "S2-4A3B33202A46",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": "adyen"
}
],
"itemsTotal": 1,
"pagesTotal": 1
}
DELETE
Remove a webhook
{{baseUrl}}/companies/:companyId/webhooks/:webhookId
QUERY PARAMS
companyId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks/:webhookId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
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}}/companies/:companyId/webhooks/:webhookId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/companies/:companyId/webhooks/:webhookId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
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/companies/:companyId/webhooks/:webhookId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks/:webhookId"))
.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}}/companies/:companyId/webhooks/:webhookId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.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}}/companies/:companyId/webhooks/:webhookId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
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}}/companies/:companyId/webhooks/:webhookId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/companies/:companyId/webhooks/:webhookId',
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}}/companies/:companyId/webhooks/:webhookId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
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}}/companies/:companyId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
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}}/companies/:companyId/webhooks/:webhookId"]
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}}/companies/:companyId/webhooks/:webhookId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks/:webhookId",
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}}/companies/:companyId/webhooks/:webhookId');
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/companies/:companyId/webhooks/:webhookId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
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/companies/:companyId/webhooks/:webhookId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId";
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}}/companies/:companyId/webhooks/:webhookId
http DELETE {{baseUrl}}/companies/:companyId/webhooks/:webhookId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks/:webhookId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")! 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()
POST
Set up a webhook
{{baseUrl}}/companies/:companyId/webhooks
QUERY PARAMS
companyId
BODY json
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks");
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/webhooks" {:content-type :json
:form-params {:acceptsExpiredCertificate false
:acceptsSelfSignedCertificate false
:acceptsUntrustedRootCertificate false
:active false
:additionalSettings {:includeEventCodes []
:properties {}}
:communicationFormat ""
:description ""
:filterMerchantAccountType ""
:filterMerchantAccounts []
:networkType ""
:password ""
:populateSoapActionHeader false
:sslVersion ""
:type ""
:url ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks"),
Content = new StringContent("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks"
payload := strings.NewReader("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/companies/:companyId/webhooks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 483
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/webhooks")
.setHeader("content-type", "application/json")
.setBody("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/webhooks")
.header("content-type", "application/json")
.body("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/webhooks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","filterMerchantAccountType":"","filterMerchantAccounts":[],"networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","type":"","url":"","username":""}'
};
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}}/companies/:companyId/webhooks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "filterMerchantAccountType": "",\n "filterMerchantAccounts": [],\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "type": "",\n "url": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks")
.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/companies/:companyId/webhooks',
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({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks',
headers: {'content-type': 'application/json'},
body: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
},
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}}/companies/:companyId/webhooks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
});
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}}/companies/:companyId/webhooks',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","filterMerchantAccountType":"","filterMerchantAccounts":[],"networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","type":"","url":"","username":""}'
};
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 = @{ @"acceptsExpiredCertificate": @NO,
@"acceptsSelfSignedCertificate": @NO,
@"acceptsUntrustedRootCertificate": @NO,
@"active": @NO,
@"additionalSettings": @{ @"includeEventCodes": @[ ], @"properties": @{ } },
@"communicationFormat": @"",
@"description": @"",
@"filterMerchantAccountType": @"",
@"filterMerchantAccounts": @[ ],
@"networkType": @"",
@"password": @"",
@"populateSoapActionHeader": @NO,
@"sslVersion": @"",
@"type": @"",
@"url": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/webhooks"]
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}}/companies/:companyId/webhooks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks",
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([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]),
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}}/companies/:companyId/webhooks', [
'body' => '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks');
$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}}/companies/:companyId/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/webhooks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks"
payload = {
"acceptsExpiredCertificate": False,
"acceptsSelfSignedCertificate": False,
"acceptsUntrustedRootCertificate": False,
"active": False,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": False,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks"
payload <- "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks")
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/companies/:companyId/webhooks') do |req|
req.body = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks";
let payload = json!({
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": json!({
"includeEventCodes": (),
"properties": json!({})
}),
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": (),
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
});
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}}/companies/:companyId/webhooks \
--header 'content-type: application/json' \
--data '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
echo '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}' | \
http POST {{baseUrl}}/companies/:companyId/webhooks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "filterMerchantAccountType": "",\n "filterMerchantAccounts": [],\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "type": "",\n "url": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": [
"includeEventCodes": [],
"properties": []
],
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks")! 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
{
"_links": {
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateHmac": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-6933523D2772/generateHmac"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-6933523D2772"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-6933523D2772/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": true,
"acceptsUntrustedRootCertificate": true,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"certificateAlias": "signed-test.adyen.com_2022",
"communicationFormat": "soap",
"description": "Webhook for YOUR_COMPANY_ACCOUNT - YOUR_COMPANY_CODE",
"filterMerchantAccountType": "includeAccounts",
"filterMerchantAccounts": [
"YOUR_MERCHANT_ACCOUNT"
],
"hasError": false,
"hasPassword": true,
"id": "S2-6933523D2772",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": "myuser"
}
POST
Test a webhook
{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test
QUERY PARAMS
companyId
webhookId
BODY json
{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test");
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 \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test" {:content-type :json
:form-params {:merchantIds []
:notification {:amount {:currency ""
:value 0}
:eventCode ""
:eventDate ""
:merchantReference ""
:paymentMethod ""
:reason ""
:success false}
:types []}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/companies/:companyId/webhooks/:webhookId/test"),
Content = new StringContent("{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/companies/:companyId/webhooks/:webhookId/test");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"
payload := strings.NewReader("{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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/companies/:companyId/webhooks/:webhookId/test HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 260
{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test")
.setHeader("content-type", "application/json")
.setBody("{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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 \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test")
.header("content-type", "application/json")
.body("{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
.asString();
const data = JSON.stringify({
merchantIds: [],
notification: {
amount: {
currency: '',
value: 0
},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
data: {
merchantIds: [],
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantIds":[],"notification":{"amount":{"currency":"","value":0},"eventCode":"","eventDate":"","merchantReference":"","paymentMethod":"","reason":"","success":false},"types":[]}'
};
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}}/companies/:companyId/webhooks/:webhookId/test',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "merchantIds": [],\n "notification": {\n "amount": {\n "currency": "",\n "value": 0\n },\n "eventCode": "",\n "eventDate": "",\n "merchantReference": "",\n "paymentMethod": "",\n "reason": "",\n "success": false\n },\n "types": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test")
.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/companies/:companyId/webhooks/:webhookId/test',
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({
merchantIds: [],
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
body: {
merchantIds: [],
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
},
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}}/companies/:companyId/webhooks/:webhookId/test');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
merchantIds: [],
notification: {
amount: {
currency: '',
value: 0
},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
});
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}}/companies/:companyId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
data: {
merchantIds: [],
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantIds":[],"notification":{"amount":{"currency":"","value":0},"eventCode":"","eventDate":"","merchantReference":"","paymentMethod":"","reason":"","success":false},"types":[]}'
};
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 = @{ @"merchantIds": @[ ],
@"notification": @{ @"amount": @{ @"currency": @"", @"value": @0 }, @"eventCode": @"", @"eventDate": @"", @"merchantReference": @"", @"paymentMethod": @"", @"reason": @"", @"success": @NO },
@"types": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"]
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}}/companies/:companyId/webhooks/:webhookId/test" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test",
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([
'merchantIds' => [
],
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]),
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}}/companies/:companyId/webhooks/:webhookId/test', [
'body' => '{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'merchantIds' => [
],
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'merchantIds' => [
],
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test');
$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}}/companies/:companyId/webhooks/:webhookId/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/companies/:companyId/webhooks/:webhookId/test", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"
payload = {
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": False
},
"types": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test"
payload <- "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/companies/:companyId/webhooks/:webhookId/test")
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 \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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/companies/:companyId/webhooks/:webhookId/test') do |req|
req.body = "{\n \"merchantIds\": [],\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test";
let payload = json!({
"merchantIds": (),
"notification": json!({
"amount": json!({
"currency": "",
"value": 0
}),
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
}),
"types": ()
});
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}}/companies/:companyId/webhooks/:webhookId/test \
--header 'content-type: application/json' \
--data '{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
echo '{
"merchantIds": [],
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}' | \
http POST {{baseUrl}}/companies/:companyId/webhooks/:webhookId/test \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "merchantIds": [],\n "notification": {\n "amount": {\n "currency": "",\n "value": 0\n },\n "eventCode": "",\n "eventDate": "",\n "merchantReference": "",\n "paymentMethod": "",\n "reason": "",\n "success": false\n },\n "types": []\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks/:webhookId/test
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"merchantIds": [],
"notification": [
"amount": [
"currency": "",
"value": 0
],
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
],
"types": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks/:webhookId/test")! 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
{
"data": [
{
"merchantId": "YOUR_MERCHANT_ACCOUNT_AU",
"output": "[accepted]",
"requestSent": "{\"live\":\"false\",\"notificationItems\":[{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":100},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2022-05-10T16:57:19+02:00\",\"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT_AU\",\"merchantReference\":\"6GZBF5ML\",\"operations\":[\"CANCEL\",\"CAPTURE\",\"REFUND\"],\"paymentMethod\":\"visa\",\"pspReference\":\"KDN7UP7S1JIK6XES\",\"reason\":\"\",\"success\":\"true\"}}]}",
"responseCode": "200",
"responseTime": "657 ms",
"status": "success"
},
{
"merchantId": "YOUR_MERCHANT_ACCOUNT_EU",
"output": "[accepted]",
"requestSent": "{\"live\":\"false\",\"notificationItems\":[{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":100},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2022-05-10T16:57:19+02:00\",\"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT_EU\",\"merchantReference\":\"6GZBF5ML\",\"operations\":[\"CANCEL\",\"CAPTURE\",\"REFUND\"],\"paymentMethod\":\"visa\",\"pspReference\":\"KDN7UP7S1JIK6XES\",\"reason\":\"\",\"success\":\"true\"}}]}",
"responseCode": "200",
"responseTime": "590 ms",
"status": "success"
},
{
"merchantId": "YOUR_MERCHANT_ACCOUNT_US",
"output": "[accepted]",
"requestSent": "{\"live\":\"false\",\"notificationItems\":[{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":100},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2022-05-10T16:57:19+02:00\",\"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT_US\",\"merchantReference\":\"6GZBF5ML\",\"operations\":[\"CANCEL\",\"CAPTURE\",\"REFUND\"],\"paymentMethod\":\"visa\",\"pspReference\":\"KDN7UP7S1JIK6XES\",\"reason\":\"\",\"success\":\"true\"}}]}",
"responseCode": "200",
"responseTime": "248 ms",
"status": "success"
}
]
}
PATCH
Update a webhook
{{baseUrl}}/companies/:companyId/webhooks/:webhookId
QUERY PARAMS
companyId
webhookId
BODY json
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/companies/:companyId/webhooks/:webhookId");
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/companies/:companyId/webhooks/:webhookId" {:content-type :json
:form-params {:acceptsExpiredCertificate false
:acceptsSelfSignedCertificate false
:acceptsUntrustedRootCertificate false
:active false
:additionalSettings {:includeEventCodes []
:properties {}}
:communicationFormat ""
:description ""
:filterMerchantAccountType ""
:filterMerchantAccounts []
:networkType ""
:password ""
:populateSoapActionHeader false
:sslVersion ""
:url ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks/:webhookId"),
Content = new StringContent("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks/:webhookId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
payload := strings.NewReader("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/companies/:companyId/webhooks/:webhookId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 469
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.setHeader("content-type", "application/json")
.setBody("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/companies/:companyId/webhooks/:webhookId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.header("content-type", "application/json")
.body("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","filterMerchantAccountType":"","filterMerchantAccounts":[],"networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","url":"","username":""}'
};
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}}/companies/:companyId/webhooks/:webhookId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "filterMerchantAccountType": "",\n "filterMerchantAccounts": [],\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "url": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/companies/:companyId/webhooks/:webhookId")
.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/companies/:companyId/webhooks/:webhookId',
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({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/companies/:companyId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
body: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
},
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}}/companies/:companyId/webhooks/:webhookId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
});
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}}/companies/:companyId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
filterMerchantAccountType: '',
filterMerchantAccounts: [],
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/companies/:companyId/webhooks/:webhookId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","filterMerchantAccountType":"","filterMerchantAccounts":[],"networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","url":"","username":""}'
};
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 = @{ @"acceptsExpiredCertificate": @NO,
@"acceptsSelfSignedCertificate": @NO,
@"acceptsUntrustedRootCertificate": @NO,
@"active": @NO,
@"additionalSettings": @{ @"includeEventCodes": @[ ], @"properties": @{ } },
@"communicationFormat": @"",
@"description": @"",
@"filterMerchantAccountType": @"",
@"filterMerchantAccounts": @[ ],
@"networkType": @"",
@"password": @"",
@"populateSoapActionHeader": @NO,
@"sslVersion": @"",
@"url": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/companies/:companyId/webhooks/:webhookId"]
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}}/companies/:companyId/webhooks/:webhookId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/companies/:companyId/webhooks/:webhookId",
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([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]),
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}}/companies/:companyId/webhooks/:webhookId', [
'body' => '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'filterMerchantAccountType' => '',
'filterMerchantAccounts' => [
],
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/companies/:companyId/webhooks/:webhookId');
$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}}/companies/:companyId/webhooks/:webhookId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/companies/:companyId/webhooks/:webhookId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/companies/:companyId/webhooks/:webhookId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
payload = {
"acceptsExpiredCertificate": False,
"acceptsSelfSignedCertificate": False,
"acceptsUntrustedRootCertificate": False,
"active": False,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": False,
"sslVersion": "",
"url": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/companies/:companyId/webhooks/:webhookId"
payload <- "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks/:webhookId")
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/companies/:companyId/webhooks/:webhookId') do |req|
req.body = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"filterMerchantAccountType\": \"\",\n \"filterMerchantAccounts\": [],\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/companies/:companyId/webhooks/:webhookId";
let payload = json!({
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": json!({
"includeEventCodes": (),
"properties": json!({})
}),
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": (),
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
});
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}}/companies/:companyId/webhooks/:webhookId \
--header 'content-type: application/json' \
--data '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
echo '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}' | \
http PATCH {{baseUrl}}/companies/:companyId/webhooks/:webhookId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "filterMerchantAccountType": "",\n "filterMerchantAccounts": [],\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "url": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/companies/:companyId/webhooks/:webhookId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": [
"includeEventCodes": [],
"properties": []
],
"communicationFormat": "",
"description": "",
"filterMerchantAccountType": "",
"filterMerchantAccounts": [],
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/companies/:companyId/webhooks/:webhookId")! 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
{
"_links": {
"company": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT"
},
"generateHmac": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/generateHmac"
},
"self": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/companies/YOUR_COMPANY_ACCOUNT/webhooks/S2-4A3B33202A46/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_COMPANY_ACCOUNT - YOUR_COMPANY_CODE",
"filterMerchantAccountType": "allAccounts",
"hasError": false,
"hasPassword": false,
"id": "S2-4A3B33202A46",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": ""
}
POST
Generate an HMAC key (POST)
{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac
QUERY PARAMS
merchantId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/merchants/:merchantId/webhooks/:webhookId/generateHmac HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"))
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/webhooks/:webhookId/generateHmac',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac');
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}}/merchants/:merchantId/webhooks/:webhookId/generateHmac'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac';
const options = {method: 'POST'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/merchants/:merchantId/webhooks/:webhookId/generateHmac")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/merchants/:merchantId/webhooks/:webhookId/generateHmac') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac
http POST {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/generateHmac")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"hmacKey": "7052E6804F0AF40DCC390464C817F4F963516FA42AC8816D518DC5D39F41E902"
}
GET
Get a webhook (GET)
{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
QUERY PARAMS
merchantId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
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}}/merchants/:merchantId/webhooks/:webhookId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
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/merchants/:merchantId/webhooks/:webhookId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"))
.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}}/merchants/:merchantId/webhooks/:webhookId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.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}}/merchants/:merchantId/webhooks/:webhookId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
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}}/merchants/:merchantId/webhooks/:webhookId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/webhooks/:webhookId',
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}}/merchants/:merchantId/webhooks/:webhookId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
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}}/merchants/:merchantId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
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}}/merchants/:merchantId/webhooks/:webhookId"]
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}}/merchants/:merchantId/webhooks/:webhookId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId",
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}}/merchants/:merchantId/webhooks/:webhookId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/webhooks/:webhookId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
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/merchants/:merchantId/webhooks/:webhookId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId";
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}}/merchants/:merchantId/webhooks/:webhookId
http GET {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")! 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
{
"_links": {
"generateHmac": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/generateHmac"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_MERCHANT_ACCOUNT - YOUR_MERCHANT_CODE",
"hasError": false,
"hasPassword": false,
"id": "S2-3E5E42476641",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": ""
}
GET
List all webhooks (GET)
{{baseUrl}}/merchants/:merchantId/webhooks
QUERY PARAMS
merchantId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/merchants/:merchantId/webhooks")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks"
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}}/merchants/:merchantId/webhooks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/webhooks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks"
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/merchants/:merchantId/webhooks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/merchants/:merchantId/webhooks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks"))
.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}}/merchants/:merchantId/webhooks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/merchants/:merchantId/webhooks")
.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}}/merchants/:merchantId/webhooks');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/merchants/:merchantId/webhooks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks';
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}}/merchants/:merchantId/webhooks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/webhooks',
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}}/merchants/:merchantId/webhooks'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/merchants/:merchantId/webhooks');
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}}/merchants/:merchantId/webhooks'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks';
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}}/merchants/:merchantId/webhooks"]
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}}/merchants/:merchantId/webhooks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks",
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}}/merchants/:merchantId/webhooks');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/webhooks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/merchants/:merchantId/webhooks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/webhooks")
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/merchants/:merchantId/webhooks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks";
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}}/merchants/:merchantId/webhooks
http GET {{baseUrl}}/merchants/:merchantId/webhooks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks")! 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
{
"_links": {
"first": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
},
"last": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks?pageNumber=1&pageSize=10"
}
},
"data": [
{
"_links": {
"generateHmac": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/generateHmac"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_MERCHANT_ACCOUNT - YOUR_MERCHANT_CODE",
"hasError": false,
"hasPassword": false,
"id": "S2-3E5E42476641",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": ""
}
],
"itemsTotal": 1,
"pagesTotal": 1
}
DELETE
Remove a webhook (DELETE)
{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
QUERY PARAMS
merchantId
webhookId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
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}}/merchants/:merchantId/webhooks/:webhookId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
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/merchants/:merchantId/webhooks/:webhookId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"))
.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}}/merchants/:merchantId/webhooks/:webhookId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.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}}/merchants/:merchantId/webhooks/:webhookId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
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}}/merchants/:merchantId/webhooks/:webhookId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/merchants/:merchantId/webhooks/:webhookId',
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}}/merchants/:merchantId/webhooks/:webhookId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
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}}/merchants/:merchantId/webhooks/:webhookId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
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}}/merchants/:merchantId/webhooks/:webhookId"]
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}}/merchants/:merchantId/webhooks/:webhookId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId",
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}}/merchants/:merchantId/webhooks/:webhookId');
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/merchants/:merchantId/webhooks/:webhookId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
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/merchants/:merchantId/webhooks/:webhookId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId";
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}}/merchants/:merchantId/webhooks/:webhookId
http DELETE {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")! 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()
POST
Set up a webhook (POST)
{{baseUrl}}/merchants/:merchantId/webhooks
QUERY PARAMS
merchantId
BODY json
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks");
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/webhooks" {:content-type :json
:form-params {:acceptsExpiredCertificate false
:acceptsSelfSignedCertificate false
:acceptsUntrustedRootCertificate false
:active false
:additionalSettings {:includeEventCodes []
:properties {}}
:communicationFormat ""
:description ""
:networkType ""
:password ""
:populateSoapActionHeader false
:sslVersion ""
:type ""
:url ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks"),
Content = new StringContent("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks"
payload := strings.NewReader("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/webhooks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 416
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/webhooks")
.setHeader("content-type", "application/json")
.setBody("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/webhooks")
.header("content-type", "application/json")
.body("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/webhooks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","type":"","url":"","username":""}'
};
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}}/merchants/:merchantId/webhooks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "type": "",\n "url": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks")
.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/merchants/:merchantId/webhooks',
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({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks',
headers: {'content-type': 'application/json'},
body: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
},
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}}/merchants/:merchantId/webhooks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
});
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}}/merchants/:merchantId/webhooks',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
type: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","type":"","url":"","username":""}'
};
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 = @{ @"acceptsExpiredCertificate": @NO,
@"acceptsSelfSignedCertificate": @NO,
@"acceptsUntrustedRootCertificate": @NO,
@"active": @NO,
@"additionalSettings": @{ @"includeEventCodes": @[ ], @"properties": @{ } },
@"communicationFormat": @"",
@"description": @"",
@"networkType": @"",
@"password": @"",
@"populateSoapActionHeader": @NO,
@"sslVersion": @"",
@"type": @"",
@"url": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/webhooks"]
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}}/merchants/:merchantId/webhooks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks",
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([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]),
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}}/merchants/:merchantId/webhooks', [
'body' => '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'type' => '',
'url' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks');
$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}}/merchants/:merchantId/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/webhooks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks"
payload = {
"acceptsExpiredCertificate": False,
"acceptsSelfSignedCertificate": False,
"acceptsUntrustedRootCertificate": False,
"active": False,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": False,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks"
payload <- "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks")
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/webhooks') do |req|
req.body = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"type\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks";
let payload = json!({
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": json!({
"includeEventCodes": (),
"properties": json!({})
}),
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
});
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}}/merchants/:merchantId/webhooks \
--header 'content-type: application/json' \
--data '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}'
echo '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
}' | \
http POST {{baseUrl}}/merchants/:merchantId/webhooks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "type": "",\n "url": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": [
"includeEventCodes": [],
"properties": []
],
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"type": "",
"url": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks")! 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
{
"_links": {
"generateHmac": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-31433949437F/generateHmac"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-31433949437F"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-31433949437F/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": true,
"acceptsUntrustedRootCertificate": true,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"certificateAlias": "signed-test.adyen.com_2022",
"communicationFormat": "json",
"description": "Webhook for YOUR_MERCHANT_ACCOUNT - YOUR_MERCHANT_CODE",
"hasError": false,
"hasPassword": true,
"id": "S2-31433949437F",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": "myuser"
}
POST
Test a webhook (POST)
{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test
QUERY PARAMS
merchantId
webhookId
BODY json
{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test");
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 \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test" {:content-type :json
:form-params {:notification {:amount {:currency ""
:value 0}
:eventCode ""
:eventDate ""
:merchantReference ""
:paymentMethod ""
:reason ""
:success false}
:types []}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/merchants/:merchantId/webhooks/:webhookId/test"),
Content = new StringContent("{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/merchants/:merchantId/webhooks/:webhookId/test");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"
payload := strings.NewReader("{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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/merchants/:merchantId/webhooks/:webhookId/test HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 239
{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test")
.setHeader("content-type", "application/json")
.setBody("{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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 \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test")
.header("content-type", "application/json")
.body("{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
.asString();
const data = JSON.stringify({
notification: {
amount: {
currency: '',
value: 0
},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
data: {
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notification":{"amount":{"currency":"","value":0},"eventCode":"","eventDate":"","merchantReference":"","paymentMethod":"","reason":"","success":false},"types":[]}'
};
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}}/merchants/:merchantId/webhooks/:webhookId/test',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "notification": {\n "amount": {\n "currency": "",\n "value": 0\n },\n "eventCode": "",\n "eventDate": "",\n "merchantReference": "",\n "paymentMethod": "",\n "reason": "",\n "success": false\n },\n "types": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test")
.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/merchants/:merchantId/webhooks/:webhookId/test',
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({
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
body: {
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
},
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}}/merchants/:merchantId/webhooks/:webhookId/test');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
notification: {
amount: {
currency: '',
value: 0
},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
});
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}}/merchants/:merchantId/webhooks/:webhookId/test',
headers: {'content-type': 'application/json'},
data: {
notification: {
amount: {currency: '', value: 0},
eventCode: '',
eventDate: '',
merchantReference: '',
paymentMethod: '',
reason: '',
success: false
},
types: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"notification":{"amount":{"currency":"","value":0},"eventCode":"","eventDate":"","merchantReference":"","paymentMethod":"","reason":"","success":false},"types":[]}'
};
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 = @{ @"notification": @{ @"amount": @{ @"currency": @"", @"value": @0 }, @"eventCode": @"", @"eventDate": @"", @"merchantReference": @"", @"paymentMethod": @"", @"reason": @"", @"success": @NO },
@"types": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"]
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}}/merchants/:merchantId/webhooks/:webhookId/test" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test",
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([
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]),
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}}/merchants/:merchantId/webhooks/:webhookId/test', [
'body' => '{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'notification' => [
'amount' => [
'currency' => '',
'value' => 0
],
'eventCode' => '',
'eventDate' => '',
'merchantReference' => '',
'paymentMethod' => '',
'reason' => '',
'success' => null
],
'types' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test');
$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}}/merchants/:merchantId/webhooks/:webhookId/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/merchants/:merchantId/webhooks/:webhookId/test", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"
payload = {
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": False
},
"types": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test"
payload <- "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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}}/merchants/:merchantId/webhooks/:webhookId/test")
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 \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\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/merchants/:merchantId/webhooks/:webhookId/test') do |req|
req.body = "{\n \"notification\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"eventCode\": \"\",\n \"eventDate\": \"\",\n \"merchantReference\": \"\",\n \"paymentMethod\": \"\",\n \"reason\": \"\",\n \"success\": false\n },\n \"types\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test";
let payload = json!({
"notification": json!({
"amount": json!({
"currency": "",
"value": 0
}),
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
}),
"types": ()
});
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}}/merchants/:merchantId/webhooks/:webhookId/test \
--header 'content-type: application/json' \
--data '{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}'
echo '{
"notification": {
"amount": {
"currency": "",
"value": 0
},
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
},
"types": []
}' | \
http POST {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "notification": {\n "amount": {\n "currency": "",\n "value": 0\n },\n "eventCode": "",\n "eventDate": "",\n "merchantReference": "",\n "paymentMethod": "",\n "reason": "",\n "success": false\n },\n "types": []\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"notification": [
"amount": [
"currency": "",
"value": 0
],
"eventCode": "",
"eventDate": "",
"merchantReference": "",
"paymentMethod": "",
"reason": "",
"success": false
],
"types": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId/test")! 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
{
"data": [
{
"merchantId": "YOUR_MERCHANT_ACCOUNT",
"output": "[accepted]",
"requestSent": "{\"live\":\"false\",\"notificationItems\":[{\"NotificationRequestItem\":{\"amount\":{\"currency\":\"EUR\",\"value\":100},\"eventCode\":\"AUTHORISATION\",\"eventDate\":\"2022-05-10T17:02:03+02:00\",\"merchantAccountCode\":\"YOUR_MERCHANT_ACCOUNT\",\"merchantReference\":\"4TZLD23Y\",\"operations\":[\"CANCEL\",\"CAPTURE\",\"REFUND\"],\"paymentMethod\":\"visa\",\"pspReference\":\"E05WW50L6IOBRGA0\",\"reason\":\"\",\"success\":\"true\"}}]}",
"responseCode": "200",
"responseTime": "532 ms",
"status": "success"
}
]
}
PATCH
Update a webhook (PATCH)
{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
QUERY PARAMS
merchantId
webhookId
BODY json
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId");
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId" {:content-type :json
:form-params {:acceptsExpiredCertificate false
:acceptsSelfSignedCertificate false
:acceptsUntrustedRootCertificate false
:active false
:additionalSettings {:includeEventCodes []
:properties {}}
:communicationFormat ""
:description ""
:networkType ""
:password ""
:populateSoapActionHeader false
:sslVersion ""
:url ""
:username ""}})
require "http/client"
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks/:webhookId"),
Content = new StringContent("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks/:webhookId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
payload := strings.NewReader("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/webhooks/:webhookId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 402
{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.setHeader("content-type", "application/json")
.setBody("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.header("content-type", "application/json")
.body("{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
.asString();
const data = JSON.stringify({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","url":"","username":""}'
};
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}}/merchants/:merchantId/webhooks/:webhookId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "url": "",\n "username": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")
.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/merchants/:merchantId/webhooks/:webhookId',
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({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
body: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
},
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}}/merchants/:merchantId/webhooks/:webhookId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {
includeEventCodes: [],
properties: {}
},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
});
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}}/merchants/:merchantId/webhooks/:webhookId',
headers: {'content-type': 'application/json'},
data: {
acceptsExpiredCertificate: false,
acceptsSelfSignedCertificate: false,
acceptsUntrustedRootCertificate: false,
active: false,
additionalSettings: {includeEventCodes: [], properties: {}},
communicationFormat: '',
description: '',
networkType: '',
password: '',
populateSoapActionHeader: false,
sslVersion: '',
url: '',
username: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"acceptsExpiredCertificate":false,"acceptsSelfSignedCertificate":false,"acceptsUntrustedRootCertificate":false,"active":false,"additionalSettings":{"includeEventCodes":[],"properties":{}},"communicationFormat":"","description":"","networkType":"","password":"","populateSoapActionHeader":false,"sslVersion":"","url":"","username":""}'
};
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 = @{ @"acceptsExpiredCertificate": @NO,
@"acceptsSelfSignedCertificate": @NO,
@"acceptsUntrustedRootCertificate": @NO,
@"active": @NO,
@"additionalSettings": @{ @"includeEventCodes": @[ ], @"properties": @{ } },
@"communicationFormat": @"",
@"description": @"",
@"networkType": @"",
@"password": @"",
@"populateSoapActionHeader": @NO,
@"sslVersion": @"",
@"url": @"",
@"username": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"]
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}}/merchants/:merchantId/webhooks/:webhookId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId",
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([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]),
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}}/merchants/:merchantId/webhooks/:webhookId', [
'body' => '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'acceptsExpiredCertificate' => null,
'acceptsSelfSignedCertificate' => null,
'acceptsUntrustedRootCertificate' => null,
'active' => null,
'additionalSettings' => [
'includeEventCodes' => [
],
'properties' => [
]
],
'communicationFormat' => '',
'description' => '',
'networkType' => '',
'password' => '',
'populateSoapActionHeader' => null,
'sslVersion' => '',
'url' => '',
'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId');
$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}}/merchants/:merchantId/webhooks/:webhookId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/merchants/:merchantId/webhooks/:webhookId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
payload = {
"acceptsExpiredCertificate": False,
"acceptsSelfSignedCertificate": False,
"acceptsUntrustedRootCertificate": False,
"active": False,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": False,
"sslVersion": "",
"url": "",
"username": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId"
payload <- "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks/:webhookId")
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 \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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/merchants/:merchantId/webhooks/:webhookId') do |req|
req.body = "{\n \"acceptsExpiredCertificate\": false,\n \"acceptsSelfSignedCertificate\": false,\n \"acceptsUntrustedRootCertificate\": false,\n \"active\": false,\n \"additionalSettings\": {\n \"includeEventCodes\": [],\n \"properties\": {}\n },\n \"communicationFormat\": \"\",\n \"description\": \"\",\n \"networkType\": \"\",\n \"password\": \"\",\n \"populateSoapActionHeader\": false,\n \"sslVersion\": \"\",\n \"url\": \"\",\n \"username\": \"\"\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}}/merchants/:merchantId/webhooks/:webhookId";
let payload = json!({
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": json!({
"includeEventCodes": (),
"properties": json!({})
}),
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
});
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}}/merchants/:merchantId/webhooks/:webhookId \
--header 'content-type: application/json' \
--data '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}'
echo '{
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": {
"includeEventCodes": [],
"properties": {}
},
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
}' | \
http PATCH {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "acceptsExpiredCertificate": false,\n "acceptsSelfSignedCertificate": false,\n "acceptsUntrustedRootCertificate": false,\n "active": false,\n "additionalSettings": {\n "includeEventCodes": [],\n "properties": {}\n },\n "communicationFormat": "",\n "description": "",\n "networkType": "",\n "password": "",\n "populateSoapActionHeader": false,\n "sslVersion": "",\n "url": "",\n "username": ""\n}' \
--output-document \
- {{baseUrl}}/merchants/:merchantId/webhooks/:webhookId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": false,
"additionalSettings": [
"includeEventCodes": [],
"properties": []
],
"communicationFormat": "",
"description": "",
"networkType": "",
"password": "",
"populateSoapActionHeader": false,
"sslVersion": "",
"url": "",
"username": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/merchants/:merchantId/webhooks/:webhookId")! 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
{
"_links": {
"generateHmac": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/generateHmac"
},
"merchant": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT"
},
"self": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641"
},
"testWebhook": {
"href": "https://management-test.adyen.com/v1/merchants/YOUR_MERCHANT_ACCOUNT/webhooks/S2-3E5E42476641/test"
}
},
"acceptsExpiredCertificate": false,
"acceptsSelfSignedCertificate": false,
"acceptsUntrustedRootCertificate": false,
"active": true,
"additionalSettings": {
"properties": {
"addAcquirerResult": false,
"addCaptureReferenceToDisputeNotification": false,
"addPaymentAccountReference": false,
"addRawAcquirerResult": false,
"includeARN": false,
"includeAcquirerErrorDetails": false,
"includeAcquirerReference": false,
"includeAirlineData": false,
"includeAliasInfo": false,
"includeAuthAmountForDynamicZeroAuth": false,
"includeBankAccountDetails": false,
"includeBankVerificationResults": false,
"includeCaptureDelayHours": false,
"includeCardBin": false,
"includeCardBinDetails": false,
"includeCardHolderName": false,
"includeCardInfoForRecurringContractNotification": false,
"includeCoBrandedWith": false,
"includeContactlessWalletTokenInformation": false,
"includeCustomRoutingFlagging": false,
"includeDeliveryAddress": false,
"includeDeviceAndBrowserInfo": false,
"includeDunningProjectData": false,
"includeExtraCosts": false,
"includeFundingSource": false,
"includeGrossCurrencyChargebackDetails": false,
"includeInstallmentsInfo": false,
"includeIssuerCountry": false,
"includeMandateDetails": false,
"includeMetadataIn3DSecurePaymentNotification": false,
"includeNfcTokenInformation": false,
"includeNotesInManualReviewNotifications": false,
"includeOriginalMerchantReferenceCancelOrRefundNotification": false,
"includeOriginalReferenceForChargebackReversed": false,
"includePayPalDetails": false,
"includePayULatamDetails": false,
"includePaymentResultInOrderClosedNotification": false,
"includePosDetails": false,
"includePosTerminalInfo": false,
"includeRawThreeDSecureDetailsResult": false,
"includeRawThreeDSecureResult": false,
"includeRealtimeAccountUpdaterStatus": false,
"includeRetryAttempts": false,
"includeRiskData": false,
"includeRiskExperimentReference": false,
"includeRiskProfile": false,
"includeRiskProfileReference": false,
"includeShopperCountry": false,
"includeShopperDetail": false,
"includeShopperInteraction": false,
"includeSoapSecurityHeader": false,
"includeStore": false,
"includeSubvariant": false,
"includeThreeDS2ChallengeInformation": false,
"includeThreeDSVersion": false,
"includeThreeDSecureResult": false,
"includeTokenisedPaymentMetaData": false,
"includeUpiVpa": false,
"includeWeChatPayOpenid": false,
"includeZeroAuthFlag": false,
"returnAvsData": false
}
},
"communicationFormat": "json",
"description": "Webhook for YOUR_MERCHANT_ACCOUNT - YOUR_MERCHANT_CODE",
"hasError": false,
"hasPassword": false,
"id": "S2-3E5E42476641",
"populateSoapActionHeader": false,
"sslVersion": "TLSv1.2",
"type": "standard",
"url": "YOUR_WEBHOOK_URL",
"username": ""
}