Create a catalog product (step 1 — all 7 types)
Mirrors the Bagisto admin Create-Product wizard step 1: only sku + attribute_family_id + type are submitted (plus super_attributes when type=configurable). Name, description, price, inventories, etc. are added in the step-2 update endpoint (Phase 5.9). Accepts type ∈ {simple, virtual, downloadable, grouped, bundle, configurable, booking}. For type=configurable, super_attributes is required and must be a non-empty map of attribute code (or id) → option_ids — the core repository generates the full Cartesian-product of variants. For booking, the 5 sub-types (default/appointment/event/rental/table) are configured during step-2 update. Returns the full AdminCatalogProduct detail payload — most fields will be null because only sku/type/family are populated yet. Fires catalog.product.create.before and catalog.product.create.after.
Request
- Base URLhttp://localhost:8000/api/admin
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"sku": "sp-001",
"attribute_family_id": 1,
"type": "simple",
"super_attributes": {
"color": [
1,
2
],
"size": [
6,
7
]
}
}Response
Product created. Returns the full AdminCatalogProduct payload (most fields null at this point — step 2 update populates them).
Changes
No recorded changes to this operation across all 8 revisions of this API.