---
title: "Update the URL or brand of a curated BOM product"
method: PATCH
path: "/api/admin/bom-products/{id}"
tags: ["admin-affiliate"]
---

# Update the URL or brand of a curated BOM product

`PATCH /api/admin/bom-products/{id}`

## Request

- Base URL: `https://voltplan.app`
- URL: `https://voltplan.app/api/admin/bom-products/{id}`
- Auth: HTTP bearer

Writes only `rawUrl` (expanded and stored as `url`) and `brand`. A bare 10-character ASIN becomes a product URL on the country's Amazon marketplace (`buildProductUrl`); any other URL gets that marketplace's affiliate tag (`applyRegionalTag`). `universal` uses the `de` marketplace. `country` is read only to pick the marketplace for `rawUrl` and is not stored, so send it together with `rawUrl`. Other fields are ignored; `{}` succeeds without changes. An unknown id is reported as 500.

## Request body

- AdminBomProductPatchRequest
  - `rawUrl` string: 10-character ASIN or product URL; stored as `url` after expansion.
  - `country` 'universal' | 'de' | 'us' | 'uk' | 'fr' | 'es' | 'it' | 'au': Marketplace for `rawUrl`; not stored.
  - `brand` string

## Response `200`

Record updated.

- AdminAffiliateSuccessResponse
  - `success` unknown, required

## Other responses

- `403`: Admin access required. Returned for a missing, invalid or expired bearer token as well as for a valid token whose user lacks `is_admin=true`; admin endpoints never answer 401.
- `500`: Malformed JSON body, non-string `rawUrl`, unknown id, or PocketBase error; `error` carries the thrown message.

---

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