- Getting Started
- Auth
- Carts
- Create Payment SessionsPOST
- Update a Payment SessionPOST
- Delete a Payment SessionDELETE
- Create a CartPOST
- Get a CartGET
- Update a CartPOST
- Remove DiscountDELETE
- Add a Line ItemPOST
- Update a Line ItemPOST
- Delete a Line ItemDELETE
- Select a Payment SessionPOST
- Refresh a Payment SessionPOST
- Add Shipping MethodPOST
- Calculate Cart TaxesPOST
- Complete a CartPOST
- Customers
- Gift Cards
- Orders
- Order Edits
- Payment Collections
- Products
- Product Variants
- Product Categories
- Product Collections
- Product Tags
- Product Types
- Regions
- Returns
- Return Reasons
- Shipping Options
- Swaps
Get a Product Category
GET
/store/product-categories/{id}
Product Categories
Request
Path Params
id
string
required
Query Params
fields
string
optional
expand
string
optional
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.medusa-commerce.com/store/product-categories/'
Responses
🟢200OK
application/json
Body
The product category's details.
product_category
object (Product Category)
required
id
string
required
Example:
pcat_01G2SG30J8C85S4A5CHM2S1NS2
name
string
required
Example:
Regular Fit
description
string
optional
Default:
handle
string
required
Example:
regular-fit
mpath
string | null
required
Example:
pcat_id1.pcat_id2.pcat_id3
is_internal
boolean
required
Default:
false
is_active
boolean
required
Default:
false
rank
integer
optional
Default:
0
parent_category_id
string | null
required
Default:
null
parent_category
object | null
optional
created_at
string <date-time>
required
updated_at
string <date-time>
required
category_children
array [object]
required
products
array [object]
optional
metadata
object | null
required
Example:
{"car":"white"}
Example
{
"product_category": {
"id": "pcat_01G2SG30J8C85S4A5CHM2S1NS2",
"name": "Regular Fit",
"description": "",
"handle": "regular-fit",
"mpath": "pcat_id1.pcat_id2.pcat_id3",
"is_internal": false,
"is_active": false,
"rank": 0,
"parent_category_id": null,
"parent_category": {},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"category_children": [
{}
],
"products": [
{}
],
"metadata": {
"car": "white"
}
}
}
🟠400Client Error or Multiple Errors
🟠401User is not authorized. Must log in first
🟠404Not Found Error
🟠409Invalid State Error
🟠422Invalid Request Error
🔴500Server Error
Modified at 2024-01-06 03:57:20