---
title: "Initialize woocommerce sandbox with data"
method: POST
path: "/sandbox/woocommerce/{sandbox_id}/initialize"
tags: ["sandbox"]
---

# Initialize woocommerce sandbox with data

`POST /sandbox/woocommerce/{sandbox_id}/initialize`

Initialize the sandbox with woocommerce-specific data following the defined schema.

## Path parameters

- `sandbox_id` string, required — The unique sandbox identifier

## Query parameters

- `init_default_data` boolean — If true, use default test data for initialization

## Request body

- WooCommerceDataInput — Complete WooCommerce sandbox data structure. Products and customers are created first, then orders are created with proper references.
  - `products` WooCommerceProduct[], nullable — List of products to create
    - `name` string, required — Product name
    - `description` string, nullable — Product description
    - `short_description` string, nullable — Product short description
    - `type` string — Product type
    - `regular_price` string, nullable — Product regular price
    - `sku` string, nullable — Stock Keeping Unit identifier
    - `stock_quantity` integer, nullable — Available inventory count
    - `status` string — Product status
    - `manage_stock` boolean — Whether to manage stock
    - `categories` object[], nullable — List of categories
    - `images` object[], nullable — List of images
  - `customers` WooCommerceCustomer[], nullable — List of customers to create
    - `email` string, email, required — Customer email address
    - `first_name` string, nullable — First name
    - `last_name` string, nullable — Last name
    - `username` string, nullable — Username
    - `billing` object, nullable — Billing address
    - `shipping` object, nullable — Shipping address
  - `orders` WooCommerceOrder[], nullable — List of orders to create
    - `customer_index` integer, required — Index of the customer in the customers list (0-based)
    - `line_items` WooCommerceOrderLineItem[], required — List of line items
      - `product_index` integer, required — Index of the product in the products list (0-based)
      - `quantity` integer — Quantity of the product to order
    - `status` string — Order status
    - `payment_method` string, nullable — Payment method ID
    - `payment_method_title` string, nullable — Payment method title

## Response `200`

Successful Response

- InitializeSandboxResponse — Response model for sandbox initialization
  - `sandbox_id` string, required — Sandbox identifier
  - `status` 'idle' | 'occupied' | 'error', required — Status of a sandbox instance - matches database enum
  - `message` string, required — Initialization result message

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai.md) · [All operations](https://skmtc.net/klavis-ai/apis/klavis-ai-https-www-klavis-ai/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/klavis-ai/klavis-ai-https-www-klavis-ai/revisions/1f05ced7280f/schema)
