Skip to content

Xero: Retrieves Xero organisation details

Xero accounting.getOrganisations: arguments, response, policy and SDK examples.

← Accounting operations · Get started

Operation xero.getorganisations

Provider route: GET /api.xro/2.0/Organisation. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/xero with npm, or alter-sdk-xero with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { XeroIntegration } from "@alter-ai/xero";
async function execute(input: Parameters<XeroIntegration["accounting"]["getOrganisations"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new XeroIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.accounting.getOrganisations(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_xero import XeroIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = XeroIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.accounting.get_organisations(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
headersobjectRequired within parentAdditional keys: not allowed
headers.xero-tenant-idstringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Retrieves Xero organisation details — response body

Referenced models: Retrieves Xero organisation details — response body

4 more schemas are linked from the tables above, on the schema pages.

Retrieves Xero organisation details — response body
FieldTypePresenceDescription and constraints
$objectRoot
OrganisationsarrayOptional
Organisations[]ModelEach itemExpand Retrieves Xero organisation details — response body — Organisations item

Referenced models: Retrieves Xero organisation details — response body — Organisations item

Retrieves Xero organisation details — response body — Organisations item
FieldTypePresenceDescription and constraints
$objectRoot
APIKeystringOptionalDisplay a unique key used for Xero-to-Xero transactions
AddressesarrayOptionalAddress details for organisation – see Addresses
Addresses[]ModelEach itemExpand Retrieves Xero organisation details — response body — Organisations item Addresses item
BaseCurrencyModelOptionalExpand Deletes an Allocation from a Prepayment — response body — Invoice Currency Code
ClassstringOptionalOrganisation Classes describe which plan the Xero organisation is on (e.g. DEMO, TRIAL, PREMIUM)
Known values: DEMO, TRIAL, STARTER, STANDARD, PREMIUM, PREMIUM_20, PREMIUM_50, PREMIUM_100, LEDGER, GST_CASHBOOK, NON_GST_CASHBOOK, ULTIMATE, LITE, ULTIMATE_10, ULTIMATE_20, ULTIMATE_50, ULTIMATE_100, IGNITE, GROW, COMPREHENSIVE, SIMPLE, BASICLITE, ULTRA
CountryCodeModelOptionalExpand Retrieves Xero organisation details — response body — Organisations item Country Code
CreatedDateUTCstringOptionalTimestamp when the organisation was created in Xero
Read only: true
DefaultPurchasesTaxstringOptionalThe default for LineAmountTypes on purchase transactions
DefaultSalesTaxstringOptionalThe default for LineAmountTypes on sales transactions
EditionstringOptionalBUSINESS or PARTNER. Partner edition organisations are sold exclusively through accounting partners and have restricted functionality (e.g. no access to invoicing)
Known values: BUSINESS, PARTNER
EmployerIdentificationNumberstringOptionalShown if set. US Only.
EndOfYearLockDatestringOptionalShown if set. See lock dates
ExternalLinksarrayOptionalOrganisation profile links for popular services such as Facebook,Twitter, GooglePlus and LinkedIn. You can also add link to your website here. Shown if Organisation settings is updated in Xero. See ExternalLinks below
ExternalLinks[]ModelEach itemExpand Retrieves Xero organisation details — response body — Organisations item External Links item
FinancialYearEndDayJSONOptional
FinancialYearEndDay (anyOf 1)integerAlternativeCalendar day e.g. 0-31
FinancialYearEndDay (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
FinancialYearEndMonthJSONOptional
FinancialYearEndMonth (anyOf 1)integerAlternativeCalendar Month e.g. 1-12
FinancialYearEndMonth (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
IsDemoCompanybooleanOptionalBoolean to describe if organisation is a demo company.
LegalNamestringOptionalOrganisation name shown on Reports
LineOfBusinessstringOptionalDescription of business type as defined in Organisation settings
NamestringOptionalDisplay name of organisation shown in Xero
OrganisationEntityTypestringOptionalOrganisation Entity Type
Known values: ACCOUNTING_PRACTICE, COMPANY, CHARITY, CLUB_OR_SOCIETY, INDIVIDUAL, LOOK_THROUGH_COMPANY, NOT_FOR_PROFIT, PARTNERSHIP, S_CORPORATION, SELF_MANAGED_SUPERANNUATION_FUND, SOLE_TRADER, SUPERANNUATION_FUND, TRUST, PERSONAL, SINGLEMEMBERLLC, CCORPORATIONLLC, PARTNERSHIPLLC, SCORPORATIONLLC, LLC, NOTLLC, UNSPECIFIED
OrganisationIDstringOptionalUnique Xero identifier
Format: uuid
OrganisationStatusstringOptionalWill be set to ACTIVE if you can connect to organisation via the Xero API
OrganisationTypestringOptionalOrganisation Type
Known values: ACCOUNTING_PRACTICE, COMPANY, CHARITY, CLUB_OR_SOCIETY, INDIVIDUAL, LOOK_THROUGH_COMPANY, NOT_FOR_PROFIT, PARTNERSHIP, S_CORPORATION, SELF_MANAGED_SUPERANNUATION_FUND, SOLE_TRADER, SUPERANNUATION_FUND, TRUST, PERSONAL, SINGLEMEMBERLLC, CCORPORATIONLLC, PARTNERSHIPLLC, SCORPORATIONLLC, LLC, NOTLLC, UNSPECIFIED
PaymentTermsModelOptionalExpand Creates contacts to a specific contact group — response body — Contacts item Payment Terms
PaysTaxbooleanOptionalBoolean to describe if organisation is registered with a local tax authority i.e. true, false
PeriodLockDatestringOptionalShown if set. See lock dates
PhonesarrayOptionalPhones details for organisation – see Phones
Phones[]ModelEach itemExpand Creates contacts to a specific contact group — response body — Contacts item Phones item
RegistrationNumberstringOptionalShows for New Zealand, Australian and UK organisations
SalesTaxBasisstringOptionalThe accounting basis used for tax returns. See Sales Tax Basis
Known values: PAYMENTS, INVOICE, NONE, CASH, ACCRUAL, FLATRATECASH, FLATRATEACCRUAL, ACCRUALS
SalesTaxPeriodstringOptionalThe frequency with which tax returns are processed. See Sales Tax Period
Known values: MONTHLY, QUARTERLY1, QUARTERLY2, QUARTERLY3, ANNUALLY, ONEMONTHS, TWOMONTHS, SIXMONTHS, 1MONTHLY, 2MONTHLY, 3MONTHLY, 6MONTHLY, QUARTERLY, YEARLY, NONE
ShortCodestringOptionalA unique identifier for the organisation. Potential uses.
TaxNumberstringOptionalShown if set. Displays in the Xero UI as Tax File Number (AU), GST Number (NZ), VAT Number (UK) and Tax ID Number (US & Global).
TimezoneModelOptionalExpand Retrieves Xero organisation details — response body — Organisations item Timezone
VersionstringOptionalSee Version Types
Known values: AU, NZ, GLOBAL, UK, US, AUONRAMP, NZONRAMP, GLOBALONRAMP, UKONRAMP, USONRAMP

Referenced models: Deletes an Allocation from a Prepayment — response body — Invoice Currency Code, Retrieves Xero organisation details — response body — Organisations item Addresses item, Retrieves Xero organisation details — response body — Organisations item Country Code, Retrieves Xero organisation details — response body — Organisations item External Links item, Creates contacts to a specific contact group — response body — Contacts item Payment Terms, Creates contacts to a specific contact group — response body — Contacts item Phones item, Retrieves Xero organisation details — response body — Organisations item Timezone

Deletes an Allocation from a Prepayment — response body — Invoice Currency Code
FieldTypePresenceDescription and constraints
$stringRoot3 letter alpha code for the currency – see list of currency codes
Known values: 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
Retrieves Xero organisation details — response body — Organisations item Addresses item
FieldTypePresenceDescription and constraints
$objectRoot
AddressLine1stringOptionalmax length = 500
Maximum length: 500
AddressLine2stringOptionalmax length = 500
Maximum length: 500
AddressLine3stringOptionalmax length = 500
Maximum length: 500
AddressLine4stringOptionalmax length = 500
Maximum length: 500
AddressTypestringOptionaldefine the type of address
Known values: POBOX, STREET, DELIVERY
AttentionTostringOptionalmax length = 255
Maximum length: 255
CitystringOptionalmax length = 255
Maximum length: 255
CountrystringOptionalmax length = 50, [A-Z], [a-z] only
Maximum length: 50
PostalCodestringOptionalmax length = 50
Maximum length: 50
RegionstringOptionalmax length = 255
Maximum length: 255
Retrieves Xero organisation details — response body — Organisations item Country Code
FieldTypePresenceDescription and constraints
$stringRootKnown values: AD, AE, AF, AG, AI, AL, AM, AN, AO, AQ, AR, AS, AT, AU, AW, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GG, GH, GI, GL, GM, GN, GQ, GR, GT, GU, GW, GY, HK, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, XK, YE, YT, ZA, ZM, ZW
Retrieves Xero organisation details — response body — Organisations item External Links item
FieldTypePresenceDescription and constraints
$objectRoot
DescriptionstringOptional
LinkTypestringOptionalSee External link types
Known values: Facebook, GooglePlus, LinkedIn, Twitter, Website
UrlstringOptionalURL for service e.g. http://twitter.com/xeroapi

SDK function policy ID: xero.getorganisations. Catalog operation: getOrganisations. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.