Update Collection
curl --request PUT \
--url https://api.launchmystore.io/api/v1/collections/{id}.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"image": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/collections/{id}.json"
payload = {
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"image": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
handle: '<string>',
image: '<string>'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'description' => '<string>',
'handle' => '<string>',
'image' => '<string>'
]),
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.launchmystore.io/api/v1/collections/{id}.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.launchmystore.io/api/v1/collections/{id}.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"collection": {}
}Collections
Update Collection
Update an existing collection
PUT
/
api
/
v1
/
collections
/
{id}
.json
Update Collection
curl --request PUT \
--url https://api.launchmystore.io/api/v1/collections/{id}.json \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"image": "<string>"
}
'import requests
url = "https://api.launchmystore.io/api/v1/collections/{id}.json"
payload = {
"title": "<string>",
"description": "<string>",
"handle": "<string>",
"image": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
description: '<string>',
handle: '<string>',
image: '<string>'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'description' => '<string>',
'handle' => '<string>',
'image' => '<string>'
]),
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.launchmystore.io/api/v1/collections/{id}.json"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.launchmystore.io/api/v1/collections/{id}.json")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}")
.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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"handle\": \"<string>\",\n \"image\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"collection": {}
}Update Collection
Updates an existing collection. Only provided fields are updated. Requires thewrite_products scope.
Request
curl -X PUT "https://api.launchmystore.io/api/v1/collections/col_abc123.json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Summer Collection 2024",
"description": "<p>Updated summer styles for 2024.</p>",
"handle": "summer-collection-2024"
}'
const response = await fetch('https://api.launchmystore.io/api/v1/collections/col_abc123.json', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Summer Collection 2024',
description: '<p>Updated summer styles for 2024.</p>',
handle: 'summer-collection-2024'
})
});
Path Parameters
string
required
The unique collection ID to update
Body Parameters
All parameters are optional. Only the four fields below are applied; any other field in the request body is accepted but ignored.string
The collection title
string
Collection description (supports HTML). This is the field that updates the
collection body — it is returned as
body_html (and description) on read.string
URL-safe handle
string
URL of the collection featured image. Pass
null to remove.Response
The response is a bare object keyed bycollection containing the updated
collection object (the same shape returned by the read
endpoints). There is no { status, data } envelope.
object
The updated collection object
Example Response
{
"collection": {
"id": "col_abc123",
"handle": "summer-collection-2024",
"title": "Summer Collection 2024",
"body_html": "<p>Updated summer styles for 2024.</p>",
"description": "<p>Updated summer styles for 2024.</p>",
"published_at": "2024-03-01T10:00:00Z",
"updated_at": "2024-03-20T09:15:00Z",
"sort_order": "manual",
"template_suffix": null,
"products_count": 12,
"collection_type": "custom",
"published_scope": "web",
"image": {
"src": "https://cdn.launchmystore.io/images/summer-banner.jpg",
"alt": "Summer Collection 2024",
"width": 1200,
"height": 1200,
"created_at": "2024-03-01T10:00:00Z"
},
"url": "/collections/summer-collection-2024"
}
}
Errors
Errors are returned as a standard{ "errors": { "base": ["..."] } } body
with the corresponding HTTP status code.
| Status | Description |
|---|---|
401 | Invalid or missing access token |
403 | App doesn’t have the write_products scope |
404 | Collection with the specified ID does not exist |