---
title: "Update a strategy"
method: PATCH
path: "/api/v1/sa/repricer/strategies/{id}"
tags: ["Repricer"]
---

# Update a strategy

`PATCH /api/v1/sa/repricer/strategies/{id}`

## Request

- Base URL: `https://app.sellerassistant.app` (the document declares no server; this is the origin it was published from)
- URL: `https://app.sellerassistant.app/api/v1/sa/repricer/strategies/{id}`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

Changes the fields of the body. The other fields keep their values.

## Path parameters

- `id` integer, required

## Request body

- RepricerStrategyForm: The fields of a strategy. The create names the ones it cannot leave out on its own body, and the update takes any subset of these.
  - `name` string: Strategy name.
  - `description` string, nullable: Strategy description.
  - `color` string, nullable: Hex color for UI badge.
  - `action` 'follow_buybox' | 'follow_lowest' | 'follow_featured_offer' | 'adjust_price', nullable: Repricing action name.
  - `action_params` object, nullable: Strategy-specific parameters.
    - `price_adjustment` number, float: Price offset. Negative = undercut, positive = premium. A number or the string of it.
    - `price_adjustment_type` 'amount' | 'percent': Whether adjustment is a fixed dollar amount or percentage.
    - `reference` 'any' | 'fba' | 'fbm' | 'same_as_mine', nullable: The offers the price follows. Only follow_lowest reads it.
    - `respect_map` boolean, nullable: Keep the price at or above the MAP of the product. Only the follow strategies read it.
    - `when_winning` 'hold' | 'follow_next', nullable: While we hold the Buy Box. hold keeps the price. follow_next follows the next Buy Box-eligible competitor with the same price_adjustment (-0.01 = one cent below, 0 = match). It never lowers the price, never goes above the max price or the competitive price threshold, and holds when neither exists. Only follow_buybox and follow_featured_offer read it. No key is hold; a new strategy gets follow_next. In a rule, no key uses the strategy value.
    - `when_unopposed` 'hold' | 'max', nullable: With follow_next and no Buy Box-eligible competitor: hold (default) or max (go to the max price; holds when no max price is set).
  - `limits` object, nullable: The protection the strategy applies by default. `min_price_mode` names how the floor is found, and the field it needs comes beside it.
    - `min_price_mode` 'break_even_plus' | 'target_roi' | 'target_margin'
    - `target_roi` number, nullable: Required when the mode is target_roi.
    - `target_margin` number, nullable: Required when the mode is target_margin.
    - `min_price_markup` number, nullable: Required when the mode is break_even_plus.
    - `missing_cost_fallback` 'error' | 'none', nullable
  - `is_default` boolean: Set as team default strategy.

## Response `200`

Strategy updated

- object
  - `data` RepricerStrategy
    - `id` integer
    - `team_id` integer
    - `name` string
    - `description` string, nullable
    - `color` string, nullable
    - `action` 'follow_buybox' | 'follow_lowest' | 'follow_featured_offer' | 'adjust_price', nullable
    - `action_params` object, nullable
      - `price_adjustment` number, float: Price offset. Negative = undercut, positive = premium. The write takes the number, or the string of it.
      - `price_adjustment_type` 'amount' | 'percent': Whether adjustment is a fixed dollar amount or percentage.
      - `reference` 'any' | 'fba' | 'fbm' | 'same_as_mine', nullable: The offers the price follows. Only follow_lowest reads it.
      - `respect_map` boolean, nullable: Keep the price at or above the MAP of the product. Only the follow strategies read it.
      - `when_winning` 'hold' | 'follow_next', nullable: While we hold the Buy Box. hold keeps the price. follow_next follows the next Buy Box-eligible competitor with the same price_adjustment (-0.01 = one cent below, 0 = match). It never lowers the price, never goes above the max price or the competitive price threshold, and holds when neither exists. Only follow_buybox and follow_featured_offer read it. No key is hold; a new strategy gets follow_next. In a rule, no key uses the strategy value.
      - `when_unopposed` 'hold' | 'max', nullable: With follow_next and no Buy Box-eligible competitor: hold (default) or max (go to the max price; holds when no max price is set).
    - `limits` object, nullable: Every number here answers as a number. The keys that name a thing stay words.
      - `min_price_mode` 'break_even_plus' | 'target_roi' | 'target_margin', nullable
      - `target_roi` number, nullable: The ROI the minimum price aims at, in percent.
      - `target_margin` number, nullable
      - `min_price_markup` number, nullable
      - `missing_cost_fallback` 'error' | 'none', nullable
      - `min_price` number, nullable
      - `max_price` number, nullable
      - `max_change` number, nullable
      - `max_change_percent` number, nullable
    - `rules` object[], nullable: The rules the strategy runs before its own action. The first rule that matches wins. A strategy with no rules answers null.
      - `name` string
      - `condition` object
        - `type` string
        - `value` boolean: The value the condition compares against. A number, a word or true.
      - `action` 'follow_buybox' | 'follow_lowest' | 'follow_featured_offer' | 'adjust_price' | 'hold', nullable: The action of the rule. `hold` keeps the price as it is.
      - `action_params` object, nullable
        - `price_adjustment` number, float
        - `price_adjustment_type` 'amount' | 'percent'
        - `reference` 'any' | 'fba' | 'fbm' | 'same_as_mine', nullable: The offers the price follows. Only follow_lowest reads it.
        - `respect_map` boolean, nullable: Keep the price at or above the MAP of the product. Only the follow strategies read it.
        - `when_winning` 'hold' | 'follow_next', nullable: While we hold the Buy Box. hold keeps the price. follow_next follows the next Buy Box-eligible competitor with the same price_adjustment (-0.01 = one cent below, 0 = match). It never lowers the price, never goes above the max price or the competitive price threshold, and holds when neither exists. Only follow_buybox and follow_featured_offer read it. No key is hold; a new strategy gets follow_next. In a rule, no key uses the strategy value.
        - `when_unopposed` 'hold' | 'max', nullable: With follow_next and no Buy Box-eligible competitor: hold (default) or max (go to the max price; holds when no max price is set).
    - `rules_count` integer: How many rules the strategy holds.
    - `is_default` boolean
    - `product_count` integer, nullable: How many products use the strategy. The list of the strategies counts them. A strategy inside another answer does not, and answers null.
    - `created_by` integer, nullable
    - `updated_by` integer, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Bad request - validation failed or invalid parameters
- `403`: Access denied - insufficient permissions, invalid API key, or the API request limit is used up (`public_api_key_limit`)
- `404`: Resource not found
- `422`: Business logic error - operation cannot be completed due to business rules
- `429`: Too many requests - rate limit exceeded
- `503`: A service of ours did not answer. The call is right, and it can run again later.

---

[API](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api.md) · [All operations](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sellerassistant/apis/seller-assistant-public-api/revisions/5b3ecdbcadb6?raw)
