Skip to main content
POST
/
sandbox
/
moneybird
/
{sandbox_id}
/
initialize
Initialize moneybird sandbox with data
curl --request POST \
  --url https://api.klavis.ai/sandbox/moneybird/{sandbox_id}/initialize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ledger_accounts": [
    {
      "name": "Sandbox Sales Revenue",
      "account_type": "revenue",
      "account_id": "8000"
    },
    {
      "name": "Sandbox Consulting Revenue",
      "account_type": "revenue",
      "account_id": "8100"
    },
    {
      "name": "Sandbox Product Revenue",
      "account_type": "revenue",
      "account_id": "8200"
    }
  ],
  "contacts": [
    {
      "company_name": "Sandbox Tech Solutions B.V.",
      "phone": "+31201234567",
      "address1": "Herengracht 123",
      "city": "Amsterdam",
      "zipcode": "1012 AB",
      "country": "NL",
      "sepa_iban": "NL91ABNA0417164300"
    },
    {
      "company_name": "Sandbox Digital Marketing GmbH",
      "phone": "+4930123456",
      "address1": "Friedrichstraße 50",
      "city": "Berlin",
      "zipcode": "10117",
      "country": "DE"
    },
    {
      "firstname": "Emma",
      "lastname": "van der Berg",
      "phone": "+31207654321",
      "address1": "Prinsengracht 456",
      "city": "Amsterdam",
      "zipcode": "1016 HJ",
      "country": "NL"
    }
  ],
  "products": [
    {
      "description": "Premium Software License - Annual Subscription",
      "title": "Software License",
      "price": "2999.00",
      "currency": "EUR",
      "identifier": "SANDBOX-SOFT-001"
    },
    {
      "description": "Professional Consulting Services - Per Hour",
      "title": "Consulting",
      "price": "150.00",
      "currency": "EUR",
      "identifier": "SANDBOX-CONS-001"
    },
    {
      "description": "Web Development Services - Per Hour",
      "title": "Web Development",
      "price": "125.00",
      "currency": "EUR",
      "identifier": "SANDBOX-DEV-001"
    }
  ],
  "projects": [
    {
      "name": "Sandbox Website Redesign 2025",
      "state": "active",
      "budget": 15000
    },
    {
      "name": "Sandbox Mobile App Development",
      "state": "active",
      "budget": 50000
    },
    {
      "name": "Sandbox Marketing Campaign Q1",
      "state": "active",
      "budget": 10000
    }
  ],
  "time_entries": [
    {
      "description": "Frontend development - Homepage redesign",
      "hours": 2,
      "billable": true
    },
    {
      "description": "Client meeting - Project kickoff",
      "hours": 1,
      "billable": true
    },
    {
      "description": "Backend API development",
      "hours": 4,
      "billable": true
    }
  ],
  "sales_invoices": [
    {
      "reference": "SANDBOX-2025-001",
      "currency": "EUR",
      "prices_are_incl_tax": false,
      "state": "draft",
      "details": [
        {
          "description": "Premium Software License - Annual",
          "price": "2999.00",
          "amount": "1"
        },
        {
          "description": "Setup and Configuration",
          "price": "500.00",
          "amount": "1"
        }
      ]
    },
    {
      "reference": "SANDBOX-2025-002",
      "currency": "EUR",
      "prices_are_incl_tax": false,
      "state": "draft",
      "details": [
        {
          "description": "Consulting Services",
          "price": "150.00",
          "amount": "20"
        }
      ]
    },
    {
      "reference": "SANDBOX-2025-003",
      "currency": "EUR",
      "prices_are_incl_tax": false,
      "state": "draft",
      "details": [
        {
          "description": "Web Development Services",
          "price": "125.00",
          "amount": "40"
        },
        {
          "description": "Design Services",
          "price": "100.00",
          "amount": "15"
        }
      ]
    }
  ]
}
'
{
  "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 Moneybird sandbox data structure - API format

Note: Objects are created in dependency order:

  1. Ledger accounts (no dependencies)
  2. Contacts (no dependencies)
  3. Products (no dependencies, but needs tax rates from system)
  4. Projects (no dependencies)
  5. Time entries (linked to projects and contacts)
  6. Sales invoices (linked to contacts)
ledger_accounts
MoneybirdLedgerAccount · object[] | null

List of ledger accounts to create

contacts
MoneybirdContact · object[] | null

List of contacts to create

products
MoneybirdProduct · object[] | null

List of products to create

projects
MoneybirdProject · object[] | null

List of projects to create

time_entries
MoneybirdTimeEntry · object[] | null

List of time entries to create

sales_invoices
MoneybirdSalesInvoice · object[] | null

List of sales invoices 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
message
string
required

Initialization result message

records_created
Records Created · object

Count of records created per object type