← Back to API Reference

/product_element_rules

Tag: product_element_rules

getJunction table linking customization elements to products with per-product overrides

Parameters

NameInTypeFormatRequiredDescription
idquerystring
product_idquerystring
element_idquerystring
is_enabledquerystring
is_requiredquerystring
allowed_placementsquerystring
default_placementquerystring
style_overridesquerystring
sort_orderquerystring
created_atquerystring
updated_atquerystring
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_element_rules?select=*&limit=10" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

200OK
206Partial Content

postJunction table linking customization elements to products with per-product overrides

Parameters

NameInTypeFormatRequiredDescription
product_element_rulesbodyobjectproduct_element_rules
selectquerystringFiltering Columns
PreferheaderstringPreference

Example

bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_element_rules" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
  "product_id": "00000000-0000-0000-0000-000000000000",
  "element_id": "00000000-0000-0000-0000-000000000000",
  "is_enabled": true,
  "is_required": true,
  "style_overrides": {}
}'

Responses

201Created

patchJunction table linking customization elements to products with per-product overrides

Parameters

NameInTypeFormatRequiredDescription
idquerystring
product_idquerystring
element_idquerystring
is_enabledquerystring
is_requiredquerystring
allowed_placementsquerystring
default_placementquerystring
style_overridesquerystring
sort_orderquerystring
created_atquerystring
updated_atquerystring
product_element_rulesbodyobjectproduct_element_rules
PreferheaderstringPreference

Example

bash
curl -X PATCH "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_element_rules?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 '{"product_id": "00000000-0000-0000-0000-000000000000"}'

Responses

204No Content

deleteJunction table linking customization elements to products with per-product overrides

Parameters

NameInTypeFormatRequiredDescription
idquerystring
product_idquerystring
element_idquerystring
is_enabledquerystring
is_requiredquerystring
allowed_placementsquerystring
default_placementquerystring
style_overridesquerystring
sort_orderquerystring
created_atquerystring
updated_atquerystring
PreferheaderstringPreference

Example

bash
curl -X DELETE "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/product_element_rules?id=eq.YOUR_ID" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

204No Content

Schema

Junction table linking customization elements to products with per-product overrides

ColumnTypeFormatNullableDefaultNotes
idPK
stringuuidextensions.uuid_generate_v4()This is a Primary Key.
product_id
stringuuidFK → products.id
element_id
stringuuidFK → customization_elements.id
is_enabled
booleanboolean
is_required
booleanboolean
allowed_placements
arraytext[]
default_placement
stringtext
style_overrides
objectjsonb
sort_order
integerinteger0
created_at
stringtimestamp with time zonenow()
updated_at
stringtimestamp with time zonenow()