capabilities.work

Parse and Record a Validation Result

A 4-step recipe with Affinda. We can help you get access.

Recipe · 4 steps

Parse and Record a Validation Result

with Affinda

Parse a document then attach a validation result to it.

  1. Upload the file with wait=false so an identifier is returned for polling.
  2. Poll the document until meta.ready becomes true.
  3. List the document's annotations so a specific parsed field can be referenced by the validation result.
  4. Record a validation result against the document capturing the rule slug, message, and pass/fail outcome.
What you'll need to have ready
  • workspace: The workspace identifier to upload the document into.
  • file: The document file contents (binary) to upload.
  • ruleSlug: The slug of the validation rule being recorded.
  • message: A human-readable message describing the validation outcome.
  • passed: Whether the validation rule passed.
For your developer

Arazzo workflow affinda:parse-and-validate, 4 operations: createDocument → getDocument → getAllAnnotations → createValidationResult. Specs on APIs.io.