Listing validation

POST /v1/validate checks trade listings for definite contradictions and values that deserve a human look. It is read-only, does not persist submitted listings, and requires the taxonomy:resolve scope.

Validation is intentionally separate from resolution. Calling it does not change the behavior or output of /v1/resolve or /v1/explore, and those operations do not run these checks implicitly. The optional Resolve/Explore includeAttributeMetadata presentation layer also has no effect on validation findings or validator provenance.

Attention types

The response avoids generic developer-facing error and warning labels:

API value Display name Meaning
must_fix Must fix A definite contradiction that should be corrected before the listing is used.
worth_checking Worth checking A heuristic anomaly that may be valid but deserves confirmation.

One listing may have findings of both types. Its top-level attention is must_fix whenever at least one Must fix finding exists. Clear listings are counted in result.summary.clearListings but are omitted from result.listings, keeping batch responses compact.

Current checks

The first validator revision contains two independent rules:

  1. A listing that identifies pork and makes a positive halal claim is Must fix. Explicit negative wording such as non-halal does not trigger this rule.
  2. A price strictly more than 300% above the supplied average is Worth checking. “300% above” is applied literally: the price must be greater than four times the average. A price exactly four times the average does not trigger the rule.

The API does not invent a market average. Callers supply a positive priceBenchmark built from at least two comparable priced listings and identify whether its scope is an ontology concept (taxonomy_concept) or a category (category).

Request

Submit between 1 and 1,000 listings per request. reference is a caller-owned identifier used to join findings back to source records and must be unique within the batch.

curl --fail-with-body \
  --request POST \
  --header "Authorization: Bearer $TAXONOMY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "listings": [{
      "reference": "offer-1042",
      "title": "Frozen pork body fat halal",
      "category": "Pork",
      "productName": "Pork body fat",
      "price": { "amount": 21, "currency": "EUR", "unit": "kg" },
      "priceBenchmark": {
        "averageAmount": 4,
        "label": "Pork body fat",
        "sampleSize": 28,
        "scope": "taxonomy_concept"
      }
    }]
  }' \
  "$TAXONOMY_BASE_URL/v1/validate"

The response includes the current taxonomyRelease and an independent validator revision. Store both when a validation decision is persisted downstream. Checksum equality—not only the readable validator version—is the authoritative way to determine whether rule behavior changed.

Each finding has a stable code, human-readable title and message, a suggested next action, the input fields involved, and display-ready evidence. Consumers should use attention for workflow routing and retain code for analytics; they should not parse message text.

Privacy and workflow boundary

Submitted listing data is evaluated in memory and is not saved by this operation. Request bodies are not included in ordinary API logs. Validation currently reports concerns only: it does not reject a listing, mutate ontology data, submit feedback, or choose a remediation workflow.

See the interactive reference for the complete request and response schemas.