PUT
/
api
/
pricing-settings
Update Pricing Settings
curl --request PUT \
  --url https://api.example.com/api/pricing-settings \
  --header 'Content-Type: application/json' \
  --data '
{
  "glassPrices": {},
  "holePriceEach": 123,
  "notchPrice": 123
}
'
Updates the singleton pricing settings document. Only the fields you include will be changed — omitted fields are left untouched. Requires admin or manager role. After a successful update, the server emits a pricing:updated WebSocket event to all clients in the pricing room.

Request Body

glassPrices
object
Nested map of glass type → thickness → pricing. Each entry must have pricePerSqFt (number, min 0) and grindingRate. grindingRate accepts either a single number (legacy) or an object keyed by grinding type.Number format (legacy):
{
  "Clear": {
    "5mm": { "pricePerSqFt": 55, "grindingRate": 50 }
  }
}
Object format (recommended):
{
  "Clear": {
    "5mm": { "pricePerSqFt": 55, "grindingRate": { "rough": 50, "polished": 75 } },
    "6mm": { "pricePerSqFt": 60, "grindingRate": { "rough": 55, "polished": 80 } }
  }
}
holePriceEach
number
Price per hole. Must be ≥ 0.
notchPrice
number
Price per notch. Must be ≥ 0.

Response

Returns the full updated pricing settings object (same shape as GET).

WebSocket Side Effect

EventRoomPayload
pricing:updatedpricingThe full updated pricing settings object