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

# QuickBooks

> QuickBooks Scenario seeding parameters, nested fields, and examples

Use `quickbooks` in `twins` and put this configuration under `seed_config.quickbooks`.

QuickBooks Online Accounting company with customers, vendors, employees, accounts, products and services, invoices, estimates, sales receipts, payments, bills, purchases, journal entries, budgets, attachments, reports, queries, CDC changes, OAuth credentials, and accounting webhooks.

## Example seed

This is the complete Scenario request body for [creating a Scenario](https://docs.argalabs.com/api-reference/post-create-a-scenario.md). You can also import it with `arga test-runner scenarios import --file scenario.json`.

```json theme={null}
{
  "name": "QuickBooks eval fixture",
  "twins": [
    "quickbooks"
  ],
  "seed_config": {
    "quickbooks": {
      "realm_id": "123146096291789",
      "company_name": "Example Books LLC",
      "currency": "USD",
      "accounts": [
        {
          "alias": "income_account",
          "Name": "Consulting Income",
          "AccountType": "Income",
          "AccountSubType": "ServiceFeeIncome"
        }
      ],
      "customers": [
        {
          "alias": "customer_acme",
          "DisplayName": "Acme Corporation",
          "CompanyName": "Acme Corporation",
          "PrimaryEmailAddr": {
            "Address": "billing@acme.example"
          }
        }
      ],
      "vendors": [
        {
          "alias": "vendor_supply",
          "DisplayName": "Supply Co"
        }
      ],
      "items": [
        {
          "alias": "item_consulting",
          "Name": "Consulting",
          "Type": "Service",
          "UnitPrice": 175,
          "IncomeAccountRef": {
            "value": {
              "$ref": "income_account.Id"
            }
          }
        }
      ],
      "invoices": [
        {
          "alias": "invoice_acme",
          "customer_alias": "customer_acme",
          "Line": [
            {
              "Amount": 1750,
              "DetailType": "SalesItemLineDetail",
              "SalesItemLineDetail": {
                "ItemRef": {
                  "value": {
                    "$ref": "item_consulting.Id"
                  }
                },
                "Qty": 10,
                "UnitPrice": 175
              }
            }
          ]
        }
      ],
      "bills": [
        {
          "vendor_alias": "vendor_supply",
          "Line": [
            {
              "Amount": 250,
              "DetailType": "AccountBasedExpenseLineDetail"
            }
          ]
        }
      ],
      "attachments": [
        {
          "target_alias": "invoice_acme",
          "target_type": "Invoice",
          "filename": "statement.txt",
          "content": "Seeded QuickBooks attachment",
          "content_type": "text/plain"
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.quickbooks`. Required nested fields are marked in their tables. Provider-native objects can contain service-specific fields beyond the representative record shapes below.

| Parameter | Type | Description |
| - | - | - |
| `realm_id` | `string` | Realm id. |
| `company_name` | `string` | Company name. |
| `currency` | `string` | Currency. |
| `accounts` | `object[]` | Accounts fixtures in provider-native format. |
| `customers` | `object[]` | Customers fixtures in provider-native format. |
| `vendors` | `object[]` | Vendors fixtures in provider-native format. |
| `items` | `object[]` | Items fixtures in provider-native format. |
| `invoices` | `object[]` | Invoices fixtures in provider-native format. |
| `bills` | `object[]` | Bills fixtures in provider-native format. |
| `attachments` | `object[]` | Attachments fixtures in provider-native format. |
| `tokens` | `QuickBooksToken[]` | Test credentials, identity assignments, and permission scopes. |
| `companies` | `QuickBooksCompany[]` | Companies fixtures in provider-native format. |
| `access_token` | `string` | Synthetic access token used by the twin. |
| `entities` | `object` | Entities. |
| `minor_version` | `integer` | Minor version. |
| `webhook_auto_dispatch` | `boolean` | Enable automatic delivery of configured twin webhooks. |
| `oauth_clients` | `QuickBooksOAuthClient[]` | Oauth clients fixtures in provider-native format. |
| `webhook_format` | `"cloudevents" / "legacy"` | Webhook format. |
| `requests_per_minute` | `integer` | Requests per minute. |
| `allow_unknown_tokens` | `boolean` | Accept otherwise unknown credentials when supported. |
| `rate_limiting_enabled` | `boolean` | Enable request rate limiting. |
| `webhook_verifier_token` | `string` | Webhook verifier token. |
| `webhook_endpoint` | `string or null` | Webhook endpoint. |
| `batch_requests_per_minute` | `integer` | Batch requests per minute. |
| `country` | `string` | Country. |
| `base_time` | `string` | Reference clock for repeatable fixtures. Omit to use the current clock. |
| `payment_methods` | `object[]` | Payment methods fixtures in provider-native format. |
| `terms` | `object[]` | Terms fixtures in provider-native format. |
| `tax_codes` | `object[]` | Tax codes fixtures in provider-native format. |
| `tax_rates` | `object[]` | Tax rates fixtures in provider-native format. |
| `classes` | `object[]` | Classes fixtures in provider-native format. |
| `departments` | `object[]` | Departments fixtures in provider-native format. |
| `employees` | `object[]` | Employees fixtures in provider-native format. |
| `estimates` | `object[]` | Estimates fixtures in provider-native format. |
| `sales_receipts` | `object[]` | Sales receipts fixtures in provider-native format. |
| `credit_memos` | `object[]` | Credit memos fixtures in provider-native format. |
| `purchases` | `object[]` | Purchases fixtures in provider-native format. |
| `purchase_orders` | `object[]` | Purchase orders fixtures in provider-native format. |
| `bill_payments` | `object[]` | Bill payments fixtures in provider-native format. |
| `payments` | `object[]` | Payments fixtures in provider-native format. |
| `deposits` | `object[]` | Deposits fixtures in provider-native format. |
| `refund_receipts` | `object[]` | Refund receipts fixtures in provider-native format. |
| `vendor_credits` | `object[]` | Vendor credits fixtures in provider-native format. |
| `journal_entries` | `object[]` | Journal entries fixtures in provider-native format. |
| `transfers` | `object[]` | Transfers fixtures in provider-native format. |
| `time_activities` | `object[]` | Time activities fixtures in provider-native format. |
| `budgets` | `object[]` | Budgets fixtures in provider-native format. |

## Seeding behavior

Use native QuickBooks entity fields, directly or inside `values`, with an optional `alias`. Relationship shortcuts such as `customer_alias`, `vendor_alias`, and `item_alias` resolve previously created records. Token grants must include the selected `realm_id`.

## Resource fields

These tables describe the record shapes used by the example. Keep native field names and casing. Map keys such as property names, IDs, and metadata keys are supplied by your fixture.

### `accounts[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `Name` | `string` | Name. |
| `AccountType` | `string` | AccountType. |
| `AccountSubType` | `string` | AccountSubType. |

### `customers[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `DisplayName` | `string` | DisplayName. |
| `CompanyName` | `string` | CompanyName. |
| `PrimaryEmailAddr` | `object` | PrimaryEmailAddr. |

### `vendors[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `DisplayName` | `string` | DisplayName. |

### `items[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `Name` | `string` | Name. |
| `Type` | `string` | Type. |
| `UnitPrice` | `integer` | UnitPrice. |
| `IncomeAccountRef` | `object` | IncomeAccountRef. |

### `invoices[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `customer_alias` | `string` | Customer alias. |
| `Line` | `object[]` | Line fixtures in provider-native format. |

### `invoices[].Line[]`

| Parameter | Type | Description |
| - | - | - |
| `Amount` | `integer` | Amount. |
| `DetailType` | `string` | DetailType. |
| `SalesItemLineDetail` | `object` | SalesItemLineDetail. |

### `bills[]`

| Parameter | Type | Description |
| - | - | - |
| `vendor_alias` | `string` | Vendor alias. |
| `Line` | `object[]` | Line fixtures in provider-native format. |

### `bills[].Line[]`

| Parameter | Type | Description |
| - | - | - |
| `Amount` | `integer` | Amount. |
| `DetailType` | `string` | DetailType. |

### `attachments[]`

| Parameter | Type | Description |
| - | - | - |
| `target_alias` | `string` | Target alias. |
| `target_type` | `string` | Target type. |
| `filename` | `string` | Filename. |
| `content` | `string` | Text content. |
| `content_type` | `string` | Content type. |

## Typed configuration objects

Named object types in the parameter table use these fields.

### QuickBooksCompany

| Parameter | Type | Description |
| - | - | - |
| `realm_id` | `string` | Realm id. |
| `company_name` | `string` | Company name. |
| `legal_name` | `string` | Legal name. |
| `country` | `string` | Country. |
| `currency` | `string` | Currency. |
| `email` | `string` | Main account email address. |
| `subscription_status` | `string` | Subscription status. |
| `offering_sku` | `string` | Offering sku. |

### QuickBooksOAuthClient

| Parameter | Type | Description |
| - | - | - |
| `client_id` | `string` | Test OAuth client identifier. |
| `client_secret` | `string` | Test OAuth client secret. |
| `name` | `string` | Human-readable name. |
| `redirect_uris` | `string[]` | Redirect uris fixtures in provider-native format. |
| `allowed_scopes` | `string[]` | Allowed scopes fixtures in provider-native format. |
| `active` | `boolean` | Enable or set active behavior. |

### QuickBooksToken

| Parameter | Type | Description |
| - | - | - |
| `access_token` | `string` | Synthetic access token used by the twin. |
| `refresh_token` | `string or null` | Refresh token. |
| `scopes` | `string[]` | Scopes fixtures in provider-native format. |
| `realm_ids` | `string[]` | Realm ids fixtures in provider-native format. |
| `expires_in` | `integer` | Expires in. |
| `refresh_expires_in` | `integer` | Refresh expires in. |
| `refresh_hard_expires_in` | `integer` | Refresh hard expires in. |
| `issued_at` | `string or null` | Issued at. |
| `revoked` | `boolean` | Enable or set revoked behavior. |

See [Scenario seeding](https://docs.argalabs.com/twins/seeding.md) for saving, provisioning, and resetting fixtures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.