IaBulaDocs API V1Português
Browse documentation
API Reference

Medication name normalization and resolution

.md

Integrate POST /v1/resolve and handle resolved and unresolved safely without assuming every name identifies a unique variant.

On this page

Resolve an identity when evidence is sufficient#

POST /v1/resolve accepts a required query string of 1–512 characters. It identifies a canonical MedicationVariant; it does not select medication for a patient. The response preserves the original query.

bash
curl --fail-with-body "$IABULA_API_BASE/v1/resolve" \
  --header "X-API-Key: $IABULA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"query":"NATULAXE CAPSULA"}'

Verified positive example#

NATULAXE CAPSULA was confirmed as resolved in the RapidAPI Hub. Confirmed facts are product_name = NATULAXE, entity_type = medication_variant and dosage_form = cápsula. These facts are documented without inventing a UUID or additional response values.

When status is resolved, resolved contains id, entity_type, product_name, brand_name, dosage_form and active_ingredient_text. brand_name and active_ingredient_text may be null. Ingredient text does not guarantee a canonical link to an ingredient entity.

Abstention is a valid outcome#

When evidence is insufficient for a safe identity, status is unresolved and resolved is null. Both outcomes use HTTP 200. Short, ambiguous or misspelled queries are not guaranteed to resolve. Scores, candidates and internal gate diagnostics are not public fields.

javascript
const response = await fetch(`${process.env.IABULA_API_BASE}/v1/resolve`, {
  method: "POST",
  headers: {
    "X-API-Key": process.env.IABULA_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ query: "NATULAXE CAPSULA" }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.code}`);
if (result.status === "unresolved") {
  // Ask for more source information or route to manual review.
} else {
  console.log(result.resolved.product_name, result.resolved.dosage_form);
}

Distinguish no match from failure#

HTTP 503 indicates temporary unavailability, not unresolved. Do not translate authentication, quota or service errors into absence of identity. Applications should allow manual review or request more source information after abstention.

POST /v1/resolve#

Contract and types
JSON fieldType and boundsRequired
querystring; minLength=1, maxLength=512yes
Contract and types
HTTPContent-TypeSchema
200application/jsonResolveSuccess | ResolveUnresolved
400application/problem+jsonProblem
401application/problem+jsonProblem
403application/problem+jsonProblem
500application/problem+jsonProblem
503application/problem+jsonProblem
429application/problem+jsonProblem
422application/jsonHTTPValidationError

OpenAPI contract fields#

Contract and types
Schema.fieldType and boundsRequired
HTTPValidationError.detailarray<ValidationError>no
Problem.typestringyes
Problem.titlestringyes
Problem.statusintegeryes
Problem.codestringyes
Problem.detailstring | nullno
Problem.request_idstringyes
ResolveRequest.querystring; minLength=1, maxLength=512yes
ResolveSuccess.statusstring: resolvedyes
ResolveSuccess.querystringyes
ResolveSuccess.resolvedResolvedMedicationVariantyes
ResolveUnresolved.statusstring: unresolvedyes
ResolveUnresolved.querystringyes
ResolveUnresolved.resolvednullyes
ResolvedMedicationVariant.idstring (uuid)yes
ResolvedMedicationVariant.entity_typestring: medication_variantyes
ResolvedMedicationVariant.product_namestringyes
ResolvedMedicationVariant.brand_namestring | nullyes
ResolvedMedicationVariant.dosage_formstringyes
ResolvedMedicationVariant.active_ingredient_textstring | nullyes
ValidationError.locarray<string | integer>yes
ValidationError.msgstringyes
ValidationError.typestringyes
ValidationError.inputobjectno
ValidationError.ctxobjectno