Quickstart

1. Ask an administrator for a client

In the Meat Ontology admin application, open System → API clients and create a client dedicated to your application. Do not share the admin application's own credential.

Choose only the scopes the application needs:

Scope Allows
taxonomy:read Releases, concepts, species, relationships, schemes, hierarchy browsing, and exports
taxonomy:resolve Resolve, explore, validate, compare, and substitution operations
taxonomy:vocabulary:read Read unsupported vocabulary observed from this API client only
taxonomy:knowledge.draft Submit foods, recipes and ingredient facts to recipe knowledge for human review. Does not publish

Choose the client's immutable traffic class as well. Use production for live application traffic and evaluation for test suites, acceptance runs, backfills, and resolver sweeps.

The full credential is displayed once. Store it immediately in your deployment secret manager.

2. Configure the server application

TAXONOMY_BASE_URL=https://taxonomy.meatborsa.com
TAXONOMY_API_KEY=mtk_<prefix>.<secret>

The API key is a service credential. It must not be shipped to browser or mobile code. Browser-facing applications should call their own backend, which then calls the Meat Ontology API.

3. Verify authentication and the active release

curl --fail-with-body \
  --header "Authorization: Bearer $TAXONOMY_API_KEY" \
  --header "Accept: application/json" \
  "$TAXONOMY_BASE_URL/v1/releases/latest"

Every successful Meat Ontology response identifies the immutable ontology release that produced it. The release is returned as taxonomyRelease (field name kept for compatibility):

{
  "taxonomyRelease": {
    "id": "0198a000-0000-7000-8000-000000000301",
    "version": "0.4.0",
    "publishedAt": "2026-08-13T09:00:00.000Z",
    "publishedBy": "taxonomy-release-pipeline",
    "contentChecksum": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
  },
  "resolver": {
    "version": "1.1.0",
    "behaviorChecksum": "3a3634dfc51703f24747ac8bcd56a55ec877274a5736df798e721cd3b1612392"
  },
  "release": {
    "id": "0198a000-0000-7000-8000-000000000301",
    "version": "0.4.0",
    "publishedAt": "2026-08-13T09:00:00.000Z",
    "publishedBy": "taxonomy-release-pipeline",
    "contentChecksum": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "releaseNotes": "Bovine and veal taxonomy enrichment."
  }
}

4. Resolve a product description

Discover the release-bound values accepted by resolver context fields before a catalogue run:

curl --fail-with-body \
  --header "Authorization: Bearer $TAXONOMY_API_KEY" \
  "$TAXONOMY_BASE_URL/v1/resolution-contexts"

Use returned canonical values such as Domestic pig for context.species. Country codes such as DK are origin observations and belong in observations.originCountry; they are not market-context codes. MCP clients can retrieve the same release-bound vocabulary with list_resolution_contexts.

Consumers with structured listings should use the complete structured listing integration guide, which covers alternate catalogue names, structured observations, storage, query expansion, collections, historical display, and migration.

Extract and sanitize the product phrase before sending it. Do not forward a complete customer note, conversation, document, or unrelated commercial record. Resolve and Explore may retain normalized unsupported fragments from the submitted phrase, with aggregate counts, release/context metadata, and the latest sanitized sample phrase needed for contextual rechecks, so the ontology team can prioritize missing vocabulary.

Set optional requestReference to the consumer's stable product or workflow reference when the Meat Ontology event must be correlated with a downstream review. It is returned through the admin event ledger; do not overload the phrase itself with correlation text.

Resolve also recognizes an amount with an explicit supported currency, optionally per unit, when a price accidentally remains in the product phrase. It returns that evidence in commercialValues and excludes it from ontology matching and unresolved vocabulary. This is a bounded fallback, not a replacement for caller sanitization: currency-free numbers, ratios, weights, codes, and ambiguous amount formats remain subject to the normal safety gate.

curl --fail-with-body \
  --request POST \
  --header "Authorization: Bearer $TAXONOMY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"text":"Frozen sow belly, rind on","commodity":"Pork","locale":"en","limit":5,"includeAttributeMetadata":true}' \
  "$TAXONOMY_BASE_URL/v1/resolve"

TypeScript without an SDK

const baseUrl = process.env.TAXONOMY_BASE_URL ?? "https://taxonomy.meatborsa.com";
const token = process.env.TAXONOMY_API_KEY;

if (!token) throw new Error("TAXONOMY_API_KEY is required");

