Blacklist
Create blacklist entry
Developer API operation for POST /dev/v1/blacklist.
POST
/
dev
/
v1
/
blacklist
Create blacklist entry
curl --request POST \
--url https://api.shoppex.io/dev/v1/blacklist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IP', value: '203.0.113.10', reason: 'Chargeback abuse'})
};
fetch('https://api.shoppex.io/dev/v1/blacklist', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/blacklist"
payload = {
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/blacklist",
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([
'type' => 'IP',
'value' => '203.0.113.10',
'reason' => 'Chargeback abuse'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/blacklist"
payload := strings.NewReader("{\n \"type\": \"IP\",\n \"value\": \"203.0.113.10\",\n \"reason\": \"Chargeback abuse\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}{
"data": {
"id": "44444444-4444-4444-8444-444444444444",
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse",
"created_at": 1711962000
}
}⌘I
Create blacklist entry
curl --request POST \
--url https://api.shoppex.io/dev/v1/blacklist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: 'IP', value: '203.0.113.10', reason: 'Chargeback abuse'})
};
fetch('https://api.shoppex.io/dev/v1/blacklist', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/blacklist"
payload = {
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/blacklist",
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([
'type' => 'IP',
'value' => '203.0.113.10',
'reason' => 'Chargeback abuse'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/blacklist"
payload := strings.NewReader("{\n \"type\": \"IP\",\n \"value\": \"203.0.113.10\",\n \"reason\": \"Chargeback abuse\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}{
"data": {
"id": "44444444-4444-4444-8444-444444444444",
"type": "IP",
"value": "203.0.113.10",
"reason": "Chargeback abuse",
"created_at": 1711962000
}
}