> ## Documentation Index
> Fetch the complete documentation index at: https://www.klavis.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Initialize woocommerce sandbox with data

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



## OpenAPI

````yaml post /sandbox/woocommerce/{sandbox_id}/initialize
openapi: 3.1.0
info:
  title: Klavis AI (https://www.klavis.ai)
  description: Klavis AI - Open Source MCP Integrations for AI Applications
  version: 0.1.0
servers:
  - url: https://api.klavis.ai
    description: US Production server
  - url: https://api.eu.klavis.ai
    description: EU Production server
security: []
paths:
  /sandbox/woocommerce/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize woocommerce sandbox with data
      description: >-
        Initialize the sandbox with woocommerce-specific data following the
        defined schema.
      operationId: initialize_sandbox_sandbox_woocommerce__sandbox_id__initialize_post
      parameters:
        - name: sandbox_id
          in: path
          required: true
          schema:
            type: string
            description: The unique sandbox identifier
            title: Sandbox Id
          description: The unique sandbox identifier
        - name: init_default_data
          in: query
          required: false
          schema:
            type: boolean
            description: If true, use default test data for initialization
            default: false
            title: Init Default Data
          description: If true, use default test data for initialization
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/WooCommerceData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  products:
                    - name: '[Sandbox] Premium Quality Tee'
                      type: simple
                      regular_price: '29.99'
                      description: A high quality t-shirt for testing purposes.
                      short_description: Test Tee
                      status: publish
                      manage_stock: false
                    - name: '[Sandbox] Cool Hoodie'
                      type: simple
                      regular_price: '59.99'
                      description: Warm and cozy hoodie.
                      short_description: Hoodie
                      status: publish
                      manage_stock: false
                  customers:
                    - email: john.doe@example.com
                      first_name: John
                      last_name: Doe
                      username: johndoe
                      billing:
                        first_name: John
                        last_name: Doe
                        company: ''
                        address_1: 969 Market
                        address_2: ''
                        city: San Francisco
                        state: CA
                        postcode: '94103'
                        country: US
                        email: john.doe@example.com
                        phone: (555) 555-5555
                      shipping:
                        first_name: John
                        last_name: Doe
                        company: ''
                        address_1: 969 Market
                        address_2: ''
                        city: San Francisco
                        state: CA
                        postcode: '94103'
                        country: US
                  orders:
                    - customer_index: 0
                      status: processing
                      payment_method: bacs
                      payment_method_title: Direct Bank Transfer
                      line_items:
                        - product_index: 0
                          quantity: 2
                        - product_index: 1
                          quantity: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InitializeSandboxResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WooCommerceData-Input:
      properties:
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/WooCommerceProduct'
              type: array
            - type: 'null'
          title: Products
          description: List of products to create
        customers:
          anyOf:
            - items:
                $ref: '#/components/schemas/WooCommerceCustomer'
              type: array
            - type: 'null'
          title: Customers
          description: List of customers to create
        orders:
          anyOf:
            - items:
                $ref: '#/components/schemas/WooCommerceOrder'
              type: array
            - type: 'null'
          title: Orders
          description: List of orders to create
      type: object
      title: WooCommerceData
      description: >-
        Complete WooCommerce sandbox data structure.


        Products and customers are created first, then orders are created with
        proper references.
    InitializeSandboxResponse:
      properties:
        sandbox_id:
          type: string
          title: Sandbox Id
          description: Sandbox identifier
        status:
          $ref: '#/components/schemas/SandboxStatus'
          description: Current status
        message:
          type: string
          title: Message
          description: Initialization result message
      type: object
      required:
        - sandbox_id
        - status
        - message
      title: InitializeSandboxResponse
      description: Response model for sandbox initialization
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WooCommerceProduct:
      properties:
        name:
          type: string
          minLength: 1
          title: Name
          description: Product name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Product description
        short_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Description
          description: Product short description
        type:
          type: string
          title: Type
          description: Product type
          default: simple
        regular_price:
          anyOf:
            - type: string
            - type: 'null'
          title: Regular Price
          description: Product regular price
        sku:
          anyOf:
            - type: string
            - type: 'null'
          title: Sku
          description: Stock Keeping Unit identifier
        stock_quantity:
          anyOf:
            - type: integer
            - type: 'null'
          title: Stock Quantity
          description: Available inventory count
        status:
          type: string
          title: Status
          description: Product status
          default: publish
        manage_stock:
          type: boolean
          title: Manage Stock
          description: Whether to manage stock
          default: true
        categories:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Categories
          description: List of categories
        images:
          anyOf:
            - items:
                additionalProperties:
                  type: string
                type: object
              type: array
            - type: 'null'
          title: Images
          description: List of images
      type: object
      required:
        - name
      title: WooCommerceProduct
      description: |-
        Simplified WooCommerce product data.

        Attributes:
            name: Product name
            description: Product description
            short_description: Product short description
            type: Product type (simple, variable, etc.)
            regular_price: Product price as string
            sku: Stock Keeping Unit identifier
            stock_quantity: Available inventory count
            status: Product status (publish, draft, private)
            manage_stock: Whether to manage stock
            categories: List of category names
            images: List of image URLs
    WooCommerceCustomer:
      properties:
        email:
          type: string
          format: email
          title: Email
          description: Customer email address
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          description: First name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          description: Last name
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
          description: Username
        billing:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Billing
          description: Billing address
        shipping:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Shipping
          description: Shipping address
      type: object
      required:
        - email
      title: WooCommerceCustomer
      description: |-
        Simplified WooCommerce customer data.

        Attributes:
            email: Customer email address
            first_name: First name
            last_name: Last name
            username: Username
            billing: Billing address details
            shipping: Shipping address details
    WooCommerceOrder:
      properties:
        customer_index:
          type: integer
          minimum: 0
          title: Customer Index
          description: Index of the customer in the customers list (0-based)
        line_items:
          items:
            $ref: '#/components/schemas/WooCommerceOrderLineItem'
          type: array
          minItems: 1
          title: Line Items
          description: List of line items
        status:
          type: string
          title: Status
          description: Order status
          default: pending
        payment_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method
          description: Payment method ID
          default: bacs
        payment_method_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Method Title
          description: Payment method title
          default: Direct Bank Transfer
      type: object
      required:
        - customer_index
        - line_items
      title: WooCommerceOrder
      description: >-
        Simplified WooCommerce order data.


        Orders reference customers and products by their index in the respective
        lists.


        Attributes:
            customer_index: Index of the customer in the customers list (0-based)
            line_items: List of line items
            status: Order status (pending, processing, completed, etc.)
            payment_method: Payment method ID
            payment_method_title: Payment method title
    SandboxStatus:
      type: string
      enum:
        - idle
        - occupied
        - error
      title: SandboxStatus
      description: Status of a sandbox instance - matches database enum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WooCommerceOrderLineItem:
      properties:
        product_index:
          type: integer
          minimum: 0
          title: Product Index
          description: Index of the product in the products list (0-based)
        quantity:
          type: integer
          minimum: 1
          title: Quantity
          description: Quantity of the product to order
          default: 1
      type: object
      required:
        - product_index
      title: WooCommerceOrderLineItem
      description: |-
        Line item for a WooCommerce order.

        Attributes:
            product_index: Index of the product in the products list (0-based)
            quantity: Quantity of the product to order
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````