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

# Assign a strategy

`POST /api/v1/sa/repricer/strategies/{id}/assign`

## 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}/assign`
- Auth: one of:
  - API key in query parameter `api_key`
  - API key in header `X-Api-Key`

Gives this strategy to the repricer products of the body, by their ids. The products then use the rule, the parameters and the limits of the strategy.

## Path parameters

- `id` integer, required

## Request body

- object
  - `scope` 'asin' | 'sku': What the strategy goes on. `asin` writes it on the product, and every SKU of that product follows. `sku` writes an override on one row, and that override wins over the product. A `PATCH` of the row with `strategy_id: null` takes the override away. A call without a scope assigns by ASIN.
  - `asins` object[]: Required when scope is asin. One ASIN in one marketplace is one repricer product.
    - `asin` string, required
    - `marketplace_id` string, required
  - `ids` integer[]: Required when scope is sku. The ids of `GET /api/v1/sa/repricer/products`. They are not the ids of `GET /api/v1/sa/inventory/skus`: the two lists hold the same SKU code under different ids, and an id of the inventory list leaves `updated` at 0.

## Response `200`

Products assigned

- object
  - `data` object
    - `updated` integer: How many rows the call reached. A row that already holds this strategy counts too, and a call that reaches no row answers 200 with 0.

## 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)
