DocsAPI ReferenceProduct/bff/product/pricelist-preview
postProductAdmin BFF

/bff/product/pricelist-preview

Evaluates an in-memory rule set against the live base price + cost of (product, variant) at the given instant. Echoes back the winning rule, the resolved price, and a flag if the rule was clamped up to cost to keep margin non-negative.

ProductpostBffProductPricelist-preview

Parameters

4 body

4 total
Body · 4
productCodestringRequired

Product code to preview for.

variantCodestring | null

Variant code, or null for product-level preview.

atstring

ISO datetime at which to evaluate the rules. Defaults to now.

rulesany[]Required

In-flight rule set to evaluate — typically the current admin form state. Letting the caller send the rules makes the preview work before the rules are saved.

Request

POST /bff/product/pricelist-preview

post
curl -X POST "https://api.bizkithub.com/bff/product/pricelist-preview" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "productCode": "my-product",
  "at": "2026-06-20T15:30:00Z",
  "rules": []
}'

Response

JSON payload

{
  "basePrice": 0,
  "cost": 0,
  "resolvedPrice": 0,
  "marginAbs": 0,
  "clampedToCost": false
}

All response codes

1 status code documented

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key