---
title: "Create goods or category"
method: POST
path: "/goods"
tags: ["Goods"]
---

# Create goods or category

`POST /goods`

Creating an item/category in UDS. The ID of a successfully created item can be used as a `nodeId`
to create an item/category in this category and get a list of internal items.

### Key points
* The type of the object being created is specified in the `data.type` field. Three values are supported:
  - `CATEGORY` — to create a product category
  - `ITEM` — to create a product item
  - `VARYING_ITEM` — to create a product with variants
* You can create subcategories within categories (up to three levels of nesting).
* You can create up to 20 categories in the main list, 20 subcategories per category, and 20 subcategories per subcategory.
* To create an item without a category, set `nodeId` to `null`.
* To create an item with unlimited stock, set `inStock` to `null`.

### Errors
| Status | Error Code | Description |
|--------|------------|-------------|
| `400` | `badRequest` | Validation errors occurred. See the `errors` field for details. |
| `400` | `goods.nodeIndex.invalid` | Specifying a `nodeId` is not allowed when creating a category. |
| `400` | `goods.limitIsReached` | The product limit has been exceeded. |
| `401` | `unauthorized` | Invalid company ID or API Key. |

## Request body

- GoodsDetailed — Goods properties.
  - `id` integer — Goods ID.
  - `name` string, required — Goods name.
  - `nodeId` integer, nullable — ID of the category in which the item is included.
  - `externalId` string, nullable — External goods identifier.
  - `dateCreated` string, date-time — Date item created.
  - `data` union, required — Product type-specific properties. Uses discriminator on `type` field: CATEGORY — a folder for organizing items, ITEM — a simple product with price and inventory, VARYING_ITEM — a product with multiple variants (e.g., sizes, colors).
    - object
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
    - object
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
      - `sku` string, nullable — Item stock number.
      - `price` number — Item price.
      - `description` string, nullable — Item description.
      - `offer` object, nullable — Promotional information.
        - `offerPrice` number, nullable — Discount price.
        - `skipLoyalty` boolean — Flag of goods item price which cashback is not credited and to which the discount does not apply (in currency units).
      - `inventory` GoodsInventory, nullable — Item quantity in stock.
        - `inStock` integer, nullable — Item quantity in stock. The "null" value means unlimited quantity.
      - `photos` string[] — Array of image identifiers
      - `measurement` 'PIECE' | 'CENTIMETRE' | 'METRE' | 'MILLILITRE' | 'LITRE' | 'GRAM' | 'KILOGRAM' | 'TON' | 'SQUARE_METRE' | 'CUBIC_METRE' | 'DAY' | 'HOUR' | 'MINUTE' | 'KILOMETRE' — Goods measurement.
      - `increment` number, nullable — Amount of the item that the buyer can increase or decrease by 1 interval
      - `minQuantity` number, nullable — Minimal quantity of item for order
      - `vatCode` 'NO_NDS' | 'NDS_0' | 'NDS_10' | 'NDS_20' | 'NDS_10_110' | 'NDS_20_120', nullable — VAT rate codes
      - `paymentSubject` 'COMMODITY' | 'EXCISE' | 'SERVICE', nullable — Payment item attribute: * COMMODITY - Commodity * EXCISE - Excise * SERVICE - Service
    - object — A product with multiple variants (e.g., sizes, colors, flavors). Each variant has its own name, price, and inventory.
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
      - `variants` GoodsVariantType[] — Variants of item.
        - `name` string — Variant name.
        - `sku` string, nullable — Variant stock number.
        - `price` number — Variant price.
        - `offer` object, nullable — Promotional information.
          - `offerPrice` number, nullable — Discount price.
          - `skipLoyalty` boolean — Flag of goods item price which cashback is not credited and to which the discount does not apply (in currency units).
        - `inventory` GoodsInventory, nullable — Item quantity in stock.
          - `inStock` integer, nullable — Item quantity in stock. The "null" value means unlimited quantity.
      - `description` string, nullable — Variant description.
      - `photos` string[] — Array of image identifiers
      - `vatCode` 'NO_NDS' | 'NDS_0' | 'NDS_10' | 'NDS_20' | 'NDS_10_110' | 'NDS_20_120', nullable — VAT rate codes
      - `paymentSubject` 'COMMODITY' | 'EXCISE' | 'SERVICE', nullable — Payment item attribute: * COMMODITY - Commodity * EXCISE - Excise * SERVICE - Service
  - `hidden` boolean, nullable — Is the goods hidden.
  - `blocked` boolean, nullable — Is the goods blocked.
  - `imageUrls` string[] — Array of imageId from presigned url response

