API ReferenceProductsCreate a product

Create a product

POST
/products

Authorization

x-api-key<token>

API Key authentication via header

In: header

Request Body

multipart/form-dataRequired
nameRequiredstring

Name of the product.

skuRequiredstring

Unique Stock Keeping Unit (SKU) assigned to the product for tracking.

descriptionstring

Description providing details about the product.

imagefile

Image file representing the product.

Format: "binary"
imageUrlstring

Direct image URL representing the product.

statusstring

Current status of the product.

Value in: "active" | "archived" | "draft"
curl -X POST "https://niravai.com/api/v1/products" \
  -H "x-api-key: <token>" \
  -F name="Classic Oversized JEANS T-Shirt" \
  -F sku="JEANS-BLK-001" \
  -F description="Premium 240 GSM heavy cotton JEANS with modern oversized fit" \
  -F image="string" \
  -F imageUrl="string" \
  -F status="active"

Product created successfully

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "sku": "JEANS-BLK-001",
  "name": "Classic Oversized JEANS T-Shirt",
  "description": "Premium 240 GSM heavy cotton JEANS with modern oversized fit",
  "attributes": {
    "Color": "Black",
    "Material": "100% Organic Cotton",
    "Fit": "Oversized"
  },
  "status": "active",
  "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
  "createdBy": "25a02396-1048-48f9-bf93-102d2fb7895e",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "deletedAt": "2019-08-24T14:15:22Z"
}