---
title: "POST /api/admin/product-category-fields"
method: POST
path: "/api/admin/product-category-fields"
tags: ["Administration/Product Category Fields"]
---

# POST /api/admin/product-category-fields

`POST /api/admin/product-category-fields`

## 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`
- Auth: none declared

Creates a field on a product category: `productCategoryId`, `fieldName`, `fieldType` and `idx` are required. Answers 201 with the field as stored, in the `{ data, metadata }` envelope (legacy answered the bare record). 404 `product_category_not_found` for an unknown category (legacy: `not_found`); 409 `duplicated_field_option` when an option repeats.

## Request body

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

## Response `201`

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/post.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)
