Create product
hub_create_productCreate a product in the merchant's catalogue. Call get_products first to make sure it does not already exist. Prices are HUMAN strings like "19.99" — this tool converts them into the company's currency itself, so never send cents. Tax: the company's standard tax table is applied by default; pass taxable:false for an untaxed product. Ask the merchant for anything you do not know instead of inventing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | No | ||
| name | Yes | Product name as the merchant said it | |
| price | Yes | Selling price as a human string, e.g. "19.99" | |
| barcode | No | EAN/UPC if the merchant gave one | |
| options | No | Variation axes and the values to build variants from, e.g. {"Size":["Small","Large"]}. Every combination becomes a variant. Call get_product_options FIRST and reuse existing axes. Every variant gets `price` unless variantPrices says otherwise. | |
| taxable | No | Default true: applies the standard tax table | |
| costPrice | No | What the merchant pays for it, human string | |
| outletIds | No | Outlet ids. Omit for everywhere | |
| taxTableId | No | A specific tax table, for non-standard tax | |
| categoryIds | No | Category ids — names are rejected | |
| description | No | ||
| productType | No | Only pass this for "booking" — a service sold as TIME (a haircut, a room for the night, an hour on a scooter). simple/variable are derived from `options`, so leave it out for goods. A booking product is not bookable until set_product_booking_setup gives it a rule set and resources. | |
| variantPrices | No | Per-variant prices at creation, one entry per combination that differs from `price`, e.g. {"options":{"Size":"Large"},"price":"21.99"}. `options` must name one value for EVERY axis in `options`. | |
| trackInventory | No | Default false. True manages stock | |
| shortDescription | No |