---
title: "Get an extraction's full record"
method: GET
path: "/extractions/{extraction_id}/details"
tags: ["Extractions"]
---

# Get an extraction's full record

`GET /extractions/{extraction_id}/details`

## Request

- Base URL: `https://api.invoicedataextraction.com/v1`
- URL: `https://api.invoicedataextraction.com/v1/extractions/{extraction_id}/details`
- Auth: HTTP bearer

The stable record of one extraction: the original prompt and options, every file name,
and the page-level results, prompt notes and Review Needed items of a completed one.
Unlike `getExtraction`, this endpoint always answers `success: true`; a failed
extraction is a valid record with its failure inside `error`. It carries no download
URLs; use `getOutputDownloadUrl` for those.

Rate limit: 60 requests per minute per API key.

## Path parameters

- `extraction_id` string, uuid, required

## Query parameters

- `scope` 'own' | 'team'

## Response `200`

The record.

- ExtractionDetailsResponse
  - `success` true, required
  - `extraction` ExtractionDetails, required: The full record. Beyond the common fields, a `completed` extraction carries `credits_deducted`, `available_outputs`, `output_expires_at`, `pages`, `ai_uncertainty_notes` and `review_needed`; `processing` carries `progress`; `input_required` carries `progress`, `answer_by` and `questions`; `cancelled` carries `credits_deducted` and `cancellation_reason`; `failed` carries the full `error`. Under `scope=team` the record carries `submitted_by`.
    - `extraction_id` string, uuid, required
    - `submission_id` string, nullable, required
    - `task_name` string, nullable, required
    - `status` 'processing' | 'input_required' | 'completed' | 'failed' | 'cancelled', required
    - `created_at` string, date-time, required
    - `submission_method` 'api' | 'web_app', required
    - `file_count` integer, required
    - `file_names` string[], required
    - `output_structure` 'automatic' | 'per_invoice' | 'per_line_item' | 'null', nullable, required
    - `prompt` union, required: The original prompt, as a string or as the object form. An empty string for a web-app extraction submitted without one; `null` when no prompt was stored.
      - string
      - PromptObject
        - `fields` PromptField[], required
          - `name` string, required: The output column name, exactly as it will appear. Names are unique ignoring case, spaces and underscores, and may not be `Source File` or `Review Needed`.
          - `prompt` union: Instructions for this field, 3 to 600 characters. May be omitted or empty.
            - ''
            - string
        - `general_prompt` string: Instructions that apply to the whole task and every field.
    - `options` object, required: Every option, filled with the values that applied, including the account preferences that filled any field left out at submission.
      - `exclude_columns` string[], required
      - `output_language` 'automatic' | 'en' | 'ar' | 'zh-Hant' | 'zh-Hans' | 'nl' | 'fr' | 'de' | 'el' | 'he' | 'it' | 'ja' | 'pl' | 'pt' | 'es' | 'th', required
      - `review_needed_fill_color` 'none' | 'yellow' | 'orange' | 'red', required
      - `affected_field_fill_color` 'none' | 'yellow' | 'orange' | 'red', required
      - `send_completion_email` boolean, required
      - `json_typed_values` boolean, required
      - `ask_questions` boolean, required
    - `credits_deducted` integer, nullable
    - `available_outputs` string[]
    - `output_expires_at` string, date-time
    - `pages` Pages: Which pages were processed and which failed; data from failed pages is missing from the output.
      - `successful_count` integer, required
      - `failed_count` integer, required
      - `successful` PageReference[], required
        - `file_name` string, required
        - `page` integer, required
      - `failed` PageReference[], required
        - `file_name` string, required
        - `page` integer, required
      - `failure_reasons` PageFailureReason[], required
        - `code` string, required
        - `message` string, required
        - `affected_pages` object[], required
          - `file_name` string, required
          - `pages` integer[], required
    - `ai_uncertainty_notes` UncertaintyNote[]
      - `topic` string, required
      - `description` string, required
      - `suggested_prompt_additions` object[], required
        - `purpose` string, required
        - `instructions` string[], required
    - `review_needed` ReviewNeeded: Rows that need a human's check before the data is relied on. Check `count` first.
      - `count` integer, required
      - `items` ReviewNeededItem[], required
        - `message` string, required
        - `affected_fields` string[], required: Empty when the concern is about the row or document rather than particular fields.
        - `output_row_numbers` integer[], required: 1-based data row numbers, not counting the header row.
        - `source_references` string[], required
    - `progress` integer
    - `answer_by` string, date-time
    - `questions` Question[]
      - `question_id` string, required: Use it when answering.
      - `type` 'single_choice' | 'free_text', required: `single_choice` offers `choices`; answer with one, with words added if you like. `free_text` wants your own words, or the recommended approach. Words are accepted on every question, so an unrecognised type can still be answered with `text`.
      - `question` string, required
      - `example_from_documents` string: A real instance from the documents that the answer would change.
      - `scope` QuestionScope, required
        - `level` 'extraction', required: What the answer governs. `extraction` is the only value today: every document in the extraction, not only the one in the example. Treat a value you do not recognise as narrower than the extraction and read `applies_to`.
        - `applies_to` string, required: The scope in words, for whoever is answering.
      - `choices` QuestionChoice[], required: Empty for `free_text`.
        - `choice_id` string, required: A letter, `a` onwards.
        - `label` string, required
        - `cell_would_contain` string: The value this choice would put in the cell for the example, when known.
        - `recommended` true: Present on the one choice the extraction recommends.
      - `recommended_approach` string: On a `free_text` question, what the extraction does if you accept the recommendation.
      - `previous_answer_rejected` true: Present when an earlier answer to this question was refused. Answer differently.
    - `cancellation_reason` 'user' | 'unanswered' | 'answers_rejected': `user`: cancelled from the dashboard or with `cancelExtraction`. `unanswered`: a question was not answered by `answer_by`. `answers_rejected`: three answers were refused.
    - `error` ExtractionFailureError
      - `code` 'INSUFFICIENT_CREDITS' | 'FILE_PAGE_LIMIT_EXCEEDED' | 'ENCRYPTED_FILE' | 'CONCURRENT_TASK_LIMIT' | 'NO_PAGES_FOUND' | 'VALIDATION_FAILED' | 'PROMPT_REJECTED' | 'PROMPT_UNCLEAR' | 'FILE_SIZE_LIMIT_EXCEEDED' | 'PROCESSING_FILE_SIZE_LIMIT_EXCEEDED' | 'SUBMISSION_STALLED' | 'INTERNAL_ERROR', required: Why an extraction failed. Retryable codes may succeed when submitted again with a new `submission_id`: `CONCURRENT_TASK_LIMIT` (as many extractions running as the account allows, 15 by default and more on request, counting those started in the web app), `SUBMISSION_STALLED`, `INTERNAL_ERROR`. The others need a change first: `INSUFFICIENT_CREDITS` (details: `credits_required`, `credits_balance`, `credits_reserved`), `FILE_PAGE_LIMIT_EXCEEDED` and `ENCRYPTED_FILE` (details: `file_names`), `NO_PAGES_FOUND`, `VALIDATION_FAILED`, `PROMPT_REJECTED`, `PROMPT_UNCLEAR`, `FILE_SIZE_LIMIT_EXCEEDED`, `PROCESSING_FILE_SIZE_LIMIT_EXCEEDED`.
      - `message` string, required
      - `retryable` boolean, required
      - `details` object, nullable, required
    - `submitted_by` SubmittedBy
      - `email` string, nullable, required

## Other responses

- `400`: `INVALID_INPUT`: the request does not match the contract; `details.issues` lists each problem with its `path`.
- `401`: `UNAUTHENTICATED`, `API_KEY_EXPIRED` or `API_KEY_REVOKED`.
- `403`: `FORBIDDEN`: `scope=team` from a caller who is not a team admin.
- `404`: `EXTRACTION_NOT_FOUND`: no extraction with this id within the caller's scope.
- `429`: `RATE_LIMITED`: wait `details.retry_after_seconds` (also the `Retry-After` header), then retry.
- `500`: `INTERNAL_ERROR`: retry after a short delay.

---

[API](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api.md) · [All operations](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/llms.txt) · [OpenAPI document](https://skmtc.dev/invoicedataextraction/apis/invoice-data-extraction-api/revisions/16d920350483?raw)
