> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# The form you have filled forty times

> Hand the workflow a blank form and get the completed PDF back, with the fields detected for you

Every supplier sends their own onboarding form and every one of them wants the same six facts about your company. The [Edit](/guides/nodes/edit) node reads the blank form, finds the gaps itself, writes your values into them and returns a filled PDF. You map nothing by hand.

<div className="af-payoff">
  <div className="af-payoff-pane">
    <div className="af-payoff-cap">The blank form</div>
    <div className="af-payoff-line"><b>New Supplier Onboarding</b></div>

    <div className="af-payoff-line">
      {'Complete every field below.'}
    </div>

    <div className="af-payoff-line">
      {'Company name: ______________'}
    </div>

    <div className="af-payoff-line">
      {'VAT number:   ______________'}
    </div>

    <div className="af-payoff-line">
      {'City:         ______________'}
    </div>
  </div>

  <div className="af-payoff-arrow">→</div>

  <div className="af-payoff-pane">
    <div className="af-payoff-cap">The filled PDF</div>

    <div className="af-payoff-line">
      <span className="af-payoff-key">
        {'Company name'}
      </span>

      <b>
        {'Wayne Enterprises, Inc.'}
      </b>
    </div>

    <div className="af-payoff-line">
      <span className="af-payoff-key">
        {'VAT number'}
      </span>

      <b>
        {'ESB12345678'}
      </b>
    </div>

    <div className="af-payoff-line"><span className="af-payoff-key">{'City'}</span><b>Gotham</b></div>

    <div className="af-payoff-line">
      <span className="af-cite">
        {'↳ 3 of 3 fields detected and written'}
      </span>
    </div>

    <div className="af-payoff-line">
      <span className="af-cite">
        {'↳ download_url returns the PDF'}
      </span>
    </div>
  </div>
</div>

<div className="af-cost">
  <span><b>Nodes</b><strong>{'Parse → Edit'}</strong></span>
  <span><b>Credits</b><strong>60 per page</strong>{' (Parse 25 + Edit 35)'}</span>
  <span><b>You get</b>{' a PDF, not a JSON object'}</span>
</div>

## The workflow

Values come from two places: free-text `instructions` on the node, and reference documents you upload to the workflow once, so every run fills from your standing data without retyping it.

<CodeGroup>
  ```json API theme={null}
  {
    "name": "Fill the onboarding form",
    "description": "Hand it a blank form, get the filled PDF back",
    "nodes": [
      { "id": "parse_1", "type": "parse" },
      {
        "id": "edit_1",
        "type": "edit",
        "instructions": "Company name: Wayne Enterprises, Inc.; VAT number: ESB12345678; City: Gotham"
      }
    ],
    "edges": [{ "source": "parse_1", "target": "edit_1" }]
  }
  ```

  ```python Python theme={null}
  import os

  from anyformat.sdk import Client

  client = Client(api_key=os.environ["ANYFORMAT_API_KEY"])

  workflow = (
      client.workflow("Fill the onboarding form", "Hand it a blank form, get the filled PDF back")
      .parse()
      .edit(instructions="Company name: Wayne Enterprises, Inc.; VAT number: ESB12345678; City: Gotham")
      .create()
  )
  ```

  ```typescript TypeScript theme={null}
  // The TypeScript builder has no edit() method yet. Send the node in the
  // workflow's `nodes` array with an edge from the Parse node.
  const nodes = [
    { id: "parse_1", type: "parse" },
    {
      id: "edit_1",
      type: "edit",
      instructions: "Company name: Wayne Enterprises, Inc.; VAT number: ESB12345678; City: Gotham",
    },
  ];
  const edges = [{ source: "parse_1", target: "edit_1" }];
  ```
</CodeGroup>

To fill from standing data instead of a string, upload a company profile once and pass `reference_document_ids`. The node reads the answers out of it.

## Response

The run returns an `edits` entry per file. Each one lists every form field the node **found** on the page, with the label it read, the box it sits in, and the value written into it. `unmatched_instructions` is the list of things you asked for that had nowhere to go, and it is the first thing to read when a form comes back looking wrong.

```json theme={null}
{
  "status": "processed",
  "results": {
    "edits": [
      {
        "file_id": "06a95798-8e0a-741a-8000-bf69b42aa123",
        "file_name": "blank_onboarding_form.pdf",
        "fields": [
          {
            "form_field_id": "p1_f0",
            "label": "Company name:",
            "kind": "text",
            "state": "empty",
            "page": 1,
            "bbox": { "x0": 0.375, "x1": 0.882, "y0": 0.217, "y1": 0.257 },
            "value": "Wayne Enterprises, Inc.",
            "confidence": 100
          },
          {
            "form_field_id": "p1_f1",
            "label": "VAT number:",
            "kind": "text",
            "state": "empty",
            "page": 1,
            "bbox": { "x0": 0.375, "x1": 0.882, "y0": 0.33, "y1": 0.371 },
            "value": "ESB12345678",
            "confidence": 100
          },
          {
            "form_field_id": "p1_f2",
            "label": "City:",
            "kind": "text",
            "state": "empty",
            "page": 1,
            "bbox": { "x0": 0.375, "x1": 0.882, "y0": 0.444, "y1": 0.485 },
            "value": "Gotham",
            "confidence": 100
          }
        ],
        "unmatched_instructions": [],
        "download_url": "https://s3.eu-west-1.amazonaws.com/static.anyformat.ai/customers/org/...?Signature=...&Expires=..."
      }
    ]
  }
}
```

`state` describes the field **on the form you sent**, so `empty` means the node found a blank waiting to be filled. `confidence` is 100 because the node wrote the value rather than reading it: it is not a claim about the form, and it is not comparable to an extraction confidence.

`download_url` is a presigned link and it expires. Fetch the PDF when you read the run, or store it yourself.

## When it goes wrong

**A value you asked for is missing from the PDF.** Read `unmatched_instructions`. An instruction with no matching field on the form lands there instead of being written somewhere arbitrary, which is the behaviour you want.

**The node found fewer fields than the form has.** It detects fillable gaps from the parsed document, so a form that is a flat scan with printed rules gives it less to work with than a born-digital one. Parse the difficult ones on the [agentic tier](/guides/nodes/parse) first.

**The link 404s an hour later.** `download_url` is presigned and short-lived. Download it in the same pass that reads the run.

**You want the values, not the PDF.** Then you want [Extract](/guides/nodes/extract). Edit is for handing a completed document back to someone.

## Next steps

<CardGroup cols={2}>
  <Card title="Edit" icon="pen-to-square" href="/guides/nodes/edit">
    Reference documents, fonts and the output mode
  </Card>

  <Card title="Outputs" icon="download" href="/concepts/outputs">
    Every way a run gives you a file
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.