Delete Collection
curl --request DELETE \
--url https://api.launchmystore.io/api/v1/collections/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/collections/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/collections/{id}.json', 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.launchmystore.io/api/v1/collections/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.launchmystore.io/api/v1/collections/{id}.json"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.launchmystore.io/api/v1/collections/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/collections/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {}
}Collections
Delete Collection
Delete a collection
DELETE
/
api
/
v1
/
collections
/
{id}
.json
Delete Collection
curl --request DELETE \
--url https://api.launchmystore.io/api/v1/collections/{id}.json \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.launchmystore.io/api/v1/collections/{id}.json"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.launchmystore.io/api/v1/collections/{id}.json', 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.launchmystore.io/api/v1/collections/{id}.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.launchmystore.io/api/v1/collections/{id}.json"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.launchmystore.io/api/v1/collections/{id}.json")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.launchmystore.io/api/v1/collections/{id}.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": 123,
"state": "<string>",
"message": "<string>",
"data": {}
}Delete Collection
Permanently deletes a collection. This action cannot be undone. Products in the collection are not deleted, only their association with the collection is removed.Request
curl -X DELETE "https://api.launchmystore.io/api/v1/collections/col_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.launchmystore.io/api/v1/collections/col_abc123.json', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
Path Parameters
string
required
The unique collection ID to delete
Response
Returns the standard response envelope confirming deletion.integer
HTTP status code
string
Result state, e.g.
successstring
Human-readable confirmation message
object
Not populated for this endpoint
Example Response
{
"status": 200,
"state": "success",
"message": "Collection deleted successfully",
"data": null
}
Notes
- Deleting a collection does not delete the products in it
- Products are simply disassociated from the collection
- Navigation menu links pointing to this collection will become broken
Errors
On failure the same envelope is returned withstate: "error" and a message:
{
"status": 404,
"state": "error",
"message": "Collection not found",
"data": null
}
| Status | Condition |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have write_products scope |
404 | Collection with the specified ID does not exist |