Xero · Schema

Account

AccountingBank FeedsFinanceFinancial ServicesInvoicingPayrollSmall Business

Properties

Name Type Description
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 The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
Type string
BankAccountNumber string For bank accounts only (Account Type BANK)
Status string 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 string For bank accounts only. See Bank Account types
CurrencyCode string
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 string See Account Class Types
SystemAccount string 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 array Displays array of validation error messages from the API
View JSON Schema on GitHub

JSON Schema

xero-account-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Account",
  "title": "Account",
  "type": "object",
  "externalDocs": {
    "url": "http://developer.xero.com/documentation/api/accounts/"
  },
  "properties": {
    "Code": {
      "description": "Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)",
      "type": "string",
      "example": 4400
    },
    "Name": {
      "description": "Name of account (max length = 150)",
      "maxLength": 150,
      "type": "string",
      "example": "Food Sales"
    },
    "AccountID": {
      "description": "The Xero identifier for an account \u2013 specified as a string following  the endpoint name   e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9",
      "type": "string",
      "format": "uuid",
      "example": "00000000-0000-0000-0000-000000000000"
    },
    "Type": {
      "$ref": "#/components/schemas/AccountType",
      "type": "string"
    },
    "BankAccountNumber": {
      "description": "For bank accounts only (Account Type BANK)",
      "type": "string"
    },
    "Status": {
      "description": "Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes",
      "type": "string",
      "enum": [
        "ACTIVE",
        "ARCHIVED",
        "DELETED"
      ]
    },
    "Description": {
      "description": "Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)",
      "type": "string"
    },
    "BankAccountType": {
      "description": "For bank accounts only. See Bank Account types",
      "type": "string",
      "enum": [
        "BANK",
        "CREDITCARD",
        "PAYPAL",
        "NONE",
        ""
      ]
    },
    "CurrencyCode": {
      "$ref": "#/components/schemas/CurrencyCode",
      "type": "string"
    },
    "TaxType": {
      "description": "The tax type from taxRates",
      "type": "string"
    },
    "EnablePaymentsToAccount": {
      "description": "Boolean \u2013 describes whether account can have payments applied to it",
      "type": "boolean"
    },
    "ShowInExpenseClaims": {
      "description": "Boolean \u2013 describes whether account code is available for use with expense claims",
      "type": "boolean"
    },
    "Class": {
      "description": "See Account Class Types",
      "readOnly": true,
      "type": "string",
      "enum": [
        "ASSET",
        "EQUITY",
        "EXPENSE",
        "LIABILITY",
        "REVENUE"
      ]
    },
    "SystemAccount": {
      "description": "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 \u201c\u201d or null.",
      "readOnly": true,
      "type": "string",
      "enum": [
        "DEBTORS",
        "CREDITORS",
        "BANKCURRENCYGAIN",
        "GST",
        "GSTONIMPORTS",
        "HISTORICAL",
        "REALISEDCURRENCYGAIN",
        "RETAINEDEARNINGS",
        "ROUNDING",
        "TRACKINGTRANSFERS",
        "UNPAIDEXPCLM",
        "UNREALISEDCURRENCYGAIN",
        "WAGEPAYABLES",
        "CISASSETS",
        "CISASSET",
        "CISLABOUR",
        "CISLABOUREXPENSE",
        "CISLABOURINCOME",
        "CISLIABILITY",
        "CISMATERIALS",
        ""
      ]
    },
    "ReportingCode": {
      "description": "Shown if set",
      "type": "string"
    },
    "ReportingCodeName": {
      "description": "Shown if set",
      "readOnly": true,
      "type": "string"
    },
    "HasAttachments": {
      "description": "boolean to indicate if an account has an attachment (read only)",
      "readOnly": true,
      "type": "boolean",
      "default": "false",
      "example": "false"
    },
    "UpdatedDateUTC": {
      "description": "Last modified date UTC format",
      "type": "string",
      "x-is-msdate-time": true,
      "example": "/Date(1573755038314)/",
      "readOnly": true
    },
    "AddToWatchlist": {
      "description": "Boolean \u2013 describes whether the account is shown in the watchlist widget on the dashboard",
      "type": "boolean"
    },
    "ValidationErrors": {
      "description": "Displays array of validation error messages from the API",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    }
  }
}