Update Category
curl --request PATCH \
--url https://qwoty.app/api/categories/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"is_active": true,
"parent_category_id": "<string>"
}
'import requests
url = "https://qwoty.app/api/categories/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"is_active": True,
"parent_category_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
is_active: true,
parent_category_id: '<string>'
})
};
fetch('https://qwoty.app/api/categories/{id}', 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://qwoty.app/api/categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'is_active' => true,
'parent_category_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/categories/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://qwoty.app/api/categories/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"workspace_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Updated Electronics",
"api_name": "electronics",
"description": "Updated description for electronics",
"is_active": false,
"parent_category_id": null,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-06-03T14:30:00Z"
}
}
Categories
Update Category
Update an existing product category
PATCH
/
api
/
categories
/
{id}
Update Category
curl --request PATCH \
--url https://qwoty.app/api/categories/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"is_active": true,
"parent_category_id": "<string>"
}
'import requests
url = "https://qwoty.app/api/categories/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"is_active": True,
"parent_category_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
is_active: true,
parent_category_id: '<string>'
})
};
fetch('https://qwoty.app/api/categories/{id}', 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://qwoty.app/api/categories/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'is_active' => true,
'parent_category_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/categories/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://qwoty.app/api/categories/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/categories/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_active\": true,\n \"parent_category_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"workspace_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Updated Electronics",
"api_name": "electronics",
"description": "Updated description for electronics",
"is_active": false,
"parent_category_id": null,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-06-03T14:30:00Z"
}
}
Authorization
string
required
Bearer token for authentication. Format:
Bearer qwoty_your_tokenPath Parameters
string
required
Category UUID
Request Body
All fields are optional. Only provided fields will be updated.string
Category name
string
Category description
boolean
Active status
string
UUID of parent category for hierarchical organization. Set to
null to remove
parent.The
api_name field is immutable and cannot be updated after creation.Examples
curl -X PATCH https://qwoty.app/api/categories/550e8400-e29b-41d4-a716-446655440001 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Electronics",
"description": "Updated description for electronics",
"is_active": false
}'
curl -X PATCH https://qwoty.app/api/categories/550e8400-e29b-41d4-a716-446655440002 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"parent_category_id": "550e8400-e29b-41d4-a716-446655440001"
}'
const categoryId = '550e8400-e29b-41d4-a716-446655440001'
const response = await fetch(`https://qwoty.app/api/categories/${categoryId}`, {
method: 'PATCH',
headers: {
Authorization: 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Updated Electronics',
description: 'Updated description for electronics',
is_active: false,
}),
})
const data = await response.json()
import requests
category_id = '550e8400-e29b-41d4-a716-446655440001'
response = requests.patch(
f'https://qwoty.app/api/categories/{category_id}',
headers={
'Authorization': 'Bearer qwoty_your_token',
'Content-Type': 'application/json'
},
json={
'name': 'Updated Electronics',
'description': 'Updated description for electronics',
'is_active': False
}
)
data = response.json()
Response
boolean
Indicates whether the request was successful
object
Updated category object
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"workspace_id": "660e8400-e29b-41d4-a716-446655440000",
"name": "Updated Electronics",
"api_name": "electronics",
"description": "Updated description for electronics",
"is_active": false,
"parent_category_id": null,
"created_at": "2026-01-15T10:00:00Z",
"updated_at": "2026-06-03T14:30:00Z"
}
}
Error Responses
{
"success": false,
"error": "Category not found"
}
{
"success": false,
"error": "Validation error",
"details": ["Field 'api_name' is required when creating a category"]
}
Was this page helpful?
⌘I

