---
title: "PUT /api/admin/materials/{id}"
method: PUT
path: "/api/admin/materials/{id}"
tags: ["Administration/Materials"]
---

# PUT /api/admin/materials/{id}

`PUT /api/admin/materials/{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/materials/{id}`
- Auth: none declared

Replaces a material: `name` is required, and every other field left out is cleared (`category`, `description`, the image and the units to null, `isRecycled`/`isSynthetic` to 0) — except `translations` (en/es/de/fr), whose sent languages are merged over the stored ones. Also renames the material's raw-material product category, publishes a newly attached image, and re-syncs the category into the style types. Responds with the record as `GET /:id` returns it. 404 `material_not_found` for an unknown id.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, required
  - `description` string, nullable
  - `translations` object
    - `en` object
      - `name` string, required
      - `description` string, nullable
    - `es` object
      - `name` string, required
      - `description` string, nullable
    - `de` object
      - `name` string, required
      - `description` string, nullable
    - `fr` object
      - `name` string, required
      - `description` string, nullable
  - `imageFileId` string, nullable
  - `isRecycled` number, nullable
  - `isSynthetic` number, nullable
  - `category` 'NATURAL_FIBER' | 'SYNTHETIC_FIBER' | 'LEATHER' | 'NATURAL_MATERIAL' | 'SYNTHETIC_MATERIAL' | 'METAL'
  - `quantityUnits` string[]
  - `weightUnits` string[]

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required: True when the request succeeded.
  - `data` object, required
    - `id` string, required
    - `name` string, nullable, required
    - `description` string, nullable, required
    - `category` string, nullable, required
    - `imageFileId` string, nullable, required
    - `imageFileUrl` string, nullable, required
    - `quantityUnits` string[], required
    - `weightUnits` string[], required
    - `isRecycled` number, nullable, required
    - `isSynthetic` number, nullable, required
    - `createdAt` string, date-time, nullable, required
    - `createdByUserId` string, nullable, required
    - `updatedAt` string, date-time, nullable, required
    - `updatedByUserId` string, nullable, required
    - `updatedByUserName` string, nullable, required
    - `translations` object, required

## Other responses

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

## Changes

> 108 revisions in range; 2 not diffed.

- **2026-10-14** `9ab01fbac88c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retraced/apis/api-reference/changes/api/admin/materials/:id/put.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)
