{"uid":"cap_zu6_deBn44i1cH2OmXN3x","slug":"botx402-inventory-reorder-planner-868c1207","name":"botx402 Inventory Reorder Planner","description":"Reorder plan from your SKU sales, stock and lead times: what to order now, how many, what is overstocked, where cash is stuck. PDF + JSON.","url":"https://api.botx402.io/api/v1/agent/inventory-reorder/run?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Optional. When set, fulfillment emails the result PDF link."},"inputs":{"type":"object","required":["as_of","skus"],"properties":{"skus":{"type":"array","items":{"type":"object","required":["sku","units_sold","on_hand","unit_price","unit_cost"],"properties":{"moq":{"type":"integer","maximum":1000000000,"minimum":1,"description":"Minimum order quantity. An order below it is raised to it."},"sku":{"type":"string","maxLength":64,"minLength":1},"title":{"type":"string","maxLength":200},"on_hand":{"type":"integer","maximum":1000000000,"minimum":0},"on_order":{"type":"integer","maximum":1000000000,"minimum":0,"description":"Units on open purchase orders. Assumed to arrive after lead_time_days."},"unit_cost":{"type":"number","minimum":0},"unit_price":{"type":"number","minimum":0},"units_sold":{"type":"integer","maximum":1000000000,"minimum":0,"description":"Net units sold in the window (after returns)."},"safety_days":{"type":"integer","maximum":365,"minimum":0},"lead_time_days":{"type":"integer","maximum":365,"minimum":0},"order_multiple":{"type":"integer","maximum":1000000000,"minimum":1,"description":"Case pack. Order quantities are rounded up to a multiple of it."},"days_out_of_stock":{"type":"integer","maximum":365,"minimum":0,"description":"Days in the window the SKU had no stock. Missing means 0. Cannot exceed window_days."},"target_cover_days":{"type":"integer","maximum":365,"minimum":1}},"additionalProperties":false},"maxItems":800,"minItems":1},"as_of":{"type":"string","format":"date","description":"Last day covered by the sales figures (YYYY-MM-DD). Echoed in the report."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"ISO currency code for prices and costs. Display only. Defaults to USD."},"defaults":{"type":"object","properties":{"safety_days":{"type":"integer","maximum":365,"minimum":0},"lead_time_days":{"type":"integer","maximum":365,"minimum":0},"target_cover_days":{"type":"integer","maximum":365,"minimum":1,"description":"Days of stock an order should cover on top of lead time and safety days. Defaults to 30."}},"description":"Fallbacks for SKUs that do not set their own. lead_time_days is required here unless every SKU sets it.","additionalProperties":false},"window_days":{"type":"integer","maximum":365,"minimum":28,"description":"Days of sales history the units_sold figures cover. Defaults to 90 when omitted."}},"description":"The bot's inputs: an object matching this schema.","additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"19","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":"$19/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"19","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"19","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eHEfe-sFwlzYfPTcyBKia","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"19","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes SKU-level sales, stock, and lead time data to generate a prioritized reorder plan showing what to order, how many units, what is overstocked, and where cash is tied up — delivered as PDF and JSON.","exampleAgentPrompt":"Run an inventory reorder plan as of 2024-06-30 for these SKUs: SKU-001 sold 120 units with 30 on hand, costs $5 and sells for $12 with a 14-day lead time; SKU-002 sold 300 units with 10 on hand, costs $8 and sells for $20 with a 7-day lead time — use a 7-day safety buffer and email me the PDF at ops@mystore.com.","exampleUseCases":[{"title":"Weekly restock run for e-commerce store","prompt":"I need a reorder plan as of 2024-07-15 for my top 5 SKUs: SKU-A has 200 units sold, 45 on hand, costs $3, sells for $9, 10-day lead time; SKU-B sold 80 units, 5 on hand, costs $15, sells for $40, 21-day lead; SKU-C sold 500 units, 0 on hand, costs $2, sells for $6, 7-day lead; SKU-D sold 60 units, 200 on hand, costs $25, sells for $70, 14-day lead; SKU-E sold 150 units, 30 on hand, costs $10, sells for $28, 10-day lead — use a 5-day safety stock and tell me what to order now."},{"title":"Identify cash stuck in overstock","prompt":"Analyze my inventory as of 2024-06-30 and flag which SKUs are overstocked and tying up the most cash — I have SKU-X with 50 units sold, 800 on hand, $20 cost, $50 price, 30-day lead; SKU-Y sold 400 units, 20 on hand, $5 cost, $15 price, 7-day lead; SKU-Z sold 10 units, 600 on hand, $30 cost, $80 price, 45-day lead. Send the PDF to finance@mybrand.com."},{"title":"Pre-holiday purchase order planning","prompt":"Generate a reorder plan as of 2024-11-01 for seasonal inventory: SKU-GIFT1 sold 900 units, 100 on hand, 30 on order, $8 cost, $25 price, 14-day lead time, minimum order quantity of 50; SKU-GIFT2 sold 400 units, 60 on hand, 0 on order, $12 cost, $35 price, 21-day lead, MOQ 24; SKU-GIFT3 sold 200 units, 5 on hand, $18 cost, $55 price, 7-day lead — use a 10-day safety buffer and target 45 days of cover, currency GBP."}],"resultDescription":"Returns a JSON object with per-SKU reorder recommendations (units to order, reorder flag, overstock flag, days of cover remaining, cash-at-risk value) plus a URL to a downloadable PDF report summarizing the full reorder plan. If an email was provided, the PDF link is also emailed to that address.","failureModes":["Invalid or missing required SKU fields (sku, units_sold, on_hand, unit_price, unit_cost) return a 400 validation error","days_out_of_stock exceeding the implied window_days causes a validation rejection","More than 800 SKUs in a single request exceeds the array limit","Invalid date format for as_of (must be YYYY-MM-DD) returns a schema error","Payment failure or insufficient USDC balance blocks execution with a 402 response","Invalid email format causes a 400 error on the email field"],"whenToPreferThis":"Choose this endpoint when you need a fully computed, actionable reorder plan from raw SKU-level sales and inventory data in a single API call — especially when you want both machine-readable JSON output and a human-readable PDF report. It is ideal for automating weekly or monthly purchasing workflows, flagging overstock, and quantifying cash tied up in excess inventory. Prefer it over generic inventory tools when you need lead-time-aware, safety-stock-adjusted, MOQ/case-pack-constrained order quantities in one step.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T18:37:49.880Z","isFirstParty":false,"canonicalSlug":"botx402-inventory-reorder-planner-868c1207"}