Commerce

Create product

Add a product.

Header Parameters

X-Request-Id?string

Your id for this request; it becomes the request_id of any error. Without it the server makes one.

Request Body

application/json
  1. body
name*string
Lengthlength <= 255
description?string|null
price?|

A whole number up to 100000000, as a number or a string.

stock?||

Up to 1000000; null leaves stock untracked.

unit?Unit
Value in"PIECE""KG""LITER""DOZEN""CRATE""CARTON""BUNDLE""BOX"
status?ProductStatus
Value in"DRAFT""ACTIVE""ARCHIVED"
product_type?ProductType
Value in"PHYSICAL""DIGITAL"
category?Category
Value in"FOOD""DRINKS""CLOTHING""ELECTRONICS""BEAUTY""HOME""HEALTH""SPORTS""SERVICES""OTHER"
digital_asset_url?string

A public https:// link a buyer can open.

digital_asset_filename?string
images?array<>
Itemsitems <= 10
tags?array<>
Itemsitems <= 7
variants?array<>
curl -X POST 'https://v3.ghala.io/v1/commerce/shop/products' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "description": "string",  "price": "string",  "stock": 0,  "unit": "PIECE",  "status": "DRAFT",  "is_active": true,  "product_type": "PHYSICAL",  "category": "FOOD",  "images": [    "string"  ],  "tags": [    "string"  ],  "digital_asset_url": "string",  "digital_asset_filename": "string",  "variants": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "label": "string",      "price": "1500.00",      "stock": 0,      "is_active": true    }  ]}