Delete a Product Item Group
Deletes the product item group with this identifier. The request has no body. A product item group that is still assigned can be deleted: products assigned to the item group are kept.
curl -X DELETE "https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001" \
-H "Content-Type: application/json" \
-H "X-API-KEY: example_string" \
-H "accept: */*"
import requests
import json
url = "https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001"
headers = {
"Content-Type": "application/json",
"X-API-KEY": "example_string",
"accept": "*/*"
}
response = requests.delete(url, headers=headers)
print(response.json())
const response = await fetch("https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001", {
method: "DELETE",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "example_string",
"accept": "*/*"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("DELETE", "https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-KEY", "example_string")
req.Header.Set("accept", "*/*")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-KEY'] = 'example_string'
request['accept'] = '*/*'
response = http.request(request)
puts response.body
{}
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Product item group not found: ITEMGROUP-001",
"status": 404,
"traceId": "…"
}
/Integration/ItemGroup/{identifier}Target server for requests. Edit to use your own host.
The identifier of the product item group to delete.
Your Wholechain API key.
Response content type.
Request Preview
Response
Response will appear here after sending the request
Responses
Introduction
This API deletes a product item group from Wholechain.
Provide the identifier of the product item group in the URL path.
To manage item groups in the Wholechain app, see Trade Item Groups.
Endpoint
| Method | URL |
|---|---|
DELETE | https://connect.wholechain.com/Integration/ItemGroup/{identifier} |
Request Headers
| Header | Description | Example Value |
|---|---|---|
X-API-KEY | Your Wholechain API key. | <YOUR_API_KEY> |
accept | Response content type. | */* |
Path Parameters
| Parameter | Data Type | Description | Required |
|---|---|---|---|
identifier | STRING | The identifier of the product item group to delete. | Yes |
This endpoint has no request body.
Example Request
DELETE https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001
X-API-KEY: YOUR_API_KEY
cURL
curl -X 'DELETE' \
'https://connect.wholechain.com/Integration/ItemGroup/ITEMGROUP-001' \
-H 'accept: */*' \
-H 'X-API-KEY: YOUR_API_KEY'
Responses
204 — No Content
The product item group is deleted. The response has no body.
404 — Not Found
No product item group with this identifier exists, for example because it was already deleted.
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Product item group not found: ITEMGROUP-001",
"status": 404,
"traceId": "<trace-id>"
}
Important Notes
- The request has no body.
- You can delete a product item group that is still assigned to products. The products are kept.
- To create a product item group, see Create a Product Item Group.