# Score a benchmark's images

`POST /v1/benchmarks/{benchmark_id}/scorings`

Scores every visible image in the benchmark against the benchmark
itself under `product_category_id`, so
[List a benchmark's images](/api/benchmarks/listBenchmarkImages)
can rank them. The benchmark needs `minimum_images` visible images.
The response is `202` with a scoring `id`; poll it with
[Retrieve a benchmark scoring](/api/benchmarks/getBenchmarkScoring).

Repeating the request for the same category within 5 minutes
returns the same scoring without queueing it again, so a retry is
safe.

## Request Body

### application/json

- **object**
  - `product_category_id` (string, required) — Category to score the benchmark's images under. Must be one returned
by [List product categories](/api/product-details/listProductCategories).


## Responses

### 202 — Scoring requested

**application/json**

- **object** — A requested scoring. Poll its status with the matching `GET .../scorings/{scoring_id}`
route. Exactly one of `benchmark_id` or `retailer` is set.

  - `id` (string, required) — The `scoring_id` to poll.
  - `benchmark_id` (any, required) — The custom benchmark scored against; `null` when `retailer` is set.
  - `retailer` (any, required) — The retailer whose Vizit benchmark is scored against; `null` for a custom benchmark.
  - `collection_id` (any, required) — The collection scored; `null` when a benchmark scores its own images.
  - `product_category_id` (string, required)
  - `status` (enum: "PROCESSING" | "COMPLETED" | "ERROR", required) — Lifecycle status shared by asynchronous operations: `PROCESSING` while
work is in flight, then `COMPLETED` or `ERROR`.

  - `requested_at` (string, required)
  - `total_images` (integer, required) — Images the scoring covers.
  - `enqueued_images` (integer, required) — Images queued for scoring when the request was answered; images already scored are not counted.

### 400 — Check `error_code`:
  - NO_DEFAULT_PORTFOLIO: your organization has no default portfolio
  - NO_DEFAULT_WORKSPACE: your default portfolio has no default workspace
  - CATEGORY_NOT_IN_ORG_ICP: `product_category_id` is outside your organization's categories
  - BENCHMARK_TOO_SMALL: the benchmark has fewer than `minimum_images` visible images
  - CATEGORY_HAS_NO_AUDIENCES: the product category cannot be scored yet


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 401 — Missing or invalid Bearer token

### 404 — Check `error_code`:
  - NOT_FOUND: custom benchmarks are not enabled for your organization
  - BENCHMARK_NOT_FOUND: no such custom benchmark in your default workspace
  - PRODUCT_CATEGORY_NOT_FOUND: `product_category_id` does not exist


**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 422 — Request validation failed (error_code VALIDATION_ERROR)

**application/json**

- **object** — Standardized error format for all `/v1/*` endpoints. `error_code` is a
stable SCREAMING_SNAKE_CASE identifier clients can switch on.

  - `detail` (string) — Human-readable error message
  - `status_code` (integer) — HTTP status code
  - `error_code` (string) — Stable machine-readable error code
  - `request_id` (any) — Request identifier for correlation
  - `extra` (any) — Endpoint-specific additional context. For example,
IMAGE_DOWNLOAD_FAILED populates extra.failed_urls with per-URL
failure reasons so clients can triage bulk submissions.

  - `timestamp` (string)

### 429 — Rate limit exceeded for this organization
