> ## 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.

# Xero

> Xero Scenario seeding parameters, nested fields, and examples

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

Xero Accounting organisation with contacts, chart of accounts, tax rates, inventory items, invoices, payments, bank transactions, credit notes, purchase orders, quotes, manual journals, tracking, attachments, reports, OAuth connections, tenant isolation, 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": "Xero eval fixture",
  "twins": [
    "xero"
  ],
  "seed_config": {
    "xero": {
      "tenant_id": "4c3bd5a1-1bd6-4f42-9f4e-c275f5530f0f",
      "tenant_name": "Example Books Ltd",
      "country_code": "US",
      "base_currency": "USD",
      "accounts": [
        {
          "alias": "bank_account",
          "Code": "091",
          "Name": "Business Bank Account",
          "Type": "BANK",
          "BankAccountNumber": "000123456789"
        },
        {
          "alias": "consulting_income",
          "Code": "210",
          "Name": "Consulting Income",
          "Type": "REVENUE",
          "TaxType": "OUTPUT"
        }
      ],
      "tax_rates": [
        {
          "TaxType": "OUTPUT",
          "Name": "Sales Tax",
          "EffectiveRate": 10,
          "Status": "ACTIVE",
          "TaxComponents": [
            {
              "Name": "Sales Tax",
              "Rate": 10,
              "IsCompound": false,
              "IsNonRecoverable": false
            }
          ]
        }
      ],
      "contacts": [
        {
          "alias": "customer_acme",
          "Name": "Acme Corporation",
          "ContactNumber": "ACME-001",
          "EmailAddress": "billing@acme.example"
        }
      ],
      "items": [
        {
          "alias": "consulting",
          "Code": "CONSULT",
          "Name": "Consulting",
          "Description": "Professional consulting services",
          "SalesDetails": {
            "UnitPrice": 175,
            "AccountCode": "210",
            "TaxType": "OUTPUT"
          }
        }
      ],
      "invoices": [
        {
          "alias": "invoice_acme",
          "contact_alias": "customer_acme",
          "Type": "ACCREC",
          "Status": "AUTHORISED",
          "LineAmountTypes": "Exclusive",
          "LineItems": [
            {
              "Description": "Consulting services",
              "ItemCode": "CONSULT",
              "Quantity": 10,
              "UnitAmount": 175,
              "AccountCode": "210",
              "TaxType": "OUTPUT"
            }
          ]
        }
      ],
      "payments": [
        {
          "invoice_alias": "invoice_acme",
          "account_alias": "bank_account",
          "Amount": 500,
          "Reference": "Part payment"
        }
      ],
      "attachments": [
        {
          "target_alias": "invoice_acme",
          "resource": "Invoices",
          "filename": "statement.txt",
          "content": "Seeded Xero attachment",
          "content_type": "text/plain",
          "include_online": true
        }
      ]
    }
  }
}
```

## Parameters

The following fields belong directly inside `seed_config.xero`. 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 |
| - | - | - |
| `tenant_id` | `string` | Tenant id. |
| `tenant_name` | `string` | Tenant name. |
| `country_code` | `string` | Country code. |
| `base_currency` | `string` | Base currency. |
| `attachments` | `object[]` | Attachments fixtures in provider-native format. |
| `tenants` | `XeroTenant[]` | Tenants fixtures in provider-native format. |
| `access_token` | `string` | Synthetic access token used by the twin. |
| `tokens` | `XeroToken[]` | Test credentials, identity assignments, and permission scopes. |
| `webhook_auto_dispatch` | `boolean` | Enable automatic delivery of configured twin webhooks. |
| `webhook_signing_key` | `string` | Webhook signing key. |
| `oauth_clients` | `XeroOAuthClient[]` | Oauth clients fixtures in provider-native format. |
| `requests_per_day` | `integer` | Requests per day. |
| `requests_per_minute` | `integer` | Requests per minute. |
| `allow_unknown_tokens` | `boolean` | Accept otherwise unknown credentials when supported. |
| `oauth_code_ttl_seconds` | `integer` | Oauth code ttl seconds, in seconds. |
| `webhook_url` | `string or null` | Webhook url. |
| `rate_limiting_enabled` | `boolean` | Enable request rate limiting. |
| `base_time` | `string` | Reference clock for repeatable fixtures. Omit to use the current clock. |
| `Accounts` | `object[]` | Accounts records. Aliases: `accounts` and `accounts`. |
| `TaxRates` | `object[]` | TaxRates records. Aliases: `taxrates` and `tax_rates`. |
| `TrackingCategories` | `object[]` | TrackingCategories records. Aliases: `trackingcategories` and `tracking_categories`. |
| `Contacts` | `object[]` | Contacts records. Aliases: `contacts` and `contacts`. |
| `ContactGroups` | `object[]` | ContactGroups records. Aliases: `contactgroups` and `contact_groups`. |
| `Items` | `object[]` | Items records. Aliases: `items` and `items`. |
| `Invoices` | `object[]` | Invoices records. Aliases: `invoices` and `invoices`. |
| `CreditNotes` | `object[]` | CreditNotes records. Aliases: `creditnotes` and `credit_notes`. |
| `BankTransactions` | `object[]` | BankTransactions records. Aliases: `banktransactions` and `bank_transactions`. |
| `BankTransfers` | `object[]` | BankTransfers records. Aliases: `banktransfers` and `bank_transfers`. |
| `PurchaseOrders` | `object[]` | PurchaseOrders records. Aliases: `purchaseorders` and `purchase_orders`. |
| `Quotes` | `object[]` | Quotes records. Aliases: `quotes` and `quotes`. |
| `ManualJournals` | `object[]` | ManualJournals records. Aliases: `manualjournals` and `manual_journals`. |
| `Payments` | `object[]` | Payments records. Aliases: `payments` and `payments`. |

## Seeding behavior

Use Xero-native field names and aliases for relationships. Tokens must authorize the selected tenant. Resource collections accept their canonical provider names and the supported snake\_case aliases; explicit dates are preserved.

## 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. |
| `Code` | `string` | Code. |
| `Name` | `string` | Name. |
| `Type` | `string` | Type. |
| `BankAccountNumber` | `string` | BankAccountNumber. |
| `TaxType` | `string` | TaxType. |

### `tax_rates[]`

| Parameter | Type | Description |
| - | - | - |
| `TaxType` | `string` | TaxType. |
| `Name` | `string` | Name. |
| `EffectiveRate` | `integer` | EffectiveRate. |
| `Status` | `string` | Status. |
| `TaxComponents` | `object[]` | TaxComponents fixtures in provider-native format. |

### `tax_rates[].TaxComponents[]`

| Parameter | Type | Description |
| - | - | - |
| `Name` | `string` | Name. |
| `Rate` | `integer` | Rate. |
| `IsCompound` | `boolean` | Enable or set IsCompound behavior. |
| `IsNonRecoverable` | `boolean` | Enable or set IsNonRecoverable behavior. |

### `contacts[]`

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

### `items[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `Code` | `string` | Code. |
| `Name` | `string` | Name. |
| `Description` | `string` | Description. |
| `SalesDetails` | `object` | SalesDetails. |

### `invoices[]`

| Parameter | Type | Description |
| - | - | - |
| `alias` | `string` | Fixture-local name used by supported relationship references. |
| `contact_alias` | `string` | Contact alias. |
| `Type` | `string` | Type. |
| `Status` | `string` | Status. |
| `LineAmountTypes` | `string` | LineAmountTypes. |
| `LineItems` | `object[]` | LineItems fixtures in provider-native format. |

### `invoices[].LineItems[]`

| Parameter | Type | Description |
| - | - | - |
| `Description` | `string` | Description. |
| `ItemCode` | `string` | ItemCode. |
| `Quantity` | `integer` | Quantity. |
| `UnitAmount` | `integer` | UnitAmount. |
| `AccountCode` | `string` | AccountCode. |
| `TaxType` | `string` | TaxType. |

### `payments[]`

| Parameter | Type | Description |
| - | - | - |
| `invoice_alias` | `string` | Invoice alias. |
| `account_alias` | `string` | Account alias. |
| `Amount` | `integer` | Amount. |
| `Reference` | `string` | Reference. |

### `attachments[]`

| Parameter | Type | Description |
| - | - | - |
| `target_alias` | `string` | Target alias. |
| `resource` | `string` | Resource. |
| `filename` | `string` | Filename. |
| `content` | `string` | Text content. |
| `content_type` | `string` | Content type. |
| `include_online` | `boolean` | Enable or set include online behavior. |

## Typed configuration objects

Named object types in the parameter table use these fields.

### XeroOAuthClient

| 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. |
| `custom_connection` | `boolean` | Enable or set custom connection behavior. |

### XeroTenant

| Parameter | Type | Description |
| - | - | - |
| `tenant_id` | `string` | Tenant id. |
| `tenant_name` | `string` | Tenant name. |
| `tenant_type` | `string` | Tenant type. |
| `organisation_id` | `string or null` | Organisation id. |
| `country_code` | `string` | Country code. |
| `base_currency` | `string` | Base currency. |
| `timezone` | `string` | Timezone. |

### XeroToken

| Parameter | Type | Description |
| - | - | - |
| `access_token` | `string` | Synthetic access token used by the twin. |
| `refresh_token` | `string or null` | Refresh token. |
| `client_id` | `string or null` | Test OAuth client identifier. |
| `scopes` | `string[]` | Scopes fixtures in provider-native format. |
| `tenant_ids` | `string[]` | Tenant ids fixtures in provider-native format. |
| `expires_in` | `integer` | Expires in. |
| `refresh_expires_in` | `integer` | Refresh expires in. |
| `issued_at` | `string or null` | Issued at. |
| `revoked` | `boolean` | Enable or set revoked behavior. |
| `custom_connection` | `boolean` | Enable or set custom connection 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.