Pricing Items
Overview
Pricing items form the global pricing catalog used across all bids. Each bid can override global pricing with bid-specific values.
Endpoints
List Pricing Items
- Request
- Response
GET /api/pricing/items
Cookie: sAccessToken=...; sRefreshToken=...
[
{
"id": "uuid",
"category": "Concrete",
"subcategory": "3000 PSI",
"partNumber": "MIX-3000",
"description": "3000 PSI Concrete Mix",
"unit": "CY",
"basePrice": 140.00,
"taxRate": 0.0825,
"totalPrice": 151.55,
"deliveryFee": 0.00,
"wastePercent": 5.0,
"isActive": true
},
...
]
Roles: ADMIN, ESTIMATOR, PM
List by Category
- Request
- Response
GET /api/pricing/items/Concrete
Cookie: sAccessToken=...; sRefreshToken=...
[
{
"id": "uuid",
"category": "Concrete",
"subcategory": "3000 PSI",
"description": "3000 PSI Concrete Mix",
"totalPrice": 151.55,
...
},
...
]
Roles: ADMIN, ESTIMATOR, PM
Categories:
ConcreteRebarLaborEquipmentMaterialRentalSubcontractor
Create Pricing Item
- Request
- Response
POST /api/pricing/items
Cookie: sAccessToken=...; sRefreshToken=...
Content-Type: application/json
{
"category": "Material",
"subcategory": "Lumber",
"partNumber": "LBR-2X4X8",
"description": "2x4x8 Lumber",
"unit": "EA",
"basePrice": 5.50,
"taxRate": 0.0825,
"deliveryFee": 0.00,
"wastePercent": 10.0,
"isActive": true
}
{
"id": "uuid",
"totalPrice": 5.95,
"message": "Pricing item created successfully"
}
Roles: ADMIN
Required Fields:
category(string) - Pricing categorydescription(string, unique) - Item descriptionunit(string) - Unit of measurebasePrice(number) - Base price before tax
Optional Fields:
subcategory(string)partNumber(string)taxRate(number, default: 0.0825)deliveryFee(number, default: 0)wastePercent(number, default: 0)isActive(boolean, default: true)
Update Pricing Item
- Request
- Response
PUT /api/pricing/items/:id
Cookie: sAccessToken=...; sRefreshToken=...
Content-Type: application/json
{
"basePrice": 6.00,
"taxRate": 0.0825
}
{
"id": "uuid",
"totalPrice": 6.50,
"message": "Pricing item updated successfully"
}
Roles: ADMIN
totalPrice is automatically recalculated when basePrice or taxRate changes.
Delete Pricing Item
- Request
- Response
DELETE /api/pricing/items/:id
Cookie: sAccessToken=...; sRefreshToken=...
{
"message": "Pricing item deleted successfully"
}
Roles: ADMIN
Cannot delete pricing items actively used in bids. Set isActive = false instead.
Bulk Update Pricing Items
- Request
- Response
PUT /api/pricing/bulk
Cookie: sAccessToken=...; sRefreshToken=...
Content-Type: application/json
{
"ids": ["uuid1", "uuid2", "uuid3"],
"updates": {
"taxRate": 0.0850,
"isActive": true
}
}
{
"updated": 3,
"message": "3 pricing items updated successfully"
}
Roles: ADMIN, ESTIMATOR
Update Fields:
Only provided fields in updates are applied:
basePricetaxRatedeliveryFeewastePercentisActive
Bulk Delete Pricing Items
- Request
- Response
DELETE /api/pricing/bulk
Cookie: sAccessToken=...; sRefreshToken=...
Content-Type: application/json
{
"ids": ["uuid1", "uuid2", "uuid3"]
}
{
"deleted": 3,
"message": "3 pricing items deleted successfully"
}
Roles: ADMIN
Bid-Specific Overrides
Get Bid Pricing Overrides
Bid-specific pricing overrides are returned with bid data:
{
"bid": {
"id": "uuid",
"bidNumber": "BID-2025-001",
...
},
"pricingOverrides": [
{
"id": "uuid",
"bidId": "uuid",
"category": "Concrete",
"subcategory": "3000 PSI",
"description": "3000 PSI Concrete Mix",
"basePrice": 150.00,
"taxRate": 0.0825,
"totalPrice": 162.38
},
...
]
}
Create Bid Pricing Override
Bid-specific pricing is managed implicitly when creating/updating items. To override global pricing for a specific bid, reference the global pricing item but provide custom values.
Data Model
// Global Pricing
interface PricingItem {
id: string // UUID
category: string // Pricing category
subcategory: string | null
partNumber: string | null
description: string // Unique
unit: string // Unit of measure
basePrice: number // Base price
taxRate: number // Tax rate (decimal)
totalPrice: number // Calculated (read-only)
deliveryFee: number
wastePercent: number
isActive: boolean
}
// Bid-Specific Override
interface BidPricingItem {
id: string
bidId: string // Bid UUID
category: string
subcategory: string | null
description: string
unit: string
basePrice: number
taxRate: number
totalPrice: number // Calculated (read-only)
wastePercent: number
}
Price Calculation
totalPrice = basePrice × (1 + taxRate)
Example:
- Base: $140.00
- Tax rate: 0.0825 (8.25%)
- Total: $140.00 × 1.0825 = $151.55