## Response `200`

Created goods item or category

- GoodsDetailed — Goods properties.
  - `id` integer — Goods ID.
  - `name` string, required — Goods name.
  - `nodeId` integer, nullable — ID of the category in which the item is included.
  - `externalId` string, nullable — External goods identifier.
  - `dateCreated` string, date-time — Date item created.
  - `data` union, required — Product type-specific properties. Uses discriminator on `type` field: CATEGORY — a folder for organizing items, ITEM — a simple product with price and inventory, VARYING_ITEM — a product with multiple variants (e.g., sizes, colors).
    - object
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
    - object
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
      - `sku` string, nullable — Item stock number.
      - `price` number — Item price.
      - `description` string, nullable — Item description.
      - `offer` object, nullable — Promotional information.
        - `offerPrice` number, nullable — Discount price.
        - `skipLoyalty` boolean — Flag of goods item price which cashback is not credited and to which the discount does not apply (in currency units).
      - `inventory` GoodsInventory, nullable — Item quantity in stock.
        - `inStock` integer, nullable — Item quantity in stock. The "null" value means unlimited quantity.
      - `photos` string[] — Array of image identifiers
      - `measurement` 'PIECE' | 'CENTIMETRE' | 'METRE' | 'MILLILITRE' | 'LITRE' | 'GRAM' | 'KILOGRAM' | 'TON' | 'SQUARE_METRE' | 'CUBIC_METRE' | 'DAY' | 'HOUR' | 'MINUTE' | 'KILOMETRE' — Goods measurement.
      - `increment` number, nullable — Amount of the item that the buyer can increase or decrease by 1 interval
      - `minQuantity` number, nullable — Minimal quantity of item for order
      - `vatCode` 'NO_NDS' | 'NDS_0' | 'NDS_10' | 'NDS_20' | 'NDS_10_110' | 'NDS_20_120', nullable — VAT rate codes
      - `paymentSubject` 'COMMODITY' | 'EXCISE' | 'SERVICE', nullable — Payment item attribute: * COMMODITY - Commodity * EXCISE - Excise * SERVICE - Service
    - object — A product with multiple variants (e.g., sizes, colors, flavors). Each variant has its own name, price, and inventory.
      - `type` 'CATEGORY' | 'ITEM' | 'VARYING_ITEM', required
      - `variants` GoodsVariantType[] — Variants of item.
        - `name` string — Variant name.
        - `sku` string, nullable — Variant stock number.
        - `price` number — Variant price.
        - `offer` object, nullable — Promotional information.
          - `offerPrice` number, nullable — Discount price.
          - `skipLoyalty` boolean — Flag of goods item price which cashback is not credited and to which the discount does not apply (in currency units).
        - `inventory` GoodsInventory, nullable — Item quantity in stock.
          - `inStock` integer, nullable — Item quantity in stock. The "null" value means unlimited quantity.
      - `description` string, nullable — Variant description.
      - `photos` string[] — Array of image identifiers
      - `vatCode` 'NO_NDS' | 'NDS_0' | 'NDS_10' | 'NDS_20' | 'NDS_10_110' | 'NDS_20_120', nullable — VAT rate codes
      - `paymentSubject` 'COMMODITY' | 'EXCISE' | 'SERVICE', nullable — Payment item attribute: * COMMODITY - Commodity * EXCISE - Excise * SERVICE - Service
  - `hidden` boolean, nullable — Is the goods hidden.
  - `blocked` boolean, nullable — Is the goods blocked.
  - `imageUrls` string[] — Array of imageId from presigned url response

---

[API](https://skmtc.dev/uds/apis/uds-api.md) · [All operations](https://skmtc.dev/uds/apis/uds-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uds/uds-api/revisions/6fbbbc79e671/schema)
