---
title: "Fix a purchase plan"
method: POST
path: "/plan/fix"
---

# Fix a purchase plan

`POST /plan/fix`

## Request

- Base URL: `https://tetheredtrust.com/v1`
- URL: `https://tetheredtrust.com/v1/plan/fix`
- Auth: one of:
  - none
  - HTTP bearer

When a plan comes back incompatible or conditional: the smallest set of changes that makes it work (swap a part for a verified one that fits everything else, add a missing cooler, hub or adapter, trim quantities that exceed slots), re-validated, with the reason for each change. Fewest changes and verified products first; no prices.

## Request body

- object: The same input as validate_purchase_plan.
  - `goal` string: Optional: what the person is trying to do, e.g. 'upgrade this laptop to 32 GB'. Echoed back; requirements are derived from the devices.
  - `setup` union[]: What the person already owns (devices, appliances, tools, hubs) with exact model numbers, plus current configuration.
    - union
      - string: Exact model number or name.
      - object
        - `text` string: Exact model number or name, or key specs.
        - `id` string: Exact product id (from resolve_product or a question's options).
        - `quantity` integer
        - `for` union: Purchases only: which item this part is for (index or name), when the plan has several devices.
          - string
          - integer
        - `config` object: Setup items only: current configuration, e.g. {"memory_modules": [{"capacity_gb": 8}], "installed_drives": 1, "replace_memory": true}.
  - `purchase` union[], required: Everything being considered for purchase: parts, accessories or new devices, with quantities.
    - union
      - string: Exact model number or name.
      - object
        - `text` string: Exact model number or name, or key specs.
        - `id` string: Exact product id (from resolve_product or a question's options).
        - `quantity` integer
        - `for` union: Purchases only: which item this part is for (index or name), when the plan has several devices.
          - string
          - integer
        - `config` object: Setup items only: current configuration, e.g. {"memory_modules": [{"capacity_gb": 8}], "installed_drives": 1, "replace_memory": true}.

## Response `200`

OK

- object

## Other responses

- `400`: Bad input (code bad_request), or plain HTTP (https_required).
- `401`: Missing or invalid API key where one is required.
- `402`: Payment required: pay with x402 or credits and retry. Verified first, settled only for a completed decision.
- `429`: Rate limit; see Retry-After.
- `500`: Our error; retry once.
- `503`: Temporarily unavailable, or paid access is off (paid_access_off).

---

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