Bid coverage: uncovered lines, substitutions, partial quantities and conditional bundles

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/bid-coverage · Id bid-coverage

Checks which required lines of a tender or RFQ are covered by the bids received (up to 200 lines, 30 bidders, 2000 offers), for an agent comparing responses. A line is covered when firm offers (exact item, no condition, no bundle) sum to the required quantity; substitute offers, offers bound to a bundle (all-or-nothing across the lines in that bundle) and offers with a stated condition are reported separately and never count as firm. Returns per line the firm quantity, which bidders cover it and what else is on offer, and per bidder the lines they fully cover. pass: every line has enough firm quantity. fail: some line has no offers or too little quantity even counting every offer. unknown: every line is coverable only by counting substitutes, bundles or conditions, which need a human decision. Duplicate bidder names, and a second firm offer for the same line from one bidder, are refused rather than summed. Does not price or rank bids.

What you get

A bid that quietly substitutes an item, covers half the quantity or only holds if you buy the bundle looks complete in a summary. Gaps are listed per line.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/bid-coverage. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/bid-coverage \
  -H 'content-type: application/json' \
  -d '{"lines":[{"id":"L1","quantity":"100"},{"id":"L2","quantity":"50"},{"id":"L3","quantity":"10"}],"bids":[{"bidder":"Acme","offers":[{"line":"L1","quantity":"100"},{"line":"L2","quantity":"20"}]},{"bidder":"Birch","offers":[{"line":"L2","quantity":"30"},{"line":"L3","quantity":"10","bundle":"B1"},{"line":"L1","quantity":"100","substitute":true}]}]}'

Input

FieldTypeRequiredDescription
linesarray<object>; max 200 itemsyes
bidsarray<object>; max 30 itemsyes

Example request body

{
  "lines": [
    {
      "id": "L1",
      "quantity": "100"
    },
    {
      "id": "L2",
      "quantity": "50"
    },
    {
      "id": "L3",
      "quantity": "10"
    }
  ],
  "bids": [
    {
      "bidder": "Acme",
      "offers": [
        {
          "line": "L1",
          "quantity": "100"
        },
        {
          "line": "L2",
          "quantity": "20"
        }
      ]
    },
    {
      "bidder": "Birch",
      "offers": [
        {
          "line": "L2",
          "quantity": "30"
        },
        {
          "line": "L3",
          "quantity": "10",
          "bundle": "B1"
        },
        {
          "line": "L1",
          "quantity": "100",
          "substitute": true
        }
      ]
    }
  ]
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
linesarray<object>no
biddersarray<object>no
uncoveredLinesarray<string>no
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the money-math-kit package.

Machine-readable