Delete Variant
curl --request DELETE \
--url https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId} \
--header 'X-Shop-API-Key: <x-shop-api-key>'import requests
url = "https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}"
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}', 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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}",
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}"
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}")
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": "Variant deleted successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"variantId"
],
"message": "Variant not found"
}
]
}
Product Variants
Delete Variant
DELETE
/
api
/
v1
/
hub
/
shop
/
{shopId}
/
product
/
{productId}
/
variants
/
{variantId}
Delete Variant
curl --request DELETE \
--url https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId} \
--header 'X-Shop-API-Key: <x-shop-api-key>'import requests
url = "https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}"
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}', 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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}",
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}"
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.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}")
.header("X-Shop-API-Key", "<x-shop-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId}")
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": "Variant deleted successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"variantId"
],
"message": "Variant not found"
}
]
}
Removes a product variant configuration from inventory database records.
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 ID of the product.
number
required
The unique ID of the variant.
{
"status": "success",
"message": "Variant deleted successfully"
}
{
"message": "FORM_VALIDATION_ERROR",
"code": 400,
"validationErrors": [
{
"path": [
"variantId"
],
"message": "Variant not found"
}
]
}
⌘I