cURL
curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>' \
--data-binary $'<string>'import requests
url = "https://sandbox.hyperswitch.io/blocklist/batch"
headers = {
"api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://sandbox.hyperswitch.io/blocklist/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hyperswitch.io/blocklist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/blocklist/batch"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/blocklist/batch")
.header("api-key", "<api-key>")
.header("Content-Type", "multipart/form-data")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/blocklist/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'multipart/form-data'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"total_rows": 1,
"status": "initiated"
}Blocklist
Blocklist batch upload
POST
/
blocklist
/
batch
cURL
curl --request POST \
--url https://sandbox.hyperswitch.io/blocklist/batch \
--header 'Content-Type: multipart/form-data' \
--header 'api-key: <api-key>' \
--data-binary $'<string>'import requests
url = "https://sandbox.hyperswitch.io/blocklist/batch"
headers = {
"api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'multipart/form-data'}
};
fetch('https://sandbox.hyperswitch.io/blocklist/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hyperswitch.io/blocklist/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/blocklist/batch"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/blocklist/batch")
.header("api-key", "<api-key>")
.header("Content-Type", "multipart/form-data")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/blocklist/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'multipart/form-data'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"total_rows": 1,
"status": "initiated"
}Authorizations
api_keyjwt_key
Headers
Query Parameters
Body
multipart/form-data
A multipart/form-data request with a file field containing a UTF-8 CSV (max 5 MiB). The part's filename is recorded on the job and returned as file_name. The CSV header is type,data,metadata,transaction_type; older headers without transaction_type are accepted. type: one of generic_card_bin (6 to 10 digits), card_bin (6 digits), extended_card_bin (8 digits), fingerprint. metadata: optional, key=value pairs separated by ; (e.g. reason=fraud;source=manual). transaction_type: optional, payment (default) or payout; selection may differ per row. Invalid CSV transaction-type values are rejected even when a query override is selected. Maximum 100,000 data rows.
The body is of type string.
Was this page helpful?