# Forest Commerce Cart Preflight

> Forest Commerce Cart Preflight is a paid API for AI agents from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-02).

Validates a product item into an isolated, ephemeral commerce session to check purchasability without touching a real cart or initiating payment.

## Facts

- Endpoint: POST https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/cart-preflight?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forest-commerce-cart-preflight-dfc1024a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rSLwHa-rutkbFeP_k1hwu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability forest-commerce-cart-preflight-dfc1024a -d '<json body>'
```

Example prompt: Before I commit to buying this product, can you preflight https://shop.example.com/products/blue-sneakers with variant ID 'SKU-7842' for a quantity of 3 to check if it's purchasable without actually placing an order?

## When to prefer this

Use this endpoint when you need to validate whether a product is purchasable before committing to cart or checkout actions. Prefer this over checkout-check or availability-check endpoints when you want a combined session-level preflight that covers URL validity, variant resolution, and quantity constraints in a single call without any side effects. Ideal for automated shopping agents that need safe, read-only pre-validation before executing purchases.

## Known failure modes

- Invalid or non-public URL returns a URL resolution error
- Quantity exceeding provider maximum (100) returns a constraint violation
- Unknown or invalid variant_id returns a variant not found error
- Network timeout or unreachable product URL returns a connectivity failure
- Malformed URL (not matching https?://) returns a schema validation error

## How this service works

Preflight an item into a fresh isolated commerce session without touching a customer cart. Sessions are ephemeral and payment/order creation is never attempted. Base mainnet USDC

## Output

Returns a structured validation result for the preflighted item in an isolated ephemeral session, including whether the item is purchasable, any blockers (e.g. quantity limits, variant unavailability, URL resolution failures), and constraint details — without creating any order, cart, or payment transaction.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "pattern": "^https?://",
   "maxLength": 2048,
   "description": "Public HTTP(S) URL to inspect, resolve, or compare."
  },
  "quantity": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1,
   "description": "Requested item quantity to validate against provider limits."
  },
  "variant_id": {
   "type": "string",
   "description": "Public provider variant identifier to validate."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forest-commerce-cart-preflight-dfc1024a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run](https://www.zero.xyz/host/http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/llms.txt)
