← Back to API Reference

/product_categories

Tag: product_categories

getSport/activity categories for products (e.g. Baseball, Basketball)

Parameters

NameInTypeFormatRequiredDescription
idquerystring
valuequerystringUnique code/slug used by products.category (e.g. baseball, basketball)
labelquerystringDisplay name (e.g. Baseball, Basketball)
iconquerystringURL path to category icon image
is_activequerystringWhether the category is active/enabled
sort_orderquerystringDisplay order for sorting
created_byquerystring
created_atquerystring
updated_atquerystring
deleted_atquerystringSoft delete timestamp
selectquerystringFiltering Columns
orderquerystringOrdering
RangeheaderstringLimiting and Pagination
Range-UnitheaderstringLimiting and Pagination
offsetquerystringLimiting and Pagination
limitquerystringLimiting and Pagination
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
product_categoriesbodyobjectproduct_categories
selectquerystringFiltering Columns
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
idquerystring
valuequerystringUnique code/slug used by products.category (e.g. baseball, basketball)
labelquerystringDisplay name (e.g. Baseball, Basketball)
iconquerystringURL path to category icon image
is_activequerystringWhether the category is active/enabled
sort_orderquerystringDisplay order for sorting
created_byquerystring
created_atquerystring
updated_atquerystring
deleted_atquerystringSoft delete timestamp
product_categoriesbodyobjectproduct_categories
PreferheaderstringPreference

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

NameInTypeFormatRequiredDescription
idquerystring
valuequerystringUnique code/slug used by products.category (e.g. baseball, basketball)
labelquerystringDisplay name (e.g. Baseball, Basketball)
iconquerystringURL path to category icon image
is_activequerystringWhether the category is active/enabled
sort_orderquerystringDisplay order for sorting
created_byquerystring
created_atquerystring
updated_atquerystring
deleted_atquerystringSoft delete timestamp
PreferheaderstringPreference

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)

ColumnTypeFormatNullableDefaultNotes
idPK
stringuuidextensions.uuid_generate_v4()This is a Primary Key.
value
stringtextUnique code/slug used by products.category (e.g. baseball, basketball)
label
stringtextDisplay name (e.g. Baseball, Basketball)
icon
stringtextURL path to category icon image
is_active
booleanbooleanWhether the category is active/enabled
sort_order
integerinteger0Display order for sorting
created_by
stringuuid
created_at
stringtimestamp with time zonenow()
updated_at
stringtimestamp with time zonenow()
deleted_at
stringtimestamp with time zoneSoft delete timestamp