# WritersLogic Lot-Pick Allocator

> WritersLogic Lot-Pick Allocator is a paid API for AI agents from agents.writerslogic.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-11-18).

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.

## Facts

- Endpoint: POST https://agents.writerslogic.com/api/v1/lot-pick?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/writerslogic-lot-pick-allocator-c5256838
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bRvRHL-PC3izaRHrNvZvm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability writerslogic-lot-pick-allocator-c5256838 -d '<json body>'
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.

## Output

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.).

## Request schema (JSON Schema)

```json
{
 "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 exp
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/writerslogic-lot-pick-allocator-c5256838/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.writerslogic.com](https://www.zero.xyz/host/agents.writerslogic.com/llms.txt)
