{"uid":"cap_bRvRHL-PC3izaRHrNvZvm","slug":"writerslogic-lot-pick-allocator-c5256838","name":"WritersLogic Lot-Pick Allocator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/lot-pick?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"asOf":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10,"description":"Reference date, YYYY-MM-DD. An expiry date is the last usable day: a lot expiring on asOf has 0 days left."},"lots":{"type":"array","items":{"type":"object","required":["id","qty"],"properties":{"id":{"type":"string","maxLength":64,"description":"Lot id (unique)."},"qty":{"type":"integer","maximum":1000000000,"minimum":0,"description":"Units on hand."},"hold":{"type":"boolean","description":"Quality or admin hold: never picked."},"expiry":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10,"description":"Last usable day, YYYY-MM-DD."},"location":{"type":"string","maxLength":64,"description":"Location label."},"received":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10,"description":"Date received, YYYY-MM-DD."}}},"maxItems":200,"minItems":1,"description":"At most 200."},"demand":{"type":"integer","maximum":1000000000,"minimum":0,"description":"Units wanted (whole units)."},"policy":{"enum":["FIFO","FEFO","LIFO","MIN_LOTS"],"type":"string","description":"FIFO: oldest received first. FEFO: earliest expiry first. LIFO: newest received first. MIN_LOTS: fewest lots (largest usable first; ties by earlier expiry, then id)."},"pickMultiple":{"type":"integer","maximum":1000000,"minimum":1,"description":"Each lot contributes whole multiples of this case size (default 1)."},"allowOverpick":{"type":"boolean","description":"With pickMultiple, allow the last pick to round the total up to a whole case (default false: leave the remainder as shortfall)."},"allowedLocations":{"type":"array","items":{"type":"string","maxLength":64,"description":"Location label."},"maxItems":50,"description":"If set, lots elsewhere (or without a location) are excluded."},"minShelfLifeDays":{"type":"integer","maximum":36500,"minimum":0,"description":"Exclude lots with fewer than this many days left at asOf (needs expiry on every non-held lot)."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_DyG_YfE4J5zOgYyxe_NrF","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Allocates a demand quantity across up to 200 inventory lots using FIFO, FEFO, LIFO, or MIN_LOTS policy, returning a pick plan, shortfall, and exclusion reasons for each ineligible lot.","exampleAgentPrompt":"Using FEFO policy, allocate 500 units of demand across these lots as of 2025-06-01 — exclude anything on hold or expiring within 30 days, and pick in whole cases of 12. Tell me which lots to pick, how much is short, and why any lots were skipped.","exampleUseCases":[{"title":"FEFO pick plan for perishable goods","prompt":"I need to fulfil an order for 2400 units of frozen product as of 2025-07-15 using FEFO — pick in whole cases of 24, exclude any lots with fewer than 14 days of shelf life left, and tell me if I'll have a shortfall and which lots got skipped."},{"title":"FIFO allocation across warehouse zones","prompt":"Allocate 10000 units using FIFO as of 2025-06-10, but only from lots in locations 'ZONE-A' and 'ZONE-B'. Give me the full pick plan and flag any lots that were excluded because they're in the wrong location or on hold."},{"title":"Minimum-lots pick for large order","prompt":"I want to fill an order for 5000 units as of 2025-08-01 using MIN_LOTS policy so we touch as few lots as possible — allow overpick so the last case rounds up, and show me the shortfall and why any lots were unusable."}],"resultDescription":"Returns a structured pick plan listing which lots to pick and how many units from each, the total shortfall if demand cannot be fully covered, a pass/fail/unknown verdict, and a reason for every lot that was excluded (held, expired, wrong location, insufficient shelf life, missing date, etc.).","failureModes":["Missing or malformed asOf date causes unknown verdict if policy or shelf-life rules depend on dates","minShelfLifeDays set but lots lack expiry fields, triggering unknown verdict","All eligible lots exhausted before demand is met, returning a fail verdict with shortfall","Lots array empty or all lots on hold, resulting in full shortfall","pickMultiple larger than any individual lot quantity leaves remainder as shortfall when allowOverpick is false","More than 200 lots provided — request rejected","allowedLocations excludes all lots, resulting in total shortfall"],"whenToPreferThis":"Use this endpoint when an AI agent needs a deterministic, policy-driven pick plan from a set of inventory lots without reservation side effects. It is ideal for order management, warehouse, and fulfilment agents that need auditable exclusion reasons, support for FIFO/FEFO/LIFO/MIN_LOTS strategies, shelf-life enforcement, location filtering, and case-rounding — especially where verifiability and a stable asOf reference date matter more than travel-distance optimisation or partial-lot reservation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T18:39:01.807Z","isFirstParty":false,"canonicalSlug":"writerslogic-lot-pick-allocator-c5256838"}