---
title: "PATCH /uploads/{id}/factor-agent/groups/{groupKey}"
method: PATCH
path: "/uploads/{id}/factor-agent/groups/{groupKey}"
tags: ["Uploads"]
---

# PATCH /uploads/{id}/factor-agent/groups/{groupKey}

`PATCH /uploads/{id}/factor-agent/groups/{groupKey}`

Change a review group's factor. Every unsubmitted row the factor fits takes it, except a row a reviewer gave its own factor, which keeps it; rows it does not fit keep theirs. The group becomes the reviewer's, and a group keyed by a producer skill whose key was answered is remembered for the organization. Takes the analysis version the review was read at and answers with the new one. Refused while any document job runs for the upload. The group key is percent-encoded as one path segment.

## Path parameters

- `id` integer, required
- `groupKey` string, required

## Request body

- DirectUploadFactorGroupPatchRequest
  - `analysisVersionId` string, uuid, required
  - `decision` object — Not supported; any value answers 400 DECISION_CHANGE_UNSUPPORTED.
  - `factorId` string
  - `selectedFactor` DirectUploadFactorCandidate
    - `activityUnit` string
    - `confidence` 'high' | 'medium' | 'low'
    - `factorValue` number, double
    - `id` string, required
    - `libraryId` string
    - `libraryName` string
    - `name` string, required
    - `reason` string
    - `regionCode` string
    - `releaseId` string
    - `releaseYear` integer
    - `scope` integer
    - `unit` string
    - `warnings` string[]

## Response `200`

The new analysis version and the group's summary

- DirectUploadFactorGroupPatchResponse
  - `data` object, required
    - `analysisVersionId` string, uuid, required
    - `group` DirectUploadFactorGroup, required
      - `decision` object, required
      - `decisionSource` 'model' | 'memory' | 'reviewer', required
      - `display` object, required
      - `groupKey` string, required
      - `rowCount` integer, required
      - `selectedFactor` DirectUploadFactorCandidate
        - `activityUnit` string
        - `confidence` 'high' | 'medium' | 'low'
        - `factorValue` number, double
        - `id` string, required
        - `libraryId` string
        - `libraryName` string
        - `name` string, required
        - `reason` string
        - `regionCode` string
        - `releaseId` string
        - `releaseYear` integer
        - `scope` integer
        - `unit` string
        - `warnings` string[]
      - `selectedFactorId` string
      - `selections` DirectUploadFactorGroupSelection[], required
        - `regionCode` string
        - `releaseYear` integer
        - `rowCount` integer, required
        - `selectionKey` string, required
        - `unit` string
      - `status` 'processing' | 'completed' | 'needs_input', required
      - `statusCounts` DirectUploadFactorGroupStatusCounts, required — The group's review rows by how the review shows them; each row once: submitted, else excluded, else its decision.
        - `estimated` integer, required
        - `excluded` integer, required
        - `needsInput` integer, required
        - `ready` integer, required
        - `submitted` integer, required
      - `submittedCount` integer, required
      - `totals` DirectUploadFactorGroupTotals, required
        - `emissions` object, required
        - `quantity` object, required
        - `spend` object, required

## Other responses

- `400` — A malformed edit (VALIDATION_ERROR), a decision change (DECISION_CHANGE_UNSUPPORTED), or a factor whose activity unit fits none of the unsubmitted rows it was tried on (FACTOR_UNIT_MISMATCH); nothing changes
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — The review changed (ANALYSIS_VERSION_CONFLICT), a document job is running (DOCUMENT_JOB_RUNNING), the analysis is not open for edits (ANALYSIS_NOT_REVIEWABLE) or is not stored as rows (ANALYSIS_NOT_GROUPED)

## Changes

- **2026-10-02** `766c2a40e369` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/greentally/apis/esgai-api/changes/uploads/:id/factor-agent/groups/:groupKey/patch.md)

---

[API](https://skmtc.dev/greentally/apis/esgai-api.md) · [All operations](https://skmtc.dev/greentally/apis/esgai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/greentally/apis/esgai-api/revisions/4189686230ca?raw)
