> ## 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 shopify sandbox with data

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



## OpenAPI

````yaml post /sandbox/shopify/{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/shopify/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize shopify sandbox with data
      description: >-
        Initialize the sandbox with shopify-specific data following the defined
        schema.
      operationId: initialize_sandbox_sandbox_shopify__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/ShopifyData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  products:
                    - title: '[Sandbox] Premium Cotton T-Shirt'
                      description: High-quality cotton t-shirt perfect for everyday wear
                      vendor: Sandbox Apparel Co
                      category: Apparel
                      price: '29.99'
                      sku: SAND-TSHIRT-001
                      stock: 100
                    - title: '[Sandbox] Wireless Bluetooth Headphones'
                      description: >-
                        Premium noise-canceling headphones with 30-hour battery
                        life
                      vendor: Sandbox Electronics
                      category: Electronics
                      price: '149.99'
                      sku: SAND-HEADPH-001
                      stock: 50
                    - title: '[Sandbox] Organic Coffee Beans - Dark Roast'
                      description: Ethically sourced, organic dark roast coffee beans
                      vendor: Sandbox Coffee Roasters
                      category: Food & Beverage
                      price: '18.99'
                      sku: SAND-COFFEE-001
                      stock: 200
                    - title: '[Sandbox] Yoga Mat - Eco Friendly'
                      description: Non-slip, eco-friendly yoga mat made from natural rubber
                      vendor: Sandbox Fitness Gear
                      category: Sports & Fitness
                      price: '45.00'
                      sku: SAND-YOGA-001
                      stock: 75
                    - title: '[Sandbox] Leather Wallet - Minimalist'
                      description: >-
                        Handcrafted minimalist leather wallet with RFID
                        protection
                      vendor: Sandbox Leather Goods
                      category: Accessories
                      price: '59.99'
                      sku: SAND-WALLET-001
                      stock: 60
                    - title: '[Sandbox] Smart Watch - Fitness Tracker'
                      description: >-
                        Advanced fitness tracking with heart rate monitor and
                        GPS
                      vendor: Sandbox Tech
                      category: Electronics
                      price: '199.99'
                      sku: SAND-WATCH-001
                      stock: 40
                    - title: '[Sandbox] Ceramic Coffee Mug Set'
                      description: Set of 4 handmade ceramic coffee mugs in various colors
                      vendor: Sandbox Home Goods
                      category: Home & Kitchen
                      price: '39.99'
                      sku: SAND-MUG-001
                      stock: 120
                    - title: '[Sandbox] Portable Phone Charger'
                      description: >-
                        High-capacity 20000mAh portable battery pack with fast
                        charging
                      vendor: Sandbox Electronics
                      category: Electronics
                      price: '34.99'
                      sku: SAND-CHARGER-001
                      stock: 150
                    - title: '[Sandbox] Stainless Steel Water Bottle'
                      description: Insulated water bottle keeps drinks cold for 24 hours
                      vendor: Sandbox Outdoor Gear
                      category: Sports & Fitness
                      price: '24.99'
                      sku: SAND-BOTTLE-001
                      stock: 180
                    - title: '[Sandbox] Backpack - Travel'
                      description: Durable travel backpack with laptop compartment
                      vendor: Sandbox Travel Gear
                      category: Bags & Luggage
                      price: '69.99'
                      sku: SAND-BACKPACK-001
                      stock: 90
                  customers:
                    - email: john.smith@sandbox-test.example.com
                      name: John Smith
                      address: 123 Main Street
                      city: San Francisco
                      state: CA
                      zip: '94102'
                      country: US
                    - email: emma.wilson@sandbox-test.example.com
                      name: Emma Wilson
                      address: 456 Oak Avenue
                      city: New York
                      state: NY
                      zip: '10001'
                      country: US
                    - email: michael.chen@sandbox-test.example.com
                      name: Michael Chen
                      address: 789 Pine Road
                      city: Seattle
                      state: WA
                      zip: '98101'
                      country: US
                    - email: sophia.martinez@sandbox-test.example.com
                      name: Sophia Martinez
                      address: 321 Elm Street
                      city: Austin
                      state: TX
                      zip: '78701'
                      country: US
                    - email: oliver.brown@sandbox-test.example.com
                      name: Oliver Brown
                      address: 654 Maple Drive
                      city: Boston
                      state: MA
                      zip: '02101'
                      country: US
                    - email: ava.johnson@sandbox-test.example.com
                      name: Ava Johnson
                      address: 987 Cedar Lane
                      city: Denver
                      state: CO
                      zip: '80201'
                      country: US
                    - email: isabella.garcia@sandbox-test.example.com
                      name: Isabella Garcia
                      address: 258 Willow Way
                      city: Miami
                      state: FL
                      zip: '33101'
                      country: US
                    - email: liam.miller@sandbox-test.example.com
                      name: Liam Miller
                      address: 369 Spruce Court
                      city: Chicago
                      state: IL
                      zip: '60601'
                      country: US
                  orders:
                    - customer_index: 0
                      line_items:
                        - product_index: 0
                          quantity: 2
                      financial_status: paid
                    - customer_index: 1
                      line_items:
                        - product_index: 1
                          quantity: 1
                      financial_status: pending
                    - customer_index: 2
                      line_items:
                        - product_index: 2
                          quantity: 3
                      financial_status: paid
                    - customer_index: 3
                      line_items:
                        - product_index: 3
                          quantity: 1
                        - product_index: 4
                          quantity: 2
                      financial_status: paid
                    - customer_index: 4
                      line_items:
                        - product_index: 5
                          quantity: 1
                      financial_status: pending
                    - customer_index: 5
                      line_items:
                        - product_index: 6
                          quantity: 4
                      financial_status: paid
                    - customer_index: 6
                      line_items:
                        - product_index: 7
                          quantity: 1
                        - product_index: 8
                          quantity: 2
                      financial_status: paid
                    - customer_index: 7
                      line_items:
                        - product_index: 9
                          quantity: 1
                      financial_status: pending
      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:
    ShopifyData-Input:
      properties:
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/ShopifyProduct'
              type: array
            - type: 'null'
          title: Products
          description: List of products to create
        customers:
          anyOf:
            - items:
                $ref: '#/components/schemas/ShopifyCustomer'
              type: array
            - type: 'null'
          title: Customers
          description: List of customers to create
        orders:
          anyOf:
            - items:
                $ref: '#/components/schemas/ShopifyOrder'
              type: array
            - type: 'null'
          title: Orders
          description: List of orders to create
      type: object
      title: ShopifyData
      description: >-
        Complete Shopify sandbox data structure.


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

        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
    ShopifyProduct:
      properties:
        title:
          type: string
          minLength: 1
          title: Title
          description: Product name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Product description
        vendor:
          type: string
          title: Vendor
          description: Brand or vendor name
        category:
          type: string
          title: Category
          description: Product category/type
        price:
          type: string
          title: Price
          description: Product price (e.g., '29.99')
        sku:
          type: string
          title: Sku
          description: Stock Keeping Unit identifier
        stock:
          type: integer
          minimum: 0
          title: Stock
          description: Available inventory count
          default: 0
        status:
          type: string
          title: Status
          description: Product status (active, draft, archived)
          default: active
      type: object
      required:
        - title
        - vendor
        - category
        - price
        - sku
      title: ShopifyProduct
      description: >-
        Simplified Shopify product data.


        Single-variant products are supported directly with price/sku/stock
        fields.

        For multi-variant products, use the implementation's API directly.


        Attributes:
            title: Product name
            description: Product description (plain text or HTML)
            vendor: Brand or vendor name
            category: Product category/type
            price: Product price as string (e.g., '29.99')
            sku: Stock Keeping Unit identifier
            stock: Available inventory count
            status: Product status (active, draft, archived)
    ShopifyCustomer:
      properties:
        email:
          anyOf:
            - type: string
              format: email
            - type: 'null'
          title: Email
          description: Customer email address
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Customer full name
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: Street address
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City name
        state:
          anyOf:
            - type: string
            - type: 'null'
          title: State
          description: State/province code
        zip:
          anyOf:
            - type: string
            - type: 'null'
          title: Zip
          description: Postal/ZIP code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country code (e.g., 'US')
          default: US
      type: object
      title: ShopifyCustomer
      description: |-
        Simplified Shopify customer data with flattened address.

        Attributes:
            email: Customer email address
            name: Customer full name (will be split into first/last for API)
            address: Street address
            city: City name
            state: State/province code
            zip: Postal/ZIP code
            country: Country code (e.g., 'US')
    ShopifyOrder:
      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/ShopifyOrderLineItem'
          type: array
          minItems: 1
          title: Line Items
          description: List of line items
        financial_status:
          type: string
          title: Financial Status
          description: Order financial status (pending, paid, refunded, etc.)
          default: pending
      type: object
      required:
        - customer_index
        - line_items
      title: ShopifyOrder
      description: >-
        Simplified Shopify order data.


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

        This allows orders to be created with proper references after products
        and customers exist.


        Attributes:
            customer_index: Index of the customer in the customers list (0-based)
            line_items: List of line items (products and quantities)
            financial_status: Order financial status (pending, paid, refunded, etc.)
    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
    ShopifyOrderLineItem:
      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: ShopifyOrderLineItem
      description: |-
        Line item for a Shopify 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

````