← Back to API Reference
/product_element_rules
Tag: product_element_rules
getJunction table linking customization elements to products with per-product overrides
Parameters
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
product_id | query | string | — | — | — |
element_id | query | string | — | — | — |
is_enabled | query | string | — | — | — |
is_required | query | string | — | — | — |
allowed_placements | query | string | — | — | — |
default_placement | query | string | — | — | — |
style_overrides | query | string | — | — | — |
sort_order | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
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_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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
product_element_rules | body | object | — | — | product_element_rules |
select | query | string | — | — | Filtering Columns |
Prefer | header | string | — | — | Preference |
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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
product_id | query | string | — | — | — |
element_id | query | string | — | — | — |
is_enabled | query | string | — | — | — |
is_required | query | string | — | — | — |
allowed_placements | query | string | — | — | — |
default_placement | query | string | — | — | — |
style_overrides | query | string | — | — | — |
sort_order | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
product_element_rules | body | object | — | — | product_element_rules |
Prefer | header | string | — | — | Preference |
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
| Name | In | Type | Format | Required | Description |
|---|---|---|---|---|---|
id | query | string | — | — | — |
product_id | query | string | — | — | — |
element_id | query | string | — | — | — |
is_enabled | query | string | — | — | — |
is_required | query | string | — | — | — |
allowed_placements | query | string | — | — | — |
default_placement | query | string | — | — | — |
style_overrides | query | string | — | — | — |
sort_order | query | string | — | — | — |
created_at | query | string | — | — | — |
updated_at | query | string | — | — | — |
Prefer | header | string | — | — | Preference |
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
| Column | Type | Format | Nullable | Default | Notes |
|---|---|---|---|---|---|
idPK | string | uuid | — | extensions.uuid_generate_v4() | This is a Primary Key. |
product_id | string | uuid | — | — | FK → products.id |
element_id | string | uuid | — | — | FK → customization_elements.id |
is_enabled | boolean | boolean | — | — | |
is_required | boolean | boolean | — | — | |
allowed_placements | array | text[] | ✓ | — | — |
default_placement | string | text | ✓ | — | — |
style_overrides | object | jsonb | — | — | — |
sort_order | integer | integer | — | 0 | — |
created_at | string | timestamp with time zone | ✓ | now() | — |
updated_at | string | timestamp with time zone | ✓ | now() | — |