Create and publish a product
Outcome: an active Copenhagen Lamp variant that the prepared Denmark store can return with EUR price and availability.
Prerequisites
Complete Configure a store. Retain its store and three channel IDs. Use an Admin credential from a trusted service.
1. Create the product and variant
Use {"input":{"name":"Copenhagen Lamp","slug":"copenhagen-lamp","status":"ACTIVE","tags":["lighting"]}}.
Then create its single variant:
2. Add price and inventory
Call productVariantPricesBulkCreate with one price whose variant ID is the returned variant, value is EUR 129.00 (12900), channel is the DK price channel, country is DK, and tax behavior matches the project configuration. Call inventoryEntryBulkCreate with SKU LAMP-BLACK, quantity 10, the DK supply channel, and TRACK_AND_ALLOCATE. Inspect typed errors; these bulk operations are bounded validation/save operations, not a promise of partial success.
3. Publish both levels
Call productPublish with the product ID and distribution channel. Call productVariantPublish with product ID, variant ID, distribution channel, publishedAt, and availableForPurchaseAt set to the intended current or future UTC timestamps.
4. Verify through Storefront
Run the complete product query from From product to first order with store ID, price channel, EUR, DK, and slug. Verify the returned SKU, 12900 price, and availableForPurchase: true before using the variant in a cart.
If the product is absent, follow Publication and catalog visibility one condition at a time. Exact operation contracts: productVariantsBulkCreate, productVariantPricesBulkCreate, and inventoryEntryBulkCreate.