{"uid":"cap_qks9da7YLvVdbQJn2TZFa","slug":"forest-commerce-quantity-preflight-f48defac","name":"Forest Commerce Quantity Preflight","description":"Check a requested quantity against public variant constraints and known availability. Unknown stock remains unknown; this capability never reserves or purchases inventory. Base mainnet USDC","url":"https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/commerce/quantity-preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","pattern":"^https?://","maxLength":2048,"description":"Public HTTP(S) URL to inspect, resolve, or compare."},"options":{"type":"object","description":"Public identifiers value used to scope this lookup.","additionalProperties":true},"variant":{"type":"object","description":"Public identifiers value used to scope this lookup.","additionalProperties":true},"quantity":{"type":"integer","maximum":100,"minimum":1,"description":"Requested item quantity to validate against provider limits."},"variant_id":{"type":"string","maxLength":256,"description":"Public provider variant identifier to validate."},"destination":{"type":"object","description":"Public identifiers value used to scope this lookup.","additionalProperties":true},"previous_hash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$","description":"Earlier result hash used to detect a material change."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JH7F6jjLkEMhRON5UQaJt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Validates a requested item quantity against public variant constraints and known availability without reserving or purchasing inventory.","exampleAgentPrompt":"Before I try to buy, can you check whether I'm allowed to order 3 units of variant SKU-78291 at https://shop.example.com/products/widget and whether it's actually available in that quantity?","exampleUseCases":[{"title":"Bulk order quantity gate check","prompt":"I want to order 25 units of the blue size-L hoodie variant abc123 at https://store.example.com/products/hoodie — can you verify that quantity is within their allowed limits before I proceed?"},{"title":"Cart preflight before checkout","prompt":"Before I hit checkout, validate that quantity 2 of variant id=V-99012 is available at https://shop.brandsite.com/items/sneakers so I don't waste time on a failed order."},{"title":"Inventory change detection","prompt":"I checked this product last week — can you re-run a quantity preflight for 10 units of variant option-color-red at https://wholesale.example.com/catalog/item-55 and tell me if anything changed? Here's the previous result hash: sha256:a3f1c2d4e5b6789012abcdef3456789012abcdef3456789012abcdef34567890ab."}],"resultDescription":"Returns whether the requested quantity is valid against the variant's public constraints, any known availability signal (in stock, out of stock, or unknown), and a hash of the result that can be stored and compared in future calls to detect material changes. Does not reserve inventory or initiate any purchase.","failureModes":["URL is unreachable or returns non-200 — endpoint may return an error or unknown availability status","Variant ID not found at the given URL — constraint data unavailable","Quantity exceeds the provider's maximum of 100 — rejected by input schema","Previous hash does not match expected pattern — validation error on the hash field","Product page does not expose machine-readable variant constraints — availability remains unknown"],"whenToPreferThis":"Use this endpoint when you need a lightweight, non-committing preflight check before attempting a purchase or cart operation — specifically to catch quantity limit violations or obvious unavailability early. Prefer it over full checkout flows when the goal is just to validate feasibility. Also useful for monitoring whether a variant's constraints or availability have materially changed since a prior check, using the hash comparison feature.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:30:59.444Z","isFirstParty":false,"canonicalSlug":"forest-commerce-quantity-preflight-f48defac"}