---
title: "PATCH /users/me/comparisons/{poll_name}/{uid_a}/{uid_b}/"
method: PATCH
path: "/users/me/comparisons/{poll_name}/{uid_a}/{uid_b}/"
tags: ["users"]
---

# PATCH /users/me/comparisons/{poll_name}/{uid_a}/{uid_b}/

`PATCH /users/me/comparisons/{poll_name}/{uid_a}/{uid_b}/`

Partially update a comparison made by the logged user, in the given poll.

## Path parameters

- `poll_name` string, required
- `uid_a` string, required
- `uid_b` string, required

## Request body

- PatchedComparisonUpdateRequest — A comparison serializer used only for updates. Given the context determined by the view, it will represent or save the comparison in the reverse order. Use `ComparisonSerializer` for all other operations.
  - `criteria_scores` ComparisonCriteriaScoreRequest[]
    - `criteria` string, required — Name of the criteria
    - `score` number, double, required — Score for the given comparison
    - `score_max` integer, required — The absolute value of the maximum score.
    - `weight` number, double — Weight of the comparison
  - `duration_ms` number, double, nullable — Time it took to rate the videos (in milliseconds)

## Response `200`

- ComparisonUpdate — A comparison serializer used only for updates. Given the context determined by the view, it will represent or save the comparison in the reverse order. Use `ComparisonSerializer` for all other operations.
  - `criteria_scores` ComparisonCriteriaScore[], required
    - `criteria` string, required — Name of the criteria
    - `score` number, double, required — Score for the given comparison
    - `score_max` integer, required — The absolute value of the maximum score.
    - `weight` number, double — Weight of the comparison
  - `duration_ms` number, double, nullable — Time it took to rate the videos (in milliseconds)
  - `entity_a` RelatedEntity, required — An Entity serializer that will lookup and possibly create the Entity object on validation, if it does not exist in the database yet. Only the field `uid` is provided when using write HTTP methods. Used by ModelSerializer(s) having one or more nested relations with Entity, and having the constraint to ensure that entity instances exist before they can be saved properly.
    - `uid` string, required
    - `type` 'video' | 'candidate_fr_2022', required — * `video` - Video * `candidate_fr_2022` - Candidate (FR 2022)
    - `metadata` object, required
  - `entity_b` RelatedEntity, required — An Entity serializer that will lookup and possibly create the Entity object on validation, if it does not exist in the database yet. Only the field `uid` is provided when using write HTTP methods. Used by ModelSerializer(s) having one or more nested relations with Entity, and having the constraint to ensure that entity instances exist before they can be saved properly.
    - `uid` string, required
    - `type` 'video' | 'candidate_fr_2022', required — * `video` - Video * `candidate_fr_2022` - Candidate (FR 2022)
    - `metadata` object, required
  - `entity_a_contexts` EntityContext[], required
    - `origin` 'ASSOCIATION' | 'CONTRIBUTORS' — * `ASSOCIATION` - Association * `CONTRIBUTORS` - Contributors
    - `unsafe` boolean — If True, this context will make the targeted entities unsafe.
    - `text` string, required
    - `created_at` string, date-time, required
  - `entity_b_contexts` EntityContext[], required
    - `origin` 'ASSOCIATION' | 'CONTRIBUTORS' — * `ASSOCIATION` - Association * `CONTRIBUTORS` - Contributors
    - `unsafe` boolean — If True, this context will make the targeted entities unsafe.
    - `text` string, required
    - `created_at` string, date-time, required

## Changes

- **2024-05-02** `250644b3d55e` — 1 info
  - endpoint added
- **2023-07-04** `b0f74d913a83` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/tournesol-app/apis/tournesol-api/changes/users/me/comparisons/:poll_name/:uid_a/:uid_b/patch.md)

---

[API](https://skmtc.dev/tournesol-app/apis/tournesol-api.md) · [All operations](https://skmtc.dev/tournesol-app/apis/tournesol-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tournesol-app/tournesol-api/revisions/96c8c62ad972/schema)
