Skip to main content
POST
/
v1
/
scraped-products
/
manage
/
categories
Create category
curl --request POST \
  --url http://localhost:3000/v1/scraped-products/manage/categories \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "is_active": true,
  "display_order": 0,
  "image_url": "<string>"
}
'
{
  "success": true,
  "category": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "description": "<string>",
    "is_active": true,
    "display_order": 123,
    "image_url": "<string>",
    "level": 123,
    "category_path": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

Body

application/json

Create category request

name
string
required

Category name

Required string length: 1 - 100
parent_id
string<uuid> | null

Parent category ID

description
string | null

Description

Maximum string length: 500
is_active
boolean
default:true

Is active

display_order
integer
default:0

Display order

image_url
string<uri> | null

Image URL

Response

Created category

Create category response

success
enum<boolean>
required
Available options:
true,
false
category
object
required

Category