Skip to main content
POST
Evaluate Strategy

التفويضات

X-Strategy-Api-Key
string
header
مطلوب

الجسم

application/json
shopDomain
string
مطلوب

Your store's permanent domain

strategyId
string
مطلوب

The strategy ID to evaluate (a single 24-char hex MongoDB ObjectId)

context
object
مطلوب
surface
enum<string>

Optional surface the evaluation is running on. Recorded for tracing and reporting.

الخيارات المتاحة:
checkout,
post_purchase,
thank_you,
custom,
cart,
pdp

الاستجابة

Evaluation successful

success
boolean

Whether the evaluation succeeded

products
object[]

Fully enriched recommended products

evaluationId
string

Unique identifier for this evaluation. Echo it back as a line item property (e.g. __as_offer_id) when a shopper adds a recommended product, so the resulting order attributes back to this specific evaluation in AfterSell reporting. Present on successful evaluations; absent on error responses that short-circuit before evaluation.

resolution
object
meta
object
errors
object[]

Present only when errors occur