---
title: "Create an inventory piece"
method: POST
path: "/pieces"
tags: ["Inventory"]
---

# Create an inventory piece

`POST /pieces`

## Request

- Base URL: `https://api.stoneproject.app/api/v1/public`
- URL: `https://api.stoneproject.app/api/v1/public/pieces`
- Auth: HTTP bearer

## Request body

- PieceInput
  - `title` string, required
  - `description` string, nullable
  - `length_cm` number, nullable
  - `width_cm` number, nullable
  - `thickness_cm` number, nullable
  - `stone_type_id` string, nullable
  - `material_type_id` string, nullable
  - `category_id` string, nullable
  - `price` number, nullable
  - `price_type` 'fixed' | 'negotiable' | 'on_request' | 'null', nullable
  - `color` string, nullable
  - `finish` string, nullable
  - `status` 'available' | 'reserved' | 'sold' | 'on_hold' | 'damaged' | 'written_off' | 'expired'
  - `is_public` boolean
  - `sku` string, nullable
  - `lot_number` string, nullable
  - `location` string, nullable
  - `notes` string, nullable

## Response `201`

Created

- object
  - `success` boolean
  - `message` string, nullable
  - `data` Piece
    - `id` string
    - `title` string
    - `description` string, nullable
    - `length_cm` number, nullable
    - `width_cm` number, nullable
    - `thickness_cm` number, nullable
    - `stone_type_id` string, nullable
    - `material_type_id` string, nullable
    - `category_id` string, nullable
    - `price` number, nullable
    - `price_type` 'fixed' | 'negotiable' | 'on_request' | 'null', nullable
    - `color` string, nullable
    - `finish` string, nullable
    - `status` 'available' | 'reserved' | 'sold' | 'on_hold' | 'damaged' | 'written_off' | 'expired'
    - `is_public` boolean
    - `sku` string, nullable
    - `lot_number` string, nullable
    - `location` string, nullable
    - `notes` string, nullable
    - `images` string[]

## Other responses

- `401`: Missing, invalid, revoked or expired token
- `403`: The token lacks the required scope
- `422`: Invalid input
- `429`: Rate limit reached; retry after the Retry-After header

---

[API](https://skmtc.dev/stoneproject/apis/stone-project-public-api.md) · [All operations](https://skmtc.dev/stoneproject/apis/stone-project-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stoneproject/apis/stone-project-public-api/revisions/7cebff773929?raw)
