Skip to main content
POST
/
sandbox
/
shopify
/
{sandbox_id}
/
initialize
Initialize shopify sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/shopify/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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"
    }
  ]
}
'
{
  "sandbox_id": "<string>",
  "status": "idle",
  "message": "<string>",
  "records_created": {}
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Path Parameters

sandbox_id
string
required

The unique sandbox identifier

Query Parameters

init_default_data
boolean
default:false

If true, use default test data for initialization

Body

application/json

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.

products
ShopifyProduct · object[] | null

List of products to create

customers
ShopifyCustomer · object[] | null

List of customers to create

orders
ShopifyOrder · object[] | null

List of orders to create

Response

Successful Response

Response model for sandbox initialization

sandbox_id
string
required

Sandbox identifier

status
enum<string>
required

Current status

Available options:
idle,
occupied,
error
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type