{"slug":"api-botx402-io-api-v1-agent-inventory-reorder-run-e429c1","title":"Reorder plan from your SKU sales, stock and lead times","host":"api.botx402.io","method":"POST","resource":"https://api.botx402.io/api/v1/agent/inventory-reorder/run","category":"market","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.","price_listed":0.01,"price_asked":19.0,"state":"overcharges","state_label":"Asked 1900.0x its listed price for its own example","checks_7d":1,"answered_7d":1,"latency_ms_median":699,"reported_calls_30d":0,"reported_payers_30d":0,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"inputs":{"as_of":"2026-09-30","currency":"USD","defaults":{"lead_time_days":14,"safety_days":7,"target_cover_days":30},"skus":[{"moq":50,"on_hand":40,"on_order":0,"sku":"MUG-BLUE","title":"Blue enamel mug","unit_cost":6.5,"unit_price":18,"units_sold":180},{"on_hand":0,"order_multiple":12,"sku":"MUG-RED","title":"Red enamel mug","unit_cost":6.5,"unit_price":18,"units_sold":95},{"on_hand":300,"on_order":100,"sku":"TOTE-NAT","title":"Natural canvas tote","unit_cost":9,"unit_price":24,"units_sold":12},{"on_hand":75,"sku":"POSTER-A3","title":"A3 poster","unit_cost":2,"unit_price":15,"units_sold":0},{"days_out_of_stock":20,"lead_time_days":30,"on_hand":25,"on_order":40,"sku":"CANDLE-SM","title":"Small candle","unit_cost":4,"unit_price":12,"units_sold":60}],"window_days":90}},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"properties":{"connection_id":{"description":"Long-lived OAuth handle from POST /api/v1/agent/connections/{provider}","type":"string"},"email":{"description":"Optional. When set, fulfillment emails the result PDF link.","format":"email","type":"string"},"inputs":{"additionalProperties":false,"properties":{"as_of":{"description":"Last day covered by the sales figures (YYYY-MM-DD). Echoed in the report.","format":"date","type":"string"},"currency":{"description":"ISO currency code for prices and costs. Display only. Defaults to USD.","pattern":"^[A-Z]{3}$","type":"string"},"defaults":{"additionalProperties":false,"description":"Fallbacks for SKUs that do not set their own. lead_time_days is required here unless every SKU sets it.","properties":{"lead_time_days":{"maximum":365,"minimum":0,"type":"integer"},"safety_days":{"maximum":365,"minimum":0,"type":"integer"},"target_cover_days":{"description":"Days of stock an order should cover on top of lead time and safety days. Defaults to 30.","maximum":365,"minimum":1,"type":"integer"}},"type":"object"},"skus":{"items":{"additionalProperties":false,"properties":{"days_out_of_stock":{"description":"Days in the window the SKU had no stock. Missing means 0. Cannot exceed window_days.","maximum":365,"minimum":0,"type":"integer"},"lead_time_days":{"maximum":365,"minimum":0,"type":"integer"},"moq":{"description":"Minimum order quantity. An order below it is raised to it.","maximum":1000000000,"minimum":1,"type":"integer"},"on_hand":{"maximum":1000000000,"minimum":0,"type":"integer"},"on_order":{"description":"Units on open purchase orders. Assumed to arrive after lead_time_days.","maximum":1000000000,"minimum":0,"type":"integer"},"order_multiple":{"description":"Case pack. Order quantities are rounded up to a multiple of it.","maximum":1000000000,"minimum":1,"type":"integer"},"safety_days":{"maximum":365,"minimum":0,"type":"integer"},"sku":{"maxLength":64,"minLength":1,"type":"string"},"target_cover_days":{"maximum":365,"minimum":1,"type":"integer"},"title":{"maxLength":200,"type":"string"},"unit_cost":{"minimum":0,"type":"number"},"unit_price":{"minimum":0,"type":"number"},"units_sold":{"description":"Net units sold in the window (after returns).","maximum":1000000000,"minimum":0,"type":"integer"}},"required":["sku","units_sold","on_hand","unit_price","unit_cost"],"type":"object"},"maxItems":800,"minItems":1,"type":"array"},"window_days":{"description":"Days of sales history the units_sold figures cover. Defaults to 90 when omitted.","maximum":365,"minimum":28,"type":"integer"}},"required":["as_of","skus"],"type":"object"}},"required":["inputs"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"access_token":{"type":"string"},"payer_wallet":{"type":"string"},"payment_method":{"type":"string"},"receipt_id":{"type":"string"},"status_url":{"description":"GET with X-Access-Token until status is completed","type":"string"}},"required":["receipt_id","status_url","payer_wallet","payment_method","access_token"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-01","reachable":true,"status":402,"valid_402":true,"asked_usdc":19.0,"price_match":false,"latency_ms":699,"error":null}],"description_full":"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.","last_updated":"2026-10-01T13:25:34.886Z","schemes":["exact"]}