Skip to main content

Get All Categories

This endpoint retrieves a list of all categories and its children.

Path

get

/inventory/v1/fs/:fs_id/product/category

Request Parameters

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
keyword
String
Optional
query
Keyword or Product Name to get recommended category. Leave it blank to get full categories

Example Request

curl -X GET \
https://fs.tokopedia.net/inventory/v1/fs/13004/product/category?keyword=Tas%20Sekolah%20Anak \
-H 'Authorization: Bearer OoHgyxcgQ5a1uCbmbbXjjA'

Response Parameters

Response Parameters Without Using keyword

NameTypeDemo ValueDescription
categories
Array Object

Response Parameters Using keyword = "tas anak"

NameTypeDemo ValueDescription
categories
Array Object

Success Response Examples

Example of success response without using keyword

{
"header": {
"process_time": 0.184012578,
"messages": "",
"reason": "",
"error_code": 0
},
"data": {
"categories": [
{
"Name": "Fashion Wanita",
"id": "1758",
"child": [
{
"Name": "Atasan",
"id": "1768",
"child": [
{
"Name": "Polo Shirt",
"id": "1774"
},
{
"Name": "Blouse",
"id": "1771"
},
{
"Name": "Kaos",
"id": "1769"
},
{
"Name": "Kemeja",
"id": "1770"
},
{
"Name": "Tank Top",
"id": "1772"
},
{
"Name": "Crop Top",
"id": "1773"
}
]
},
{
"Name": "Celana",
"id": "1775",
"child": [
{
"Name": "Legging",
"id": "1781"
},
{
"Name": "Celana Crop",
"id": "1779"
},
{
"Name": "Hot Pants",
"id": "1776"
},
{
"Name": "Celana Jeans",
"id": "1778"
},
{
"Name": "Celana Panjang",
"id": "1780"
},
{
"Name": "Celana Pendek",
"id": "1777"
}
]
}
]
}
]
}
}

Example of success response using keyword

{
"header": {
"process_time": 0.374549464,
"messages": "Successfully Retrieve Category",
"reason": "",
"error_code": 0
},
"data": {
"categories": [
{
"Name": "fashion-anak / Tas Anak / Tas Backpack Anak",
"id": "1979"
},
{
"Name": "fashion-anak / Tas Anak / Tas Selempang Anak",
"id": "1978"
},
{
"Name": "fashion-anak / Tas Anak / Tas Koper Anak",
"id": "1980"
}
]
}
}

Error Response Examples

<html>
<head>
<title>401 Authorization Required</title>
</head>
<body bgcolor="white">
<center>
<h1>401 Authorization Required</h1>
</center>
<hr>
<center>nginx</center>
</body>
</html>

Error Codes

  • Path
  • Request Parameters
  • Example Request
  • Response Parameters
  • Success Response Examples
  • Error Response Examples
  • Error Codes
  • Have a feedback?