Skip to content

Evaluate price adjustments for an offering

POST
/v1/pricing/adjustments/evaluate

Run the read-only pricing cascade for a single offering in a given cart context. Loads every active/scheduled adjustment for the authenticated company, filters by target + eligibility (date window, quantity, order-total, segment, coupon codes, redemption caps), resolves replace-within-category competitions, and returns the itemized modifiers plus the adjusted price. This never mutates Firestore — redemption counters are incremented separately at order placement via POST /v1/pricing/adjustments/{id}/redemptions.

object
offering
required

The offering to price. companyId is optional and, when present, must match the authenticated company; it is forced from the bearer token otherwise.

object
id
required
string
Example
off_ga
eventId
string
Example
evt_main
companyId

Optional; forced from auth when omitted.

string
price
required
object
amount

Per-unit list price in minor units (cents).

integer
Example
10000
currency
string
Example
USD
tags
Array<string>
cartContext
required

The current cart state used for eligibility + dimension math.

object
quantity
integer
Example
2
now

ISO 8601 evaluation instant (defaults to server now).

string format: date-time
codes

Coupon codes presented by the buyer (case-insensitive).

Array<string>
Example
[
"SUMMER10"
]
customerId

Enables per-customer redemption-cap checks.

string
customerSegment
string
channelId
string
orderTotal
object
amount
integer
currency
string
Example
{
"offering": {
"id": "off_ga",
"eventId": "evt_main",
"price": {
"amount": 10000,
"currency": "USD"
}
},
"cartContext": {
"quantity": 2,
"codes": [
"SUMMER10"
]
}
}

Evaluation result with the applied modifiers and adjusted price

object
status
string
Example
ok
data
object
basePrice
object
amount
integer
currency
string
effectivePrice
object
amount
integer
currency
string
perUnitModifiers
Array<object>
object
perOrderModifiers
Array<object>
object
summary
object
subtotal
integer
modifiers
integer
total
integer
currency
string
clampedAtZero
boolean
droppedAdjustments

Adjustments excluded from the cascade, with the reason.

Array<object>
object

Bad request — offering and cartContext are both required

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Unauthorized — a valid bearer token is required

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Forbidden — offering.companyId does not match the authenticated company

object
status
string
Example
error
message
string
Example
An error occurred
error
string

Internal server error

object
status
string
Example
error
message
string
Example
An error occurred
error
string