const response = await fetch(`${baseUrl}/v1/resolve`, {
  method: "POST",
  headers: {
    accept: "application/json",
    authorization: `Bearer ${token}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    text: "Frozen sow belly, rind on",
    commodity: "Pork",
    locale: "en",
    includeAttributeMetadata: true,
  }),
});

const payload = await response.json();
if (!response.ok) {
  const retryAfter = response.headers.get("retry-after");
  throw new Error(
    `Taxonomy ${response.status}: ${payload.error?.code ?? "HTTP_ERROR"}` +
      (retryAfter ? `; retry after ${retryAfter}s` : ""),
  );
}

console.log(payload.taxonomyRelease, payload.result, payload.resolutionEvent);

When includeAttributeMetadata is true, the response also contains attributeMetadata with stable field/value IDs and localized labels and descriptions for the attributes that were returned. The supported presentation languages are en, bg, pl, and de; unsupported languages explicitly fall back to English through resolvedLocale, fallbackLocale, and fallbackUsed. This option is presentation-only and does not itself change selection, ranking, extraction, or normalized values. The active immutable release may separately recognize governed Bulgarian, Polish, and German attribute aliases and still returns canonical machine values. See localized attribute metadata and recognition for the complete shape, matching guards, and caching rules.

For new structured integrations, canonicalAttributes is the persistence-oriented projection: each governed field has a stable fieldId, and controlled values have valueId when that exact value is governed in the release. attributeMetadata remains a localized display projection.

locale is a text-language hint, not a language filter. A wrong hint does not suppress an exact reviewed term or attribute alias in another language. Read result.detectedLocale for the selected term language, and use metadataLocale to request display language independently.

The result.selection returned by /v1/resolve is authoritative for product selection. The /v1/explore operation uses the same decision and adds evidence and ontology context; it never turns an ambiguous or unresolved result into a match.

For a resolved input such as frozen pork shoulder, the primary candidate reports matchType: "phrase" for the complete input and matchTypeCore: "exact" for the reviewed product term after refrigeration is extracted. A core exact match is emitted only when no ambiguity or unsupported vocabulary remains, and it does not alter the candidate score or ranking.

5. Apply the supported automatic-tagging decision

Use resolutionEvent.decision—not Explore-only context or a client-selected score threshold—as the shared automatic-tagging policy:

const { id: resolutionEventId, decision, reasonCodes } = payload.resolutionEvent;

if (decision === "auto_tag") {
  // Persist the selected stable IDs and provenance with this event ID.
} else if (decision === "review") {
  // Keep the source assertions and send the record to a human workflow.
} else {
  // Keep the record untagged and inspect the resolver's missing-context diagnostics.
}

This admits bare exact terms and qualified exact-core terms such as frozen pork shoulder or boneless pork shoulder. It sends fuzzy matches, phrase-level core matches, unsupported text, conflicting attributes, and ambiguous selections to review; unresolved selections produce no_match.

Before treating no_match as unsupported vocabulary, inspect the unresolved selection's reasonCode. For missing_species, missing_bone_state, or missing_scheme, ask for the fields in missingContext and present the returned options. These options are the complete viable decision set and are not truncated by the request's candidate display limit.

This is current behavior pending the single canonical-model migration. missing_scheme does not justify guessing a standard or treating standard-owned records as permanent parallel product identities. If the caller cannot supply that context, preserve the unresolved result; the target workflow will clarify material product differences in ordinary terms.

For unsupported_product_for_species, keep the stated species and send the product wording to ontology coverage review. The resolver has already removed credible candidates whose published species lineage conflicts with the explicit or supplied species, so an empty options array is intentional.

Use commodity when the source platform or ERP provides the meat commodity in a separate field. For example, { "text": "Arg. Tenderloin 3-4 lbs (grass-fed)", "commodity": "Beef" } may resolve a scheme-neutral beef tenderloin while retaining origin, weight, and feeding wording as independent attributes. The commodity is not appended to text, does not infer a UNECE or USDA presentation, and cannot override an explicit conflict. A credible Pork tenderloin with commodity: "Beef" returns unsupported_product_for_commodity with an intentionally empty options array; keep both source assertions and route the record to coverage or source-data review.

Supplying species can also recover commodity-less market wording when that species has exactly one reviewed compatible meat commodity. For example, { "text": "Loins IVP", "species": "Domestic pig" } may resolve a pork product without changing the submitted text. One narrower reviewed market rule also accepts a leading Arg. or Argentina origin plus Domestic cattle for unqualified Striploin and Tenderloin offers and supplies scheme-neutral Beef context. It does not apply to bare cattle cuts, other origins, or missing cattle context, and explicit Beef or Veal evidence always takes precedence. Neither bridge infers a scheme or bypasses the automatic-tagging gate; ambiguous products, conflicts, fuzzy matches, and unsupported text still require review or remain no_match.

Do not treat score as a probability or define a score threshold that admits fuzzy results. scoreMargin is useful for audit and review interfaces, while selection.status already reflects the resolver's ambiguity policy. Consumers may be stricter than this gate, but should not be more permissive.

When decision === "auto_tag", store the primary concept ID, matched term ID, extracted attributes, matchType, matchTypeCore, score evidence, and the complete taxonomyRelease and resolver references with the tag. Store resolutionEventId as the audit and feedback correlation. When the consumer later confirms, rejects, or corrects the outcome, submit that verdict to POST /v1/resolution-events/{id}/feedback; corrected feedback also requires the reviewed correctedConceptId. A client may submit feedback only for its own events.

6. Re-tag only what a new release can affect

Treat taxonomyRelease.contentChecksum plus resolver.behaviorChecksum as the tagging watermark. When either value from GET /v1/releases/latest differs from the last completed pass, request a diff using the stored provenance:

curl --fail-with-body \
  --get \
  --header "Authorization: Bearer $TAXONOMY_API_KEY" \
  --header "Accept: application/json" \
  --data-urlencode "fromReleaseId=$STORED_TAXONOMY_RELEASE_ID" \
  --data-urlencode "fromResolverBehaviorChecksum=$STORED_RESOLVER_BEHAVIOR_CHECKSUM" \
  "$TAXONOMY_BASE_URL/v1/releases/diff"

The response gives a conservative retagging.mode:

Targeted mode covers resolved, ambiguous, and unresolved rows and does not exempt exact matches—a term can be removed or reassigned. If the old resolver checksum was not stored, omit it and the API will safely return full. For paged changes, send the first response's toRelease.id as toReleaseId with every nextCursor. Update the local watermark only after re-tagging succeeds.

Apply the response's replacements mappings for deprecated concept, attribute-field, attribute-value, and collection IDs before re-resolving text. Confirmed facts with an explicit replacement can be migrated by identity; the retagging plan separately covers decisions whose text interpretation can change.

Use the OpenAPI contract to generate types or clients in other languages.