← Back to API Reference

/quote_revisions

Tag: quote_revisions

getAudit trail for quote changes — status updates, design updates, cancellations

Parameters

NameInTypeFormatRequiredDescription
idquerystring
quote_idquerystringFK to the quote being revised
revision_numberquerystringSequential revision counter per quote
changed_byquerystringThe user who triggered the change
change_typequerystringType of change: status_change, customization_update, cancellation
change_summaryquerystringStructured diff of what changed (field-level before/after)
previous_statusquerystringQuote status before the change
new_statusquerystringQuote status after the change
previous_snapshotquerystringFull customization JSONB before a design update (only for customization_update)
created_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/quote_revisions?select=*&limit=10" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Responses

200OK
206Partial Content

postAudit trail for quote changes — status updates, design updates, cancellations

Parameters

NameInTypeFormatRequiredDescription
quote_revisionsbodyobjectquote_revisions
selectquerystringFiltering Columns
PreferheaderstringPreference

Example

bash
curl -X POST "https://szkofkgbqogzlbqtcrke.supabase.co/rest/v1/quote_revisions" \
  -H "apikey: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Prefer: return=representation" \
  -d '{
  "quote_id": "00000000-0000-0000-0000-000000000000",
  "revision_number": 0,
  "change_type": "example",
  "change_summary": {}
}'

Responses

201Created

patchAudit trail for quote changes — status updates, design updates, cancellations

Parameters

NameInTypeFormatRequiredDescription
idquerystring
quote_idquerystringFK to the quote being revised
revision_numberquerystringSequential revision counter per quote
changed_byquerystringThe user who triggered the change
change_typequerystringType of change: status_change, customization_update, cancellation
change_summaryquerystringStructured diff of what changed (field-level before/after)
previous_statusquerystringQuote status before the change
new_statusquerystringQuote status after the change
previous_snapshotquerystringFull customization JSONB before a design update (only for customization_update)
created_atquerystring
quote_revisionsbodyobjectquote_revisions
PreferheaderstringPreference

Example

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

Responses

204No Content

deleteAudit trail for quote changes — status updates, design updates, cancellations

Parameters

NameInTypeFormatRequiredDescription
idquerystring
quote_idquerystringFK to the quote being revised
revision_numberquerystringSequential revision counter per quote
changed_byquerystringThe user who triggered the change
change_typequerystringType of change: status_change, customization_update, cancellation
change_summaryquerystringStructured diff of what changed (field-level before/after)
previous_statusquerystringQuote status before the change
new_statusquerystringQuote status after the change
previous_snapshotquerystringFull customization JSONB before a design update (only for customization_update)
created_atquerystring
PreferheaderstringPreference

Example

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

Responses

204No Content

Schema

Audit trail for quote changes — status updates, design updates, cancellations

ColumnTypeFormatNullableDefaultNotes
idPK
stringuuidextensions.uuid_generate_v4()This is a Primary Key.
quote_id
stringuuidFK → quotes.id
revision_number
integerinteger1Sequential revision counter per quote
changed_by
stringuuidThe user who triggered the change
change_type
stringtextType of change: status_change, customization_update, cancellation
change_summary
objectjsonbStructured diff of what changed (field-level before/after)
previous_status
stringtextQuote status before the change
new_status
stringtextQuote status after the change
previous_snapshot
objectjsonbFull customization JSONB before a design update (only for customization_update)
created_at
stringtimestamp with time zonenow()