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

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



## OpenAPI

````yaml post /sandbox/moneybird/{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/moneybird/{sandbox_id}/initialize:
    post:
      tags:
        - sandbox
      summary: Initialize moneybird sandbox with data
      description: >-
        Initialize the sandbox with moneybird-specific data following the
        defined schema.
      operationId: initialize_sandbox_sandbox_moneybird__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/MoneybirdData-Input'
                - type: 'null'
              title: Request Body
            examples:
              default:
                summary: Example initialization data
                value:
                  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'
      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:
    MoneybirdData-Input:
      properties:
        ledger_accounts:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdLedgerAccount'
              type: array
            - type: 'null'
          title: Ledger Accounts
          description: List of ledger accounts to create
        contacts:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdContact'
              type: array
            - type: 'null'
          title: Contacts
          description: List of contacts to create
        products:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdProduct'
              type: array
            - type: 'null'
          title: Products
          description: List of products to create
        projects:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdProject'
              type: array
            - type: 'null'
          title: Projects
          description: List of projects to create
        time_entries:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdTimeEntry'
              type: array
            - type: 'null'
          title: Time Entries
          description: List of time entries to create
        sales_invoices:
          anyOf:
            - items:
                $ref: '#/components/schemas/MoneybirdSalesInvoice'
              type: array
            - type: 'null'
          title: Sales Invoices
          description: List of sales invoices to create
      type: object
      title: MoneybirdData
      description: |-
        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)
    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
    MoneybirdLedgerAccount:
      properties:
        rgs_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Rgs Code
          description: RGS code - required for creation, not returned by GET API
        name:
          type: string
          title: Name
          description: Account name
        account_type:
          type: string
          title: Account Type
          description: Account type (revenue, expense, etc.)
        account_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Id
          description: Account identifier (optional for system accounts)
      type: object
      required:
        - name
        - account_type
      title: MoneybirdLedgerAccount
      description: |-
        Moneybird ledger account (chart of accounts) - API format

        Attributes:
            rgs_code: Reference Grootboekschema (RGS) code - required for creation
            name: Account name
            account_type: Account type (revenue, expense, etc.)
            account_id: Account identifier (optional, system accounts may not have this)
    MoneybirdContact:
      properties:
        company_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Company Name
          description: Company name
        firstname:
          anyOf:
            - type: string
            - type: 'null'
          title: Firstname
          description: First name
        lastname:
          anyOf:
            - type: string
            - type: 'null'
          title: Lastname
          description: Last name
        phone:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone
          description: Phone number
        address1:
          anyOf:
            - type: string
            - type: 'null'
          title: Address1
          description: Street address
        city:
          anyOf:
            - type: string
            - type: 'null'
          title: City
          description: City
        zipcode:
          anyOf:
            - type: string
            - type: 'null'
          title: Zipcode
          description: Postal code
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: Country code
        sepa_iban:
          anyOf:
            - type: string
            - type: 'null'
          title: Sepa Iban
          description: SEPA IBAN
      type: object
      title: MoneybirdContact
      description: |-
        Moneybird contact (customer/supplier) - API format

        Attributes:
            company_name: Company name (optional, for business contacts)
            firstname: First name (optional, for individual contacts)
            lastname: Last name (optional, for individual contacts)
            phone: Phone number
            address1: Street address
            city: City
            zipcode: Postal code
            country: Country code (e.g., 'NL', 'DE', 'FR')
            sepa_iban: SEPA IBAN for direct debit (optional)
    MoneybirdProduct:
      properties:
        description:
          type: string
          title: Description
          description: Product description
        title:
          type: string
          title: Title
          description: Product title/name
        price:
          type: string
          title: Price
          description: Product price as string
        currency:
          type: string
          title: Currency
          description: Currency code (e.g., 'EUR')
        identifier:
          type: string
          title: Identifier
          description: Product SKU/identifier
        frequency:
          anyOf:
            - type: integer
            - type: 'null'
          title: Frequency
          description: Billing frequency
        frequency_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency Type
          description: Frequency type (month, year)
      type: object
      required:
        - description
        - title
        - price
        - currency
        - identifier
      title: MoneybirdProduct
      description: |-
        Moneybird product/service - API format

        Attributes:
            description: Product description
            title: Product title/name
            price: Product price
            currency: Currency code (e.g., 'EUR')
            identifier: Product SKU/identifier
            frequency: Billing frequency (optional, for recurring products)
            frequency_type: Frequency type (e.g., 'month', 'year')
    MoneybirdProject:
      properties:
        name:
          type: string
          title: Name
          description: Project name
        state:
          type: string
          title: State
          description: Project state (active, archived)
          default: active
        budget:
          anyOf:
            - type: number
            - type: 'null'
          title: Budget
          description: Project budget
      type: object
      required:
        - name
      title: MoneybirdProject
      description: |-
        Moneybird project for time tracking and invoicing - API format

        Attributes:
            name: Project name
            state: Project state (active, archived)
            budget: Project budget
    MoneybirdTimeEntry:
      properties:
        description:
          type: string
          title: Description
          description: Description of work performed
        hours:
          type: number
          exclusiveMinimum: 0
          title: Hours
          description: Number of hours worked
        billable:
          type: boolean
          title: Billable
          description: Whether this time is billable
          default: true
      type: object
      required:
        - description
        - hours
      title: MoneybirdTimeEntry
      description: >-
        Moneybird time entry - API format


        Note: During initialization, this will be linked to a project and
        contact automatically.

        The started_at and ended_at timestamps will be generated based on the
        hours field.


        Attributes:
            description: Description of work performed
            hours: Number of hours worked
            billable: Whether this time is billable
    MoneybirdSalesInvoice:
      properties:
        reference:
          type: string
          title: Reference
          description: Invoice reference number
        currency:
          type: string
          title: Currency
          description: Currency code
          default: EUR
        prices_are_incl_tax:
          type: boolean
          title: Prices Are Incl Tax
          description: Whether prices include tax
          default: false
        state:
          type: string
          title: State
          description: Invoice state (draft, open, paid)
          default: draft
        details:
          items:
            $ref: '#/components/schemas/MoneybirdInvoiceDetail'
          type: array
          minItems: 1
          title: Details
          description: Invoice line items
      type: object
      required:
        - reference
        - details
      title: MoneybirdSalesInvoice
      description: >-
        Moneybird sales invoice - API format


        Note: During initialization, contact_id will be automatically assigned
        based on

        the contacts created. Invoice dates will be calculated dynamically.


        Attributes:
            reference: Invoice reference number
            currency: Currency code (e.g., 'EUR')
            prices_are_incl_tax: Whether prices include tax
            state: Invoice state (draft, open, paid)
            details: List of invoice line items
    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
    MoneybirdInvoiceDetail:
      properties:
        description:
          type: string
          title: Description
          description: Line item description
        price:
          type: string
          title: Price
          description: Unit price as string
        amount:
          type: string
          title: Amount
          description: Quantity as string
      type: object
      required:
        - description
        - price
        - amount
      title: MoneybirdInvoiceDetail
      description: Invoice line item details
  securitySchemes:
    HTTPBearer:
      type: http
      description: Your Klavis AI API key.
      scheme: bearer
      x-fern-bearer:
        name: api_key

````