Categories
Update Category
Updates a category with partial data. Only provided fields are updated. If parent_id is omitted or null, the category becomes a root category
PATCH
/
api
/
v1
/
{team_slug}
/
{app_slug}
/
categories
/
{category_id}
Update Category
curl --request PATCH \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"childless": true,
"cover_id": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 1,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}"
payload = {
"childless": True,
"cover_id": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 1,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
childless: true,
cover_id: '<string>',
description: '<string>',
google_product_category_id: '<string>',
name: '<string>',
parent_id: '<string>',
seo: {meta_description: '<string>', meta_title: '<string>'},
slug: '<string>',
sort_order: 1,
translations: {
description: [{id: '<string>', locale: '<string>', value: '<string>'}],
meta_description: [{id: '<string>', locale: '<string>', value: '<string>'}],
meta_title: [{id: '<string>', locale: '<string>', value: '<string>'}],
name: [{id: '<string>', locale: '<string>', value: '<string>'}],
slug: [{id: '<string>', locale: '<string>', value: '<string>'}]
}
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_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://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_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([
'childless' => true,
'cover_id' => '<string>',
'description' => '<string>',
'google_product_category_id' => '<string>',
'name' => '<string>',
'parent_id' => '<string>',
'seo' => [
'meta_description' => '<string>',
'meta_title' => '<string>'
],
'slug' => '<string>',
'sort_order' => 1,
'translations' => [
'description' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'meta_description' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'meta_title' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'name' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'slug' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<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.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}"
payload := strings.NewReader("{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"children": "<array>",
"cover_url": "<string>",
"created_at": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"redirects": [
{
"id": "<string>",
"item_id": "<string>",
"locale": "<string>",
"new_slug": "<string>",
"old_slug": "<string>",
"type": "product"
}
],
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 123,
"status": "<string>",
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"uri": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}Authorizations
Management API token, sent as Authorization: Bearer <token>.
Path Parameters
App slug
Team slug
Category ID
Body
application/json
Category data
CoverID controls the category's cover image. When omitted, the cover is not changed. When set to a UUID, the image is validated and assigned. When set to null, the cover is removed.
related google product category in https://www.google.com/basepages/producttype/taxonomy-with-ids.en-US.txt
Show child attributes
Show child attributes
Required range:
x >= 0Available options:
active, draft, inactive Show child attributes
Show child attributes
⌘I
Update Category
curl --request PATCH \
--url https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"childless": true,
"cover_id": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 1,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}"
payload = {
"childless": True,
"cover_id": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 1,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
childless: true,
cover_id: '<string>',
description: '<string>',
google_product_category_id: '<string>',
name: '<string>',
parent_id: '<string>',
seo: {meta_description: '<string>', meta_title: '<string>'},
slug: '<string>',
sort_order: 1,
translations: {
description: [{id: '<string>', locale: '<string>', value: '<string>'}],
meta_description: [{id: '<string>', locale: '<string>', value: '<string>'}],
meta_title: [{id: '<string>', locale: '<string>', value: '<string>'}],
name: [{id: '<string>', locale: '<string>', value: '<string>'}],
slug: [{id: '<string>', locale: '<string>', value: '<string>'}]
}
})
};
fetch('https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_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://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_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([
'childless' => true,
'cover_id' => '<string>',
'description' => '<string>',
'google_product_category_id' => '<string>',
'name' => '<string>',
'parent_id' => '<string>',
'seo' => [
'meta_description' => '<string>',
'meta_title' => '<string>'
],
'slug' => '<string>',
'sort_order' => 1,
'translations' => [
'description' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'meta_description' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'meta_title' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'name' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<string>'
]
],
'slug' => [
[
'id' => '<string>',
'locale' => '<string>',
'value' => '<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.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}"
payload := strings.NewReader("{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enad.io/api/v1/{team_slug}/{app_slug}/categories/{category_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"childless\": true,\n \"cover_id\": \"<string>\",\n \"description\": \"<string>\",\n \"google_product_category_id\": \"<string>\",\n \"name\": \"<string>\",\n \"parent_id\": \"<string>\",\n \"seo\": {\n \"meta_description\": \"<string>\",\n \"meta_title\": \"<string>\"\n },\n \"slug\": \"<string>\",\n \"sort_order\": 1,\n \"translations\": {\n \"description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_description\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"meta_title\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"name\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"slug\": [\n {\n \"id\": \"<string>\",\n \"locale\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": [
{
"created_at": "<string>",
"description": "<string>",
"filterable": true,
"id": "<string>",
"key": "<string>",
"name": "<string>",
"template_key": "<string>",
"template_name": "<string>",
"translatable": true,
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"values": {}
}
],
"children": "<array>",
"cover_url": "<string>",
"created_at": "<string>",
"description": "<string>",
"google_product_category_id": "<string>",
"id": "<string>",
"name": "<string>",
"parent_id": "<string>",
"redirects": [
{
"id": "<string>",
"item_id": "<string>",
"locale": "<string>",
"new_slug": "<string>",
"old_slug": "<string>",
"type": "product"
}
],
"seo": {
"meta_description": "<string>",
"meta_title": "<string>"
},
"slug": "<string>",
"sort_order": 123,
"status": "<string>",
"translations": {
"description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_description": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"meta_title": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"name": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
],
"slug": [
{
"id": "<string>",
"locale": "<string>",
"value": "<string>"
}
]
},
"updated_at": "<string>",
"uri": "<string>"
},
"success": true,
"details": [
"<string>"
]
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}{
"success": true,
"details": [
"<string>"
],
"message": "<string>"
}