Commerce Cart-preflight
Preflight an item into a fresh isolated commerce session without touching a customer cart. Sessions are ephemeral and payment/order creation is never attempted.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
$0.004 / callPOST /commerce/cart-preflightx402 · Base
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- can I add this item to a cart
- will this variant be accepted in the cart
- check cart quantity before checkout
What Forest guarantees
- bounded normalized public-source lookup
Boundaries
- provider-specific guarantees
- unpublished facts
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
{
"url": "https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/products/forest-demo-widget",
"variant_id": "424242",
"quantity": 2
}
Canonical paid endpoint
https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/cart-preflight
Related capabilities
- Commerce Availability — Resolve public product or listing availability with explicit normalized states. It reports only provider evidence and never infers inventory, reserves items or places an order.
- Commerce Buyability — Report whether a public item appears buyable with explicit blockers such as out-of-stock or unknown. This is a preflight only: it never signs in, buys, creates an order or guarantees checkout.
- Commerce Canonical-product — Resolve a public product redirect, canonical URL and stable provider identifiers using bounded HTTP and structured data. It does not execute JavaScript or assert unavailable facts.
- Commerce Changed — Cheaply detect material public product changes in price, availability, selected variant or seller using a deterministic hash. Timestamps, images and analytics noise are excluded.
- Commerce Checkout-preflight — Check whether an isolated cart can reach checkout and expose blockers without payment. It never logs in, creates an order or finalizes checkout.
- Commerce Delivery-options — Report public delivery options for an isolated ephemeral cart and destination when the provider exposes them. No customer cart, payment or order is touched.