---
title: "Sets the chart of accounts, the conversion date and conversion balances"
method: POST
path: "/Setup"
tags: ["Accounting"]
---

# Sets the chart of accounts, the conversion date and conversion balances

`POST /Setup`

## Headers

- `Idempotency-Key` string

## Request body

- Setup
  - `ConversionDate` ConversionDate — The date when the organisation starts using Xero
    - `Month` integer — The month the organisation starts using Xero. Value is an integer between 1 and 12
    - `Year` integer — The year the organisation starts using Xero. Value is an integer greater than 2006
  - `ConversionBalances` ConversionBalances[] — Balance supplied for each account that has a value as at the conversion date.
    - `AccountCode` string — The account code for a account
    - `Balance` number, double — The opening balances of the account. Debits are positive, credits are negative values
    - `BalanceDetails` BalanceDetails[]
      - `Balance` number, double — The opening balances of the account. Debits are positive, credits are negative values
      - `CurrencyCode` string — The currency of the balance (Not required for base currency)
      - `CurrencyRate` number, double — (Optional) Exchange rate to base currency when money is spent or received. If not specified, XE rate for the day is applied
  - `Accounts` Account[]
    - `Code` string — Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
    - `Name` string — Name of account (max length = 150)
    - `AccountID` string, uuid — The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
    - `Type` 'BANK' | 'CURRENT' | 'CURRLIAB' | 'DEPRECIATN' | 'DIRECTCOSTS' | 'EQUITY' | 'EXPENSE' | 'FIXED' | 'INVENTORY' | 'LIABILITY' | 'NONCURRENT' | 'OTHERINCOME' | 'OVERHEADS' | 'PREPAYMENT' | 'REVENUE' | 'SALES' | 'TERMLIAB' | 'PAYG' — See Account Types
    - `BankAccountNumber` string — For bank accounts only (Account Type BANK)
    - `Status` 'ACTIVE' | 'ARCHIVED' | 'DELETED' — Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
    - `Description` string — Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
    - `BankAccountType` 'BANK' | 'CREDITCARD' | 'PAYPAL' | 'NONE' | '' — For bank accounts only. See Bank Account types
    - `CurrencyCode` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EEK' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SKK' | 'SLE' | 'SLL' | 'SOS' | 'SRD' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZMK' | 'ZWD' — 3 letter alpha code for the currency – see list of currency codes
    - `TaxType` string — The tax type from taxRates
    - `EnablePaymentsToAccount` boolean — Boolean – describes whether account can have payments applied to it
    - `ShowInExpenseClaims` boolean — Boolean – describes whether account code is available for use with expense claims
    - `Class` 'ASSET' | 'EQUITY' | 'EXPENSE' | 'LIABILITY' | 'REVENUE' — See Account Class Types
    - `SystemAccount` 'DEBTORS' | 'CREDITORS' | 'BANKCURRENCYGAIN' | 'GST' | 'GSTONIMPORTS' | 'HISTORICAL' | 'REALISEDCURRENCYGAIN' | 'RETAINEDEARNINGS' | 'ROUNDING' | 'TRACKINGTRANSFERS' | 'UNPAIDEXPCLM' | 'UNREALISEDCURRENCYGAIN' | 'WAGEPAYABLES' | 'CISASSETS' | 'CISASSET' | 'CISLABOUR' | 'CISLABOUREXPENSE' | 'CISLABOURINCOME' | 'CISLIABILITY' | 'CISMATERIALS' | '' — If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
    - `ReportingCode` string — Shown if set
    - `ReportingCodeName` string — Shown if set
    - `HasAttachments` boolean — boolean to indicate if an account has an attachment (read only)
    - `UpdatedDateUTC` string — Last modified date UTC format
    - `AddToWatchlist` boolean — Boolean – describes whether the account is shown in the watchlist widget on the dashboard
    - `ValidationErrors` ValidationError[] — Displays array of validation error messages from the API
      - `Message` string — Validation error message

## Response `200`

Success - returns a summary of the chart of accounts updates

- ImportSummaryObject
  - `ImportSummary` ImportSummary — A summary of the import from setup endpoint
    - `Accounts` ImportSummaryAccounts — A summary of the accounts changes
      - `Total` integer — The total number of accounts in the org
      - `New` integer — The number of new accounts created
      - `Updated` integer — The number of accounts updated
      - `Deleted` integer — The number of accounts deleted
      - `Locked` integer — The number of locked accounts
      - `System` integer — The number of system accounts
      - `Errored` integer — The number of accounts that had an error
      - `Present` boolean
      - `NewOrUpdated` integer — The number of new or updated accounts
    - `Organisation` ImportSummaryOrganisation
      - `Present` boolean

---

[API](https://skmtc.net/xeroapi/apis/xero-accounting-api.md) · [All operations](https://skmtc.net/xeroapi/apis/xero-accounting-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xeroapi/xero-accounting-api/versions/5cf7f780d3c8/schema)
