---
title: "Submit Pre Submission"
method: POST
path: "/v2/tasks/{task_id}/pre-submission/submit"
tags: ["ap-portals"]
---

# Submit Pre Submission

`POST /v2/tasks/{task_id}/pre-submission/submit`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/tasks/{task_id}/pre-submission/submit`
- Auth: HTTP bearer

Queue the reviewed invoice for submission.

## Path parameters

- `task_id` string, required

## Request body

- SavePreSubmissionAnswersRequest
  - `answers` PreSubmissionQuestionAnswerInput[], required
    - `answer` PreSubmissionAnswerInput, required
      - `file_id` string, nullable
      - `file_name` string, nullable
      - `note` string, nullable
      - `other` string, nullable
      - `value` string, required
    - `invoice_id` string, required
    - `question_id` string, required
  - `field_values` PreSubmissionFieldValueInput[], required
    - `invoice_id` string, required
    - `key` string, required
    - `value` string, required

## Response `202`

Successful Response

- PreSubmissionReview
  - `ap_portal_id` string, required
  - `contacts` PreSubmissionContact[], required
    - `email` string, required
    - `id` string, required
    - `name` string, required
  - `customer_name` string, required
  - `first_submission` boolean, required
  - `forms` PreSubmissionForm[], required
    - `invoice_id` string, required
    - `amounts` PreSubmissionAmounts: The tax and charges the submit bills, as the portal will see them, with the totals they add up to. Amounts are major-unit decimals of ``currency``; one the invoice does not bill is None, so the review shows only what exists.
      - `currency` string, required
      - `subtotal` string, nullable
      - `tax` string, nullable
      - `taxes` PreSubmissionTax[]
        - `label` string, required
        - `value` string, required
      - `shipping` string, nullable
      - `shipping_tax` string, nullable
      - `handling` string, nullable
      - `total` string, nullable
    - `line_items` PreSubmissionLineItems
      - `currency` string, nullable
      - `pairs` PreSubmissionLineItemPair[], required
        - `detail` string, nullable
        - `po_description` string, nullable
        - `po_line_number` string, nullable
        - `po_quantity` string, nullable
        - `po_total` string, nullable
        - `po_unit_price` string, nullable
        - `severity` 'info' | 'review', required
        - `status` string, required
        - `stuut_description` string, nullable
        - `stuut_line_number` string, nullable
        - `stuut_quantity` string, nullable
        - `stuut_total` string, nullable
        - `stuut_unit_price` string, nullable
      - `passed` boolean, required
      - `po_total` string, nullable
      - `severity` 'info' | 'review', required
      - `stuut_total` string, nullable
      - `summary` string, nullable
      - `unbilled_po_line_numbers` string[], required
    - `lines` PreSubmissionLine[], required
      - `description` string, required
      - `number` string, required
      - `quantity` string, required
      - `subtotal` string, required
      - `unit` string, required
      - `unit_price` string, required
    - `sections` PreSubmissionFormSection[], required
      - `rows` PreSubmissionFormRow[], required
        - `key` string, required
        - `label` string, required
        - `question_id` string, nullable, required
        - `value` string, required
        - `source` PreSubmissionFieldSource: Where a prepared value was read: a field on Stuut's invoice, standard or custom (``STUUT_INVOICE``), or the raw ERP record of the invoice (``REMOTE_DATA``).
          - `kind` 'STUUT_INVOICE' | 'REMOTE_DATA', required
          - `label` string, required
          - `adjustment` string, nullable
      - `title` string, required
  - `invoices` PreSubmissionInvoice[], required
    - `amount` string, required
    - `currency` string, required
    - `due_date` string, required
    - `id` string, required
    - `invoice_id` string, required
    - `invoice_number` string, required
    - `po_number` string, nullable, required
    - `questions` PreSubmissionQuestion[], required
      - `agent_reason` string, nullable
      - `agent_value` string, nullable, required
      - `answer` PreSubmissionAnswer, required
        - `answered_at` string, nullable, required
        - `answered_by` string, nullable, required
        - `file_id` string, nullable, required
        - `file_name` string, nullable, required
        - `note` string, nullable, required
        - `other` string, nullable, required
        - `value` string, required
      - `citation` PreSubmissionCitation, required
        - `excerpt` string, required
        - `kind` 'article' | 'document', required
        - `reasoning` string, required
        - `size_label` string, nullable, required
        - `source` string, required
        - `title` string, required
        - `url` string, nullable, required
      - `context` string, nullable, required
      - `field` string, nullable, required
      - `id` string, required
      - `control` union, required
        - PreSubmissionSelectControl
          - `type` 'select'
          - `options` PreSubmissionOption[], required
            - `id` string, required
            - `label` string, required
            - `meta` string, nullable, required
            - `outcome` PreSubmissionOutcome, required
              - …
            - `requires_file` PreSubmissionFileRequest, required
              - …
            - `parent_values` string[], nullable
          - `placeholder` string, nullable
          - `depends_on` string, nullable
        - PreSubmissionTextControl
          - `type` 'text'
          - `placeholder` string, nullable
        - PreSubmissionCheckboxControl
          - `type` 'checkbox'
          - `options` PreSubmissionOption[], required
            - `id` string, required
            - `label` string, required
            - `meta` string, nullable, required
            - `outcome` PreSubmissionOutcome, required
              - …
            - `requires_file` PreSubmissionFileRequest, required
              - …
            - `parent_values` string[], nullable
          - `placeholder` string, nullable
        - PreSubmissionDateControl: An ISO date answer, or one of ``options``, the answers that are not a date.
          - `type` 'date'
          - `options` PreSubmissionOption[]
            - `id` string, required
            - `label` string, required
            - `meta` string, nullable, required
            - `outcome` PreSubmissionOutcome, required
              - …
            - `requires_file` PreSubmissionFileRequest, required
              - …
            - `parent_values` string[], nullable
          - `placeholder` string, nullable
          - `description` string, nullable
          - `min_date` string, nullable
      - `prompt` string, required
      - `section` string, nullable, required
      - `target` union, required
        - PreSubmissionInvoiceTarget
          - `type` 'invoice'
        - PreSubmissionLineTarget
          - `type` 'invoice_line' | 'po_line', required
          - `number` string, required
          - `description` string, nullable
          - `quantity` string, nullable
          - `amount` string, nullable
        - PreSubmissionShippingTarget
          - `type` 'shipping'
        - PreSubmissionPortalFieldTarget
          - `type` 'portal_field'
          - `reference` string, nullable
      - `title` string, required
      - `reuse_role` 'supplier_identity' | 'buyer_constant' | 'invoice_specific' | 'po_specific' | 'unclear': How a buyer choice's answer behaves across that buyer's invoices.
      - `answer_source` PreSubmissionAnswerSource: The earlier review a pre-filled answer came from.
        - `task_id` string, required
        - `invoice_id` string, nullable
        - `invoice_number` string, required
        - `answered_at` string, nullable
      - `suggested` boolean
  - `partner_id` string, required
  - `portal_name` string, required
  - `provider` 'kehe' | 'taulia' | 'coupa' | 'ariba' | 'meijer' | 'kroger' | 'walgreens' | 'albertsons' | 'target' | 'heb' | 'heb_sidm' | 'c_and_s' | 'walmart' | 'walmart_highradius' | 'cvs' | 'cvs_sap' | 'cvs_image_silo' | 'kroger_supplier_connect' | 'kroger_claimtrax' | 'kroger_verigon' | 'servicetitan' | 'sandbox' | 'generic', required: Supported AP Portal providers.
  - `ran_at` string, required
  - `screenshot` PreSubmissionScreenshot
    - `artifact_id` string, required
    - `captured_at` string, required
    - `name` string, required
    - `url` string, nullable
  - `screenshots` PreSubmissionScreenshot[]
    - `artifact_id` string, required
    - `captured_at` string, required
    - `name` string, required
    - `url` string, nullable
  - `sender_email` string, required
  - `source_work_id` string, nullable
  - `supplier_id` string, required
  - `supplier_name` string, required
  - `rejection` PreSubmissionRejection: The portal rejection a resubmission review answers.
    - `task_id` string, required
    - `ap_portal_invoice_id` string, nullable, required
    - `reason` 'po_mismatch' | 'missing_required_field' | 'invalid_tax' | 'duplicate_invoice' | 'unknown_customer' | 'invalid_date' | 'transmission_failed' | 'not_stated' | 'other' | 'po_line_mismatch' | 'receipt_pending' | 'disallowed_charge' | 'invoice_data_error' | 'prerequisite_document' | 'wrong_channel' | 'po_closed', required: Closed reject taxonomy — remediation routes by code, not string-match. Buckets group rejections by what fixes them: missing fields/attachments into ``MISSING_REQUIRED_FIELD``; tax errors and missing tax docs into ``INVALID_TAX``.
    - `reason_text` string, nullable, required
    - `rejected_at` string, nullable, required
    - `screenshot` PreSubmissionScreenshot
      - `artifact_id` string, required
      - `captured_at` string, required
      - `name` string, required
      - `url` string, nullable
  - `submit_blocked_reason` string, nullable
  - `can_answer` boolean, required
  - `can_submit` boolean, required
  - `submits_live` boolean
  - `id` string, required
  - `state` 'open' | 'queued' | 'completed' | 'uncertain', required: Where a review, or a rejection's live resubmission, stands with its send.
  - `submission_work_id` string, nullable
  - `sending_live` boolean
  - `execution_outcome` 'submitted' | 'dry_run' | 'unknown', nullable
  - `execution_screenshot_id` string, nullable
  - `execution_error` string, nullable
  - `execution_error_source` 'portal' | 'stuut': Who refused a submit: the portal, in its own words, or Stuut's own check.
  - `task_id` string, required
  - `default_sender` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/stuut/apis/stuut-api.md) - [All operations](https://skmtc.dev/stuut/apis/stuut-api/llms.txt) - [OpenAPI document](https://skmtc.dev/stuut/apis/stuut-api/revisions/3b5ab941f918?raw)
