Delete a Location Group
Deletes the location group with this identifier. The request has no body. A location group that is still assigned can be deleted: locations assigned to the group are kept and are no longer assigned to a group. The identifier can be used again afterwards.
curl -X DELETE "https://connect.wholechain.com/Integration/LocationGroup/GROUP-001" \
-H "Content-Type: application/json" \
-H "X-API-KEY: example_string" \
-H "accept: */*"
import requests
import json
url = "https://connect.wholechain.com/Integration/LocationGroup/GROUP-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/LocationGroup/GROUP-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/LocationGroup/GROUP-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/LocationGroup/GROUP-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": "Location group not found: GROUP-001",
"status": 404,
"traceId": "…"
}
/Integration/LocationGroup/{identifier}Target server for requests. Edit to use your own host.
The identifier of the location 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 location group from Wholechain.
Provide the identifier of the location group in the URL path.
To manage location groups in the Wholechain app, see Location Groups.
Endpoint
| Method | URL |
|---|---|
DELETE | https://connect.wholechain.com/Integration/LocationGroup/{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 location group to delete. | Yes |
This endpoint has no request body.
Example Request
DELETE https://connect.wholechain.com/Integration/LocationGroup/GROUP-001
X-API-KEY: YOUR_API_KEY
cURL
curl -X 'DELETE' \
'https://connect.wholechain.com/Integration/LocationGroup/GROUP-001' \
-H 'accept: */*' \
-H 'X-API-KEY: YOUR_API_KEY'
Responses
204 — No Content
The location group is deleted. The response has no body.
404 — Not Found
No location group with this identifier exists, for example because it was already deleted.
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.5",
"title": "Location group not found: GROUP-001",
"status": 404,
"traceId": "<trace-id>"
}
Important Notes
- The request has no body.
- You can delete a location group that is still assigned to locations. The locations are kept and are no longer assigned to a group.
- After a location group is deleted, its
identifiercan be used again to create a new one. - To create a location group, see Create a Location Group.