---
title: "Propose Profile"
method: POST
path: "/v2/ap-portals/{portal_id}/form-profiles"
tags: ["ap-portals"]
---

# Propose Profile

`POST /v2/ap-portals/{portal_id}/form-profiles`

## 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/ap-portals/{portal_id}/form-profiles`
- Auth: HTTP bearer

Propose form profile

Propose a new revision of a buyer's invoice-form configuration. The config is checked
against the provider's form specification and the invoice field-source catalog before it is
stored. ``expected_revision`` must match the currently active revision (0 when the buyer has
none), so a concurrent change is rejected instead of overwritten. The new revision is inert
until it is activated.

## Path parameters

- `portal_id` string, required

## Request body

- ProposeProfile
  - `expected_revision` integer, required
  - `config` FormProfileConfigSchemaInput, required: Public configuration contract; provider-specific validation remains in core.
    - `schema_version` 1
    - `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.
    - `field_sources` object
    - `field_descriptors` object
    - `charges` ProfileChargesSchemaInput
      - `freight_on_lines` boolean
      - `tax_from_header` boolean
      - `tax_category_by_code` object
      - `route_bc_resource_charges` boolean
    - `invoice_date` ProfileInvoiceDateSchema
      - `max_backdate_days` integer, required
      - `timezone` string, required
    - `supplier_identity` object
    - `field_values` object
    - `form_variant` string, nullable
    - `field_choices` ProfileChoiceSchemaInput[]
      - `id` string, required
      - `label` string, required
      - `scope` 'header' | 'line' | 'shipping' | 'unknown'
      - `scope_ref` string, nullable
      - `form_variant` string
      - `options` ProfileOptionSchema[], required
        - `value` string, required
        - `label` string, required
      - `current_value` string, nullable
      - `current_label` string, nullable
      - `control_key` string, nullable
      - `identity_key` string, nullable
      - `frame_index` integer
      - `field_key` string, nullable
      - `selector` string, nullable
      - `selection_method` 'value' | 'label'
    - `choice_confirmations` ProfileConfirmationSchemaInput[]
      - `field_id` string, required
      - `value` string, required
      - `confirmed_by` string, required
      - `confirmed_at` string, date-time, required
      - `evidence_work_id` string, required
      - `invoice_id` string, nullable
    - `choice_proposals` ProfileProposalSchema[]
      - `field_id` string, required
      - `value` string, required
      - `reason` string, required
      - `confidence` number, required
      - `evidence_work_id` string, required
      - `invoice_id` string, required
    - `resolvers` string[]

## Response `201`

Successful Response

- FormProfileRevision
  - `id` string, required
  - `revision` integer, required
  - `base_revision` integer, required
  - `config` FormProfileConfigSchemaOutput, required: Public configuration contract; provider-specific validation remains in core.
    - `schema_version` 1, 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.
    - `field_sources` object, required
    - `field_descriptors` object, required
    - `charges` ProfileChargesSchemaOutput, required
      - `freight_on_lines` boolean, required
      - `tax_from_header` boolean, required
      - `tax_category_by_code` object, required
      - `route_bc_resource_charges` boolean, required
    - `invoice_date` ProfileInvoiceDateSchema, required
      - `max_backdate_days` integer, required
      - `timezone` string, required
    - `supplier_identity` object, required
    - `field_values` object, required
    - `form_variant` string, nullable, required
    - `field_choices` ProfileChoiceSchemaOutput[], required
      - `id` string, required
      - `label` string, required
      - `scope` 'header' | 'line' | 'shipping' | 'unknown', required
      - `scope_ref` string, nullable, required
      - `form_variant` string, required
      - `options` ProfileOptionSchema[], required
        - `value` string, required
        - `label` string, required
      - `current_value` string, nullable, required
      - `current_label` string, nullable, required
      - `control_key` string, nullable, required
      - `identity_key` string, nullable, required
      - `frame_index` integer, required
      - `field_key` string, nullable, required
      - `selector` string, nullable, required
      - `selection_method` 'value' | 'label', required
    - `choice_confirmations` ProfileConfirmationSchemaOutput[], required
      - `field_id` string, required
      - `value` string, required
      - `confirmed_by` string, required
      - `confirmed_at` string, date-time, required
      - `evidence_work_id` string, required
      - `invoice_id` string, nullable, required
    - `choice_proposals` ProfileProposalSchema[], required
      - `field_id` string, required
      - `value` string, required
      - `reason` string, required
      - `confidence` number, required
      - `evidence_work_id` string, required
      - `invoice_id` string, required
    - `resolvers` string[], required
  - `is_active` boolean, required
  - `approved_by` string, nullable, required
  - `approved_at` string, date-time, nullable, required
  - `validation_work_id` string, nullable, required

## 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/ff0ad16a55ff?raw)
