curl --request POST \
--url https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"sku": "AAVVDD123456"
}
]
}
'import requests
url = "https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach"
payload = { "products": [{ "sku": "AAVVDD123456" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({products: [{sku: 'AAVVDD123456'}]})
};
fetch('https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach', 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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach",
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([
'products' => [
[
'sku' => 'AAVVDD123456'
]
]
]),
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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach"
payload := strings.NewReader("{\n \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach")
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 \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Request is invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request. Unable to find or create product"
}
]
}{
"type": "UNAUTHORIZED_ERROR",
"message": "The requester is unauthorized"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "NOT_FOUND",
"message": "Resource not found"
}{
"type": "PAYLOAD_LIMIT_EXCEEDED_ERROR",
"message": "Payload exceeds maximum configured size"
}{
"message": "Internal Server Error",
"type": "SERVER_ERROR"
}Remove Products from a Bundle by SKU
When one or more products in a bundle are discontinued or no longer required, you don’t want them to appear in the bundle. With this endpoint, you can remove up to 25 products by SKU. Note
1. Products are only detached from the given product, not deleted. They can be added to the same or another product, at a later point.
2. At least one product must be specified.
3. If you don’t have product ID, use the corresponding SKU-based endpoint - POST /products/{id}/bundles/actions/detach.
curl --request POST \
--url https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"products": [
{
"sku": "AAVVDD123456"
}
]
}
'import requests
url = "https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach"
payload = { "products": [{ "sku": "AAVVDD123456" }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({products: [{sku: 'AAVVDD123456'}]})
};
fetch('https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach', 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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach",
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([
'products' => [
[
'sku' => 'AAVVDD123456'
]
]
]),
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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach"
payload := strings.NewReader("{\n \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\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.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fabric.inc/v3/products/sku/{sku}/bundles/actions/detach")
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 \"products\": [\n {\n \"sku\": \"AAVVDD123456\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "Request is invalid",
"type": "Bad request",
"errors": [
{
"type": "CLIENT_ERROR",
"message": "Invalid request. Unable to find or create product"
}
]
}{
"type": "UNAUTHORIZED_ERROR",
"message": "The requester is unauthorized"
}{
"type": "REQUEST_DENIED",
"message": "User doesn't have the required permission"
}{
"type": "NOT_FOUND",
"message": "Resource not found"
}{
"type": "PAYLOAD_LIMIT_EXCEEDED_ERROR",
"message": "Payload exceeds maximum configured size"
}{
"message": "Internal Server Error",
"type": "SERVER_ERROR"
}Authorizations
S2S access token (JWT) from fabric Identity service (during Login)
Headers
A header used by fabric to identify the tenant making the request. You must include tenant id in the authentication header for an API request to access any of fabric’s endpoints. You can retrieve the tenant id , which is also called account id, from Copilot. This header is required.
"517fa9dfd42d8b00g1o3k312"
Unique request ID
"263e731c-45c8-11ed-b878-0242ac120002"
Path Parameters
Product SKU
Query Parameters
Comma-separated statuses indicating the preferred order of the product versions considered for this operation (endpoint action). For example,
1. When the status is DRAFT, this operations will only apply to the Draft version of product, if it exists
2. When the status is LIVE, this operation will only apply to the Live version of the product, if it exists
3 When the status is LIVE,DRAFT, this operation will prioritize Live version first, if it exists. Otherwise, the Draft version is considered.
4 When the status is DRAFT,LIVE this operation will prioritize the Draft version first, if it exists. Otherwise, the Live version is considered.
"DRAFT"
Body
1Show child attributes
Show child attributes
Response
OK
Was this page helpful?
