Remove Product from Collection
curl --request DELETE \
--url https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId} \
--header 'X-Shop-API-Key: <x-shop-api-key>'import requests
url = "https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}"
headers = {"X-Shop-API-Key": "<x-shop-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Shop-API-Key': '<x-shop-api-key>'}};
fetch('https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}', 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://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Shop-API-Key: <x-shop-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"
"net/http"
"io"
)
func main() {
url := "https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Shop-API-Key", "<x-shop-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Shop-API-Key"] = '<x-shop-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Product removed from collection successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"productId"
],
"message": "Product is not in this collection"
}
]
}
Collections Setup
Remove Product from Collection
DELETE
/
api
/
v1
/
hub
/
shop
/
{shopId}
/
collections
/
{collectionId}
/
products
/
{productId}
Remove Product from Collection
curl --request DELETE \
--url https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId} \
--header 'X-Shop-API-Key: <x-shop-api-key>'import requests
url = "https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}"
headers = {"X-Shop-API-Key": "<x-shop-api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-Shop-API-Key': '<x-shop-api-key>'}};
fetch('https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}', 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://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-Shop-API-Key: <x-shop-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"
"net/http"
"io"
)
func main() {
url := "https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-Shop-API-Key", "<x-shop-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getscale.ng/api/v1/hub/shop/{shopId}/collections/{collectionId}/products/{productId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-Shop-API-Key"] = '<x-shop-api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Product removed from collection successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"productId"
],
"message": "Product is not in this collection"
}
]
}
Unbinds a specific product from a curated collection.
Authorizations
string
required
Your Secret API Key (
sk_live_... or sk_test_...) generated from the Developer dashboard. Must be kept secret.Path Parameters
string
required
The unique UUID of the shop.
number
required
The unique collection ID.
number
required
The product ID to remove.
{
"status": "success",
"message": "Product removed from collection successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"productId"
],
"message": "Product is not in this collection"
}
]
}
⌘I