---
title: "Put Compare Lists"
method: PUT
path: "/v1/users/me/compare-lists"
tags: ["v1", "users"]
---

# Put Compare Lists

`PUT /v1/users/me/compare-lists`

## Request

- Base URL: `https://thrustlab.com`
- URL: `https://thrustlab.com/v1/users/me/compare-lists`
- Auth: HTTP bearer

Merge the caller's lists into the account's, and return the result.

This is a MERGE, not a replace, and that is the whole contract:

* entries are unioned by id, keeping the earlier `added_at` of the two —
  that is when the component was actually added; a later timestamp is only
  the other device noticing;
* the union is ordered newest first, ties broken by id, and truncated to
  ten per type;
* an id that does not resolve to a curated, public component is dropped
  silently, so a component retired from the catalog leaves the list instead
  of turning every later sync into an error;
* a type you omit is left exactly as it was — saying nothing about motors
  is not the same as saying you have no motors.

Union rather than replace is what makes this safe to send from a device that
has been offline or is out of date: it can add, and it can reorder by
supplying an earlier time, but it cannot delete what another device added.

Sending the device's list on sign-in and storing what comes back is the
whole synchronisation: both sides end up holding the same ten.

## Request body

- CompareListsBody
  - `lists` CompareListsIn, required: The lists a client offers. An omitted type says nothing about that type.
    - `battery` CompareEntryIn[], nullable
      - `added_at` string, nullable: ISO-8601 UTC instant the component was added. Missing or unparseable sorts last.
      - `id` string, required: Public component id (`comp_…`).
    - `motor` CompareEntryIn[], nullable
      - `added_at` string, nullable: ISO-8601 UTC instant the component was added. Missing or unparseable sorts last.
      - `id` string, required: Public component id (`comp_…`).
    - `propeller` CompareEntryIn[], nullable
      - `added_at` string, nullable: ISO-8601 UTC instant the component was added. Missing or unparseable sorts last.
      - `id` string, required: Public component id (`comp_…`).

## Response `200`

Successful Response

- CompareListsResource
  - `lists` CompareListsOut, required: Every type, always all three, newest first and at most ten each.
    - `battery` CompareEntry[], required
      - `added_at` string, required: ISO-8601 UTC instant the component was added to the list.
      - `id` string, required: Public component id (`comp_…`).
    - `motor` CompareEntry[], required
      - `added_at` string, required: ISO-8601 UTC instant the component was added to the list.
      - `id` string, required: Public component id (`comp_…`).
    - `propeller` CompareEntry[], required
      - `added_at` string, required: ISO-8601 UTC instant the component was added to the list.
      - `id` string, required: Public component id (`comp_…`).
  - `object` string

## Other responses

- `422`: Validation Error

---

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