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

# Review an enrichment proposal

> Accept or reject a single enrichment proposal.



## OpenAPI

````yaml /openapi/openapi-scanner.json patch /scanner/api/v1/proposals/{proposal_id}
openapi: 3.1.0
info:
  title: Scanner API
  version: 1.0.0
  description: >
    Barcode and product scanning with vision extraction.


    ## Authentication


    All endpoints require an API key passed via the `X-API-Key` HTTP header,
    unless otherwise noted.


    ```

    X-API-Key: csb_<body>_<checksum>

    ```


    Generate API keys in **Settings > API Keys** in your dashboard, or via the
    Account API.

    Session-based (cookie) authentication is also accepted for browser-based
    access.


    ## Rate Limits


    | Tier        | Requests / minute | Requests / day |

    |-------------|-------------------|----------------|

    | Default     | 300               | 10,000         |

    | Custom      | Contact us        | Contact us     |


    Rate-limit headers are included on every response so callers can
    self-throttle without

    hitting our 429s ("informed governor"):


    - `RateLimit-Policy` — every active window, e.g. `300;w=60, 10000;w=86400`

    - `RateLimit-Limit` — quota for the **most-restrictive** currently-active
    window

    - `RateLimit-Remaining` — requests left in that window

    - `RateLimit-Reset` — seconds until that window resets (relative; clock-skew
    safe)


    Legacy `X-RateLimit-*` aliases are also emitted for back-compat.
    `X-RateLimit-Reset`

    keeps the absolute Unix-timestamp shape to avoid breaking existing
    consumers.


    When rate-limited, you receive `429 Too Many Requests` with a
    `retry_after_seconds` field

    in the error envelope and a `Retry-After` header.


    ## Pagination


    List endpoints return paginated results in this envelope:


    ```json

    {
      "data": [...],
      "pagination": {
        "page": 1,
        "page_size": 25,
        "total_count": 342,
        "total_pages": 14,
        "has_next": true,
        "has_previous": false
      }
    }

    ```


    Use `?page=2&page_size=50` query parameters. Maximum page size is 100.


    ## Error Responses


    All errors conform to [RFC 9457 Problem
    Details](https://www.rfc-editor.org/rfc/rfc9457)

    with `Content-Type: application/problem+json`:


    ```json

    {
      "type": "https://closient.com/docs/errors/not_found",
      "title": "Not Found",
      "status": 404,
      "detail": "The requested resource was not found.",
      "error_code": "not_found",
      "retryable": false,
      "timestamp": "2026-03-31T12:00:00+00:00"
    }

    ```


    Common error codes: `unauthorized` (401), `forbidden` (403), `not_found`
    (404),

    `validation_error` (422), `rate_limited` (429), `internal_error` (500).
  termsOfService: https://www.closient.com/terms/
servers:
  - url: https://www.closient.com
security: []
tags:
  - name: Scanner Sessions
    description: Create and manage barcode scanning sessions.
  - name: Scanner Captures
    description: Record barcode scan captures within sessions.
  - name: Scanner Enrichment
    description: Enrich scanned items with product data.
  - name: Scanner Photos
    description: Manage photos attached to scan sessions.
  - name: Scanner Upload
    description: Upload scan data in bulk.
  - name: Scanner Resolve
    description: >-
      Dual-scan QR resolve: follow QR redirect chains and save the canonical URL
      as a trade-item redirect (C-503).
  - name: Scanner Freshness
    description: >-
      Resolve color-coded freshness-chip thresholds for a scanned GTIN from the
      GPC-brick category config (C-2987). Anonymous-allowed; consumed by the
      public /scan/ overlay.
externalDocs:
  description: Closient Documentation
  url: https://docs.closient.com
paths:
  /scanner/api/v1/proposals/{proposal_id}:
    patch:
      tags:
        - Scanner Enrichment
      summary: Review an enrichment proposal
      description: Accept or reject a single enrichment proposal.
      operationId: apps_scanner_api_enrichment_endpoints_review_proposal
      parameters:
        - in: path
          name: proposal_id
          schema:
            description: Unique identifier of the enrichment proposal.
            title: Proposal Id
            type: string
          required: true
          description: Unique identifier of the enrichment proposal.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProposalReviewSchema'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichmentProposalResponseSchema'
      security:
        - APIKeyHeaderAuth: []
        - OAuthTokenAuth: []
        - SessionAuth: []
components:
  schemas:
    ProposalReviewSchema:
      description: Request body for accepting or rejecting an enrichment proposal.
      examples:
        - status: ACCEPTED
      properties:
        status:
          $ref: '#/components/schemas/ProposalReviewDecisionEnum'
          description: >-
            Reviewer's decision on the pending proposal. ``ACCEPTED`` queues the
            proposed value to be applied by the ``/captures/{id}/apply``
            endpoint; ``REJECTED`` discards it. Only ``ACCEPTED`` and
            ``REJECTED`` are valid here — ``PENDING`` (the initial state) cannot
            be set via this endpoint.
      required:
        - status
      title: ProposalReviewSchema
      type: object
    EnrichmentProposalResponseSchema:
      description: AI-generated enrichment proposal for a product field.
      examples:
        - confidence: '0.92'
          created: '2025-08-15T14:10:00Z'
          current_value: Trail Mix
          field_name: name
          id: 8b1f9c2e-4d3a-4b6e-9c2d-7e8f1a2b3c4d
          metadata:
            order_id: '6735'
          proposed_value: Organic Trail Mix 12oz
          reasoning: Package label clearly shows full product name including size.
          source: bedrock_claude
          status: PENDING
      properties:
        metadata:
          additionalProperties:
            type: string
          description: >-
            Developer-attached key/value data attached to this object. Up to 50
            keys; key max 40 chars, value max 500 chars.
          title: Metadata
          type: object
        id:
          description: Unique proposal identifier (UUID).
          format: uuid
          title: Id
          type: string
        field_name:
          description: >-
            Product field targeted by this proposal. One of: ``name``,
            ``description``, ``brand_name``, ``category``, ``ingredients``,
            ``ai_summary``, ``images``.
          maxLength: 50
          title: Field Name
          type: string
        current_value:
          description: Current value of the field on the linked product (may be empty).
          title: Current Value
          type: string
        proposed_value:
          description: AI-suggested replacement value for the field.
          title: Proposed Value
          type: string
        confidence:
          description: Model confidence score from 0.00 to 1.00 (two decimal places).
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Confidence
          type: string
        reasoning:
          description: Free-form explanation of why this change was proposed.
          title: Reasoning
          type: string
        source:
          description: >-
            Identifier of the system that generated this proposal — for example
            ``bedrock_claude`` (vision extraction), ``hunter_io`` /
            ``apollo_io`` (contact discovery), ``local_database`` (GTIN lookup).
            Free-form string; not enumerated on the model.
          maxLength: 100
          title: Source
          type: string
        status:
          $ref: '#/components/schemas/ProposalStatusEnum'
          description: >-
            Review state of the proposal. Newly-generated proposals start
            ``PENDING``; the review endpoint transitions them to ``ACCEPTED`` or
            ``REJECTED``. Only ``ACCEPTED`` proposals are applied to the linked
            product by the apply endpoint.
        reviewed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Timestamp when the proposal was reviewed.
          title: Reviewed At
        created:
          description: Timestamp when the proposal was generated.
          format: date-time
          title: Created
          type: string
      required:
        - id
        - field_name
        - current_value
        - proposed_value
        - confidence
        - reasoning
        - source
        - status
        - created
      title: EnrichmentProposalResponseSchema
      type: object
    ProposalReviewDecisionEnum:
      description: |-
        Decision a reviewer can submit on a pending enrichment proposal.

        Subset of :class:`ProposalStatusEnum` — only the terminal review
        states are valid as a request body. The review endpoint refuses
        ``PENDING`` (which would be a no-op) by typing the request payload
        against this narrower enum, so a malformed status surfaces as a
        422 validation error instead of getting silently mishandled.
      enum:
        - ACCEPTED
        - REJECTED
      title: ProposalReviewDecisionEnum
      type: string
    ProposalStatusEnum:
      description: |-
        Review state of an AI-generated enrichment proposal.

        Mirrors :class:`apps.scanner.models.EnrichmentProposal.Status`. New
        proposals start ``PENDING``; the review endpoint transitions them to
        ``ACCEPTED`` (the proposed value will be applied by the apply
        endpoint) or ``REJECTED`` (the proposed value is discarded).
      enum:
        - PENDING
        - ACCEPTED
        - REJECTED
      title: ProposalStatusEnum
      type: string
  securitySchemes:
    APIKeyHeaderAuth:
      type: apiKey
      in: header
      name: X-API-Key
    OAuthTokenAuth:
      type: http
      scheme: bearer
    SessionAuth:
      type: apiKey
      in: cookie
      name: sessionid

````