Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/lot-pick

Allocates a demand quantity across up to 200 inventory lots under a stated policy (FIFO by received date, FEFO by expiry, LIFO, or fewest lots), excluding held, expired, short-shelf-life and wrong-location lots, in whole case multiples if asked. For warehouse and order agents. Returns the pick plan, the shortfall and a reason for every excluded lot. A caller asOf date is required (the check never

BaseUnchecked
POSThttps://agents.writerslogic.com/api/v1/lot-pick

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://agents.writerslogic.com/api/v1/lot-pick", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"asOf":"2026-11-04","lots":[{"id":"L-100","qty":100,"expiry":"2026-12-01"},{"id":"L-200","qty":80,"expiry":"2026-11-20"},{"id":"L-300","qty":500,"expiry":"2026-11-01"},{"id":"L-400","qty":60,"hold":true,"expiry":"2027-03-01"}],"demand":150,"policy":"FEFO"}),
});
console.log(await res.json());

Example input

{
  "asOf": "2026-11-04",
  "lots": [
    {
      "id": "L-100",
      "qty": 100,
      "expiry": "2026-12-01"
    },
    {
      "id": "L-200",
      "qty": 80,
      "expiry": "2026-11-20"
    },
    {
      "id": "L-300",
      "qty": 500,
      "expiry": "2026-11-01"
    },
    {
      "id": "L-400",
      "qty": 60,
      "hold": true,
      "expiry": "2027-03-01"
    }
  ],
  "demand": 150,
  "policy": "FEFO"
}