> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Get the result (once)

GET https://formfill.emtelligent.com/v1/jobs/{job_id}/result

Returns the result and deletes it: a second request gets 410.

Reference: https://docs.emtelligent.com/formfill/api/jobs/get-result-v-1-jobs-job-id-result-get

## Authentication

- `Authorization` header (bearer token, required) — Customer API key or OAuth 2.0 access token (scope `formfill:process`)

## Request

### Path parameters

- `job_id` (string, required)

## Response

### 200

The result; shape depends on the job type

- `jobs_get_result_v1_jobs__job_id__result_get_Response_200`
  - QuestionnaireResult: QuestionnaireResult
  - QuestionsResult: QuestionsResult

## Errors

### 401 Unauthorized Error

Invalid credentials

- `error` (ErrorDetail, required)

### 404 Not Found Error

Unknown job, or a job of another organization

- `error` (ErrorDetail, required)

### 409 Conflict Error

Not ready yet (`not_ready`), or the job failed or was canceled (`no_result`)

- `error` (ErrorDetail, required)

### 410 Gone Error

Already downloaded, or expired

- `error` (ErrorDetail, required)

## Types

### QuestionnaireResult

- `id` (string, required)
- `type` ("questionnaire", required)
- `questionnaire_response` (map from string to any, required) — FHIR R4 QuestionnaireResponse. Each answer taken from the document carries the extensions `https://emtelligent.com/fhir/StructureDefinition/answer-confidence` (valueDecimal, 0 to 1) and `https://emtelligent.com/fhir/StructureDefinition/answer-evidence` (valueString, the verbatim quote). An answer the service derived carries `https://emtelligent.com/fhir/StructureDefinition/answer-derivation` (valueCode `calculated`: a score from other answers, with the confidence of the weakest; `implied`: a yes/no control implied by an answered item it gates, without confidence) instead of answer-evidence. `status` is `in-progress` when `stats.required_missing` is non-empty, otherwise `completed`
- `stats` (Stats, required)
- `pipeline_version` (string, required)

### QuestionsResult

- `id` (string, required)
- `type` ("questions", required)
- `answers` (list of Answer, required) — One per question, in request order
- `stats` (Stats, required)
- `pipeline_version` (string, required)

### ErrorDetail

- `code` (string, required) — Stable machine-readable code, e.g. `invalid_credentials`
- `message` (string, required) — Human-readable summary. Never echoes submitted content
- `request_id` (string, required) — Quote this to support; also in `X-Request-Id`

### Stats

- `answerable` (integer, required) — Items or questions that can hold an answer (not groups or display items)
- `answered` (integer, required) — Items or questions that received at least one answer
- `answer_values` (integer, required) — Total values; a repeating item may hold several
- `unmatched_option` (integer, required) — Coded answers dropped because they matched none of the item's or question's options
- `suppressed` (integer, required) — Answers dropped because form logic (enableWhen) disables the item
- `evidence_located` (integer, required) — Answers whose evidence quote was found in the document
- `required_missing` (list of string, optional) — linkIds of required items (enabled by the form's logic) that the document does not answer. Non-empty means the QuestionnaireResponse status is `in-progress`. Questions jobs: always empty
- `ungrounded` (integer, optional, default: 0) — Free-text answers dropped because the document does not support them (their words are not in the document, and no quote locates them)

### Answer

- `id` (string, required)
- `question` (string, required)
- `type` (enum, required)
  - Allowed values: `text`, `number`, `boolean`, `date`, `choice`
- `status` (enum, required) — `not_found`: the document does not answer it — not a guess
  - Allowed values: `answered`, `not_found`, `unmatched_option`
- `answer` (any, required) — The typed answer; `null` when not found. For `multiple` questions, a list of AnswerValue objects
- `confidence` (double, optional, nullable)
- `evidence` (Evidence, optional, nullable)

### Evidence

- `quote` (string, required) — Verbatim text from the document supporting the answer
- `spans` (list of Span, required) — Where the quote occurs; more than one span means it occurs in several places

### Span

- `start` (integer, required) — Character offset into `document.text` (inclusive)
- `end` (integer, required) — Character offset (exclusive)

## Examples

**Response**

```json
{
  "id": "string",
  "pipeline_version": "string",
  "questionnaire_response": {},
  "stats": {
    "answer_values": 1,
    "answerable": 1,
    "answered": 1,
    "evidence_located": 1,
    "required_missing": [
      "string"
    ],
    "suppressed": 1,
    "ungrounded": 0,
    "unmatched_option": 1
  },
  "type": "string"
}
```

**SDK Code**

```python
import requests

url = "https://formfill.emtelligent.com/v1/jobs/job_id/result"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://formfill.emtelligent.com/v1/jobs/job_id/result';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://formfill.emtelligent.com/v1/jobs/job_id/result"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://formfill.emtelligent.com/v1/jobs/job_id/result")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://formfill.emtelligent.com/v1/jobs/job_id/result")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://formfill.emtelligent.com/v1/jobs/job_id/result', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://formfill.emtelligent.com/v1/jobs/job_id/result");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://formfill.emtelligent.com/v1/jobs/job_id/result")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```