1. CATEGORY
Pai Shop
  • AUTH
    • register
      POST
    • login
      POST
    • profile info after login
      GET
    • logout
      POST
    • forgot password
      POST
    • reset password
      POST
  • PRODUCT
    • all product
      GET
    • product by slug
      GET
    • add product (admin)
      POST
    • add product image by id (admin)
      POST
    • update product by id (admin)
      PATCH
    • soft delete product by id (admin)
      DELETE
    • hard delete product by id (admin)
      DELETE
    • all trash (admin)
      GET
    • trash by id (admin)
      GET
    • restore trash (admin)
      PATCH
    • Sort by Price: Low to High
      GET
    • Sort by Name: A-Z
      GET
    • Find products within the price range of Rp 500,000 to Rp 1,500,000
      GET
    • Lowest price in a specific category and range
      GET
  • ORDER
    • stats order (admin)
    • all orders (admin)
    • orders history
    • orders history by orderNumber
    • add order
    • web hook (admin)
    • cancel order by id
    • update order status (admin)
    • soft delete orders (admin)
    • hard delete orders (admin)
    • all trash (admin)
    • trash by id (admin)
    • restore trash (admin)
    • Order History by status
    • orders by id (admin)
  • PROFILE
    • user profile
    • add address
    • update profile
    • update default address by id
    • hard delete address
  • USER
    • all users (admin)
    • detail user by id (admin)
    • edit user role by id (admin)
    • soft delete users (admin)
    • hard delete users (admin)
    • all trash (admin)
    • trash by id (admin)
    • restore trash (admin)
  • CATEGORY
    • all categories
      GET
    • categories by id
      GET
    • add categories (admin)
      POST
    • update categories by id (admin)
      PATCH
    • soft delete categories by id (admin)
      DELETE
    • hard delete categories by id (admin)
      DELETE
    • all trash categories (admin)
      GET
    • trash categories by id (admin)
      GET
    • restore trash categories by id (admin)
      PATCH
  • FAVORITE
    • all fav product
    • add/unadd fav product
  • HERO
    • hero banner stats
  • FAQ
    • all faqs for public
    • all faqs (admin)
    • faq by id
    • add faqs (admin)
    • edit faq by id
    • hard delete faq by id
  • COMPANY-CONTACT
    • company-contact info
    • edit company-contact
  1. CATEGORY

add categories (admin)

Developing
POST
/categories

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/categories' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Pakaian Pria",
  "description": "Koleksi kemeja, kaos, jaket, dan celana khusus untuk pria."
}'
Response Response Example
{
    "id": "b7c7994b-989d-48cd-8a03-98e8bb0bfb3a",
    "name": "Pakaian Pria",
    "description": "Koleksi kemeja, kaos, jaket, dan celana khusus untuk pria.",
    "createdAt": "2026-03-09T04:36:08.150Z",
    "updatedAt": "2026-03-09T04:36:08.150Z",
    "deletedAt": null
}
Modified at 2026-02-25 06:09:06
Previous
categories by id
Next
update categories by id (admin)
Built with