Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.customers.blacklist("CUSTOMER_ID");<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->customers->blacklist('CUSTOMER_ID');
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.customers.blacklist("CUSTOMER_ID")
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addresses": true,
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist"
payload := strings.NewReader("{\n \"addresses\": true,\n \"note\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": true,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": true,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"balance": 5,
"balanceAtCheckout": true,
"tags": [
{
"id": "a537f7cb-125f-43a0-bd90-e29657620d76",
"name": "Wholesale",
"tone": "primary",
"automatic": false
}
],
"balanceHistory": [
{
"id": "ce46d95e-769f-4a0d-9469-7298d67f7a7b",
"kind": "add",
"amount": 5,
"balanceAfter": 5,
"currencyCode": "USD",
"note": "Goodwill credit",
"orderId": null,
"by": "api-docs-25aa8416@noblecheats.net",
"dateCreated": "2026-10-22T16:20:19Z"
}
],
"affiliate": null,
"blacklisted": true,
"blacklistedBy": [
{
"id": "235ad0e3-5819-4709-aad5-d60358b15d07",
"type": "email",
"value": "ada@example.com",
"part": "theirs"
}
],
"blacklistRules": 1,
"knownAddresses": 0,
"added": 1
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Customers
Blacklist a customer
Stops the customer buying: their email is added to the store’s blacklist, and with addresses the IP addresses their orders came from. Their open checkouts are refused from this moment.
Needs the customers.write permission (Change Customers).
POST
/
stores
/
{storeId}
/
customers
/
{customerId}
/
blacklist
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.customers.blacklist("CUSTOMER_ID");<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->customers->blacklist('CUSTOMER_ID');
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.customers.blacklist("CUSTOMER_ID")
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"addresses": true,
"note": "<string>"
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist"
payload := strings.NewReader("{\n \"addresses\": true,\n \"note\": \"<string>\"\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))
}HttpResponse<String> response = Unirest.post("https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"addresses\": true,\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/customers/{customerId}/blacklist")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"addresses\": true,\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"balance": 5,
"balanceAtCheckout": true,
"tags": [
{
"id": "a537f7cb-125f-43a0-bd90-e29657620d76",
"name": "Wholesale",
"tone": "primary",
"automatic": false
}
],
"balanceHistory": [
{
"id": "ce46d95e-769f-4a0d-9469-7298d67f7a7b",
"kind": "add",
"amount": 5,
"balanceAfter": 5,
"currencyCode": "USD",
"note": "Goodwill credit",
"orderId": null,
"by": "api-docs-25aa8416@noblecheats.net",
"dateCreated": "2026-10-22T16:20:19Z"
}
],
"affiliate": null,
"blacklisted": true,
"blacklistedBy": [
{
"id": "235ad0e3-5819-4709-aad5-d60358b15d07",
"type": "email",
"value": "ada@example.com",
"part": "theirs"
}
],
"blacklistRules": 1,
"knownAddresses": 0,
"added": 1
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The customer.
Body
application/json

