Remove Products From Collection
curl --request DELETE \
--url https://api.example.com/api/dashboard/collections/{collection_id}/products \
--header 'Content-Type: application/json' \
--data '
{
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.example.com/api/dashboard/collections/{collection_id}/products"
payload = { "product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.example.com/api/dashboard/collections/{collection_id}/products', 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.example.com/api/dashboard/collections/{collection_id}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/dashboard/collections/{collection_id}/products"
payload := strings.NewReader("{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
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.delete("https://api.example.com/api/dashboard/collections/{collection_id}/products")
.header("Content-Type", "application/json")
.body("{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/dashboard/collections/{collection_id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"type": "<string>",
"image_url": "<string>",
"sort_order": "<string>",
"published": true,
"published_at": "2023-11-07T05:31:56Z",
"products_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"vendor": "<string>",
"product_type": "<string>",
"tags": [
"<string>"
],
"price": "<string>",
"compare_at_price": "<string>",
"cost_per_item": "<string>",
"currency": "<string>",
"images": [
{}
],
"has_variants": true,
"options": [
{}
],
"variants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"barcode": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>",
"price": "<string>",
"compare_at_price": "<string>",
"cost_per_item": "<string>",
"inventory_quantity": 123,
"inventory_policy": "<string>",
"low_stock_threshold": 123,
"weight": "<string>",
"weight_unit": "<string>",
"requires_shipping": true,
"image_url": "<string>",
"available": true,
"is_low_stock": true,
"is_out_of_stock": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"track_inventory": true,
"total_inventory": 123,
"in_stock": true,
"status": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Dashboard
Remove Products From Collection
Remove products from a collection.
DELETE
/
api
/
dashboard
/
collections
/
{collection_id}
/
products
Remove Products From Collection
curl --request DELETE \
--url https://api.example.com/api/dashboard/collections/{collection_id}/products \
--header 'Content-Type: application/json' \
--data '
{
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.example.com/api/dashboard/collections/{collection_id}/products"
payload = { "product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {"Content-Type": "application/json"}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.example.com/api/dashboard/collections/{collection_id}/products', 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.example.com/api/dashboard/collections/{collection_id}/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/dashboard/collections/{collection_id}/products"
payload := strings.NewReader("{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
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.delete("https://api.example.com/api/dashboard/collections/{collection_id}/products")
.header("Content-Type", "application/json")
.body("{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/dashboard/collections/{collection_id}/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"type": "<string>",
"image_url": "<string>",
"sort_order": "<string>",
"published": true,
"published_at": "2023-11-07T05:31:56Z",
"products_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"products": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"vendor": "<string>",
"product_type": "<string>",
"tags": [
"<string>"
],
"price": "<string>",
"compare_at_price": "<string>",
"cost_per_item": "<string>",
"currency": "<string>",
"images": [
{}
],
"has_variants": true,
"options": [
{}
],
"variants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sku": "<string>",
"barcode": "<string>",
"option1": "<string>",
"option2": "<string>",
"option3": "<string>",
"price": "<string>",
"compare_at_price": "<string>",
"cost_per_item": "<string>",
"inventory_quantity": 123,
"inventory_policy": "<string>",
"low_stock_threshold": 123,
"weight": "<string>",
"weight_unit": "<string>",
"requires_shipping": true,
"image_url": "<string>",
"available": true,
"is_low_stock": true,
"is_out_of_stock": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"track_inventory": true,
"total_inventory": 123,
"in_stock": true,
"status": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
application/json
Schema for adding/removing products.
Response
Successful Response
Schema for collection with products.
Show child attributes
Show child attributes