---
title: "PATCH /api/admin/product-category-fields/{id}"
method: PATCH
path: "/api/admin/product-category-fields/{id}"
tags: ["Administration/Product Category Fields"]
---

# PATCH /api/admin/product-category-fields/{id}

`PATCH /api/admin/product-category-fields/{id}`

## Request

- Base URL: `https://api.retraced.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.retraced.com/api/admin/product-category-fields/{id}`
- Auth: none declared

Updates the keys the body names, merged over the stored field: a key left out keeps its value, and `fieldOptions: null` clears the options. `idx` may be a digit string (the old dashboard's inline cell sends one). `standardFieldName` is only taken when the field has none yet — a stored one is never overwritten. Responds with the field as stored. 404 `product_category_field_not_found` for an unknown id (legacy: `not_found`); 409 `duplicated_field_option` when the merged options repeat. Answers `{ data, metadata }`; legacy answered the bare record.

## Path parameters

- `id` string, required

## Request body

- object
  - `fieldName` string
  - `fieldType` string
  - `idx` union
    - number
    - string
  - `standardFieldName` 'FABRIC_WEIGHT' | 'FABRIC_WIDTH', nullable
  - `fieldOptions` string[], nullable

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required: True when the request succeeded.
  - `data` object, required
    - `id` string, required
    - `productCategoryId` string, required
    - `fieldName` string, required
    - `fieldType` string, required
    - `standardFieldName` string, nullable, required
    - `idx` number, nullable, required
    - `fieldOptions` string[], nullable, required
    - `createdAt` string, date-time, nullable, required
    - `updatedAt` string, date-time, nullable, required
    - `updatedByUserName` string, nullable, required

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `409`: Default Response

## Changes

> 108 revisions in range; 2 not diffed.

- **2026-10-16** `926d6bde4b52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retraced/apis/api-reference/changes/api/admin/product-category-fields/:id/patch.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) - [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/retraced/apis/api-reference/revisions/83309c4abd20?raw)
