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 customer quote endpoint applies the full pricing pipeline on top of the base quote: per-customer markup rules are evaluated by priority, minimum margin constraints are enforced, rounding is applied, and any storefront-level overrides (fixed_unit_price, extra_markup_pct) take final precedence.
This endpoint is internal only. It returns markup percentages and per-customer pricing rules that are confidential business data. It must never be called from a public storefront, a browser, or any client-accessible surface. Only n8n workflows should invoke it.

POST /api/customers//pricing/quote

Authentication: X-Ingest-Secret header (shared secret). Requests without a valid header receive 401 Unauthorized.
curl -X POST https://your-hub.example.com/api/customers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/pricing/quote \
  -H "X-Ingest-Secret: your-ingest-shared-secret" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "variant_id": "d4e5f6a7-b8c9-0123-def0-234567890123",
    "qty": 24
  }'
Path parameter
customer_id
string (UUID)
required
The customer whose markup rules and storefront overrides should be applied.
Request body — identical to the public quote endpoint
product_id
string (UUID)
required
Product to quote.
variant_id
string (UUID)
Variant (color × size). Required for apparel products.
qty
integer
required
Order quantity. Must be greater than 0.
width
number
Print width in the product’s size unit. Required for print products.
height
number
Print height in the product’s size unit. Required for print products.
selected_attribute_ids
string[] (UUID)
Selected option attribute IDs for multiplier calculation.

Response — 200 OKCustomerQuoteResult

CustomerQuoteResult extends QuoteResult with additional markup fields.
unit_price
string (Decimal)
Final per-unit price after all markup rules and storefront overrides have been applied.
total
string (Decimal)
unit_price × qty.
currency
string
Always "USD".
breakdown
object
Same ApparelBreakdown or PrintBreakdown as the public quote — reflects the base price breakdown before markup.
base_unit_price
string (Decimal)
Supplier base cost before any markup. This is the same unit_price the public /api/pricing/quote endpoint would return.
markup_pct
string (Decimal) | null
The markup percentage that was applied, expressed as a decimal (e.g., "0.35" = 35%). null if no matching markup rule was found for this customer.
rounding
string | null
Rounding strategy from the matched markup rule. One of "none", "nearest_dollar", "nearest_99", or null.
storefront_override_applied
boolean
true if a per-product storefront override (from product_storefront_configs) was applied on top of the markup rule.
Example response
{
  "unit_price": "5.65",
  "total": "135.60",
  "currency": "USD",
  "breakdown": {
    "base": "4.58",
    "tier_match": {
      "group": "Net",
      "qty_band": "12–143",
      "tier_price": "4.18"
    },
    "qty": 24,
    "fallback": false
  },
  "base_unit_price": "4.18",
  "markup_pct": "0.35",
  "rounding": "nearest_99",
  "storefront_override_applied": false
}
In this example: base cost is $4.18, 35% markup yields $5.643, rounded to nearest $X.99$5.99 (the resolver may use ceiling-to-99¢ logic — verify with your markup rule configuration).

Markup rule evaluation

The engine selects the highest-priority MarkupRule for the customer whose scope matches the product. Rule scopes are evaluated in the order you configure them; the winning rule’s markup_pct, min_margin, and rounding are applied. If storefront_override_applied is true, a product_storefront_configs row for this customer+product provided a final override that supersedes the markup rule result.

Error responses

StatusCondition
401 UnauthorizedMissing or invalid X-Ingest-Secret header
422 Unprocessable EntityDimensions out of bounds (BoundsError)
422 Unprocessable EntityMissing pricing data for variant (MissingPricingDataError)
404 Not FoundProduct not found

Usage in n8n

In your OPS push workflow, call this endpoint to get the final sell price before passing it to setProductPrice:
{
  "method": "POST",
  "url": "={{ $env.API_BASE_URL }}/api/customers/{{ $json.customer_id }}/pricing/quote",
  "headers": {
    "X-Ingest-Secret": "={{ $env.INGEST_SHARED_SECRET }}",
    "Content-Type": "application/json"
  },
  "body": {
    "product_id": "={{ $json.product_id }}",
    "variant_id": "={{ $json.variant_id }}",
    "qty": 1
  }
}
Use unit_price from the response as the sell price and base_unit_price as the vendor price in setProductPrice.

Build docs developers (and LLMs) love