Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/VisualGraphxLLC/API-HUB/llms.txt

Use this file to discover all available pages before exploring further.

The public quote endpoint returns the supplier’s base cost for a given product, variant, quantity, and — for print products — dimensions. No markup rules or storefront overrides are applied. This endpoint is safe to call directly from a storefront because it contains no business pricing data. The pricing engine dispatches on product_type: apparel products use the TieredVariantResolver (Net → Sale → MSRP → Case fallback chain), and print products use the FormulaResolver (base_price_per_sq_unit × width × height × area_factor + setup_cost).

POST /api/pricing/quote

curl -X POST https://your-hub.example.com/api/pricing/quote \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "variant_id": "d4e5f6a7-b8c9-0123-def0-234567890123",
    "qty": 24
  }'
Request body
product_id
string (UUID)
required
ID of the product to quote.
variant_id
string (UUID)
Specific variant (color × size) to quote. Required for apparel products. Omit for print products where dimensions drive the price.
qty
integer
required
Order quantity. Must be greater than 0. Used to resolve the tiered price band.
width
number
Print width in the product’s size_unit (usually inches). Required for product_type = "print". Must be ≥ 0 and within min_widthmax_width bounds.
height
number
Print height in the product’s size_unit. Required for product_type = "print". Must be ≥ 0 and within min_heightmax_height bounds.
selected_attribute_ids
string[] (UUID)
IDs of ProductOptionAttribute records selected by the customer (e.g., imprint location, ink colors). Attributes with a non-null multiplier contribute to the print formula’s area factor.
Response — 200 OKQuoteResult
unit_price
string (Decimal)
Per-unit cost at the resolved tier.
total
string (Decimal)
unit_price × qty.
currency
string
Always "USD".
breakdown
object
Type-specific pricing detail. Shape varies by product_type.
Apparel example
curl -X POST https://your-hub.example.com/api/pricing/quote \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "variant_id": "d4e5f6a7-b8c9-0123-def0-234567890123",
    "qty": 24
  }'
{
  "unit_price": "4.18",
  "total": "100.32",
  "currency": "USD",
  "breakdown": {
    "base": "4.58",
    "tier_match": {
      "group": "Net",
      "qty_band": "12–143",
      "tier_price": "4.18"
    },
    "qty": 24,
    "fallback": false
  }
}
Print example
curl -X POST https://your-hub.example.com/api/pricing/quote \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "e1f2a3b4-c5d6-7890-efab-012345678901",
    "width": 12,
    "height": 18,
    "qty": 50,
    "selected_attribute_ids": []
  }'
{
  "unit_price": "5.40",
  "total": "270.00",
  "currency": "USD",
  "breakdown": {
    "base": "0.025",
    "area": "216",
    "area_factor": "1.00",
    "option_multipliers": [],
    "setup_cost": "0",
    "qty": 50
  }
}

Error responses

StatusCondition
422 Unprocessable EntityDimensions outside the product’s min_width/max_width/min_height/max_height bounds (BoundsError)
422 Unprocessable EntityMissing pricing data for the variant — no base_price and no tier ladder (MissingPricingDataError)
404 Not FoundProduct not found (MissingPricingDataError with "not found" in the message)
The debounced live price component in the storefront (use-debounced-quote.ts) calls this endpoint with a 250 ms delay after the user changes quantity or dimensions. Quote results are never cached on the server — each request re-resolves from the database.

Build docs developers (and LLMs) love