← Back to API Reference
/product_categories
Tag: product_categories
getSport/activity categories for products (e.g. Baseball, Basketball)
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
value | query | string | — | — | Unique code/slug used by products.category (e.g. baseball, basketball) |
label | query | string | — | — | Display name (e.g. Baseball, Basketball) |
icon | query | string | — | — | URL path to category icon image |
is_active | query | string | — | — | Whether the category is active/enabled |
sort_order | query | string | — | — | Display order for sorting |
created_by | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
deleted_at | query | string | — | — | Soft delete timestamp |
select | query | string | — | — | Filtering Columns |
order | query | string | — | — | Ordering |
Range | header | string | — | — | Limiting and Pagination |
Range-Unit | header | string | — | — | Limiting and Pagination |
offset | query | string | — | — | Limiting and Pagination |
limit | query | string | — | — | Limiting and Pagination |
Prefer | header | string | — | — | Preference |
Example
bash
curl "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_categories?select=*&limit=10" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
200OK
206Partial Content
postSport/activity categories for products (e.g. Baseball, Basketball)
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
product_categories | body | object | — | — | product_categories |
select | query | string | — | — | Filtering Columns |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_categories" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{
"value": "example",
"label": "example",
"is_active": true,
"sort_order": 0
}'Responses
201Created
patchSport/activity categories for products (e.g. Baseball, Basketball)
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
value | query | string | — | — | Unique code/slug used by products.category (e.g. baseball, basketball) |
label | query | string | — | — | Display name (e.g. Baseball, Basketball) |
icon | query | string | — | — | URL path to category icon image |
is_active | query | string | — | — | Whether the category is active/enabled |
sort_order | query | string | — | — | Display order for sorting |
created_by | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
deleted_at | query | string | — | — | Soft delete timestamp |
product_categories | body | object | — | — | product_categories |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X PATCH "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_categories?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: return=representation" \
-d '{"value": "example"}'Responses
204No Content
deleteSport/activity categories for products (e.g. Baseball, Basketball)
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
value | query | string | — | — | Unique code/slug used by products.category (e.g. baseball, basketball) |
label | query | string | — | — | Display name (e.g. Baseball, Basketball) |
icon | query | string | — | — | URL path to category icon image |
is_active | query | string | — | — | Whether the category is active/enabled |
sort_order | query | string | — | — | Display order for sorting |
created_by | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
deleted_at | query | string | — | — | Soft delete timestamp |
Prefer | header | string | — | — | Preference |
Example
bash
curl -X DELETE "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_categories?id=eq.YOUR_ID" \
-H "apikey: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Responses
204No Content
Schema
Sport/activity categories for products (e.g. Baseball, Basketball)
| Column | Type | Format | Nullable | Default | Notes |
|---|---|---|---|---|---|
idPK | string | uuid | — | extensions.uuid_generate_v4() | This is a Primary Key. |
value | string | text | — | — | Unique code/slug used by products.category (e.g. baseball, basketball) |
label | string | text | — | — | Display name (e.g. Baseball, Basketball) |
icon | string | text | ✓ | — | URL path to category icon image |
is_active | boolean | boolean | — | Whether the category is active/enabled | |
sort_order | integer | integer | — | 0 | Display order for sorting |
created_by | string | uuid | ✓ | — | — |
created_at | string | timestamp with time zone | ✓ | now() | — |
updated_at | string | timestamp with time zone | ✓ | now() | — |
deleted_at | string | timestamp with time zone | ✓ | — | Soft delete timestamp |