Laravel Developer
David Carr
Web Developer
All Posts Archives Categories Authors
About Books Packages Templates Contact
Blog
All Posts Archives Categories Authors
About Books Packages Templates Contact
Laravel Xero
Laravel Packages
Laravel Microsoft Graph Laravel Xero Laravel Sent Emails Laravel Dropbox Laravel Box Laravel Companies House Laravel Countries Laravel Eventbrite Laravel Blade Components
PHP Packages
PDO Wrapper PHP find and replace JSON SQL Import IMAP Export CSV Pagination
v1
Navigation
  • Introduction
  • Install
  • Commands
  • Middleware
  • Is Connected
  • Disconnect
  • Tenant
  • Helpers
  • DTOs
  • Enums
  • Contacts
  • Credit Notes
  • Invoices
  • Webhooks
Navigation
  • Introduction
  • Install
  • Commands
  • Middleware
  • Is Connected
  • Disconnect
  • Tenant
  • Helpers
  • DTOs
  • Enums
  • Contacts
  • Credit Notes
  • Invoices
  • Webhooks

Tenant

Multi-tenancy

Xero uses a multi-tenancy system, which means that you can connect to multiple Xero tenants (or organizations) using the same application.

When you connect to Xero, you will be prompted to select a tenant. This tenant will be used for all API calls until you change it.

To set the tenant call setTenantId and pass in your tenantId

Once set, all calls will use the set tenant.

Xero::setTenantId($tenantId)

Get Tenant ID

To get the ID the current tenant is connected to, you can use the following method:

Xero::getTenantId()

Get Tenant Name

To get the tenant name, you can use the following method:

Xero::getTenantName()
Table of Contents
  • Multi-tenancy
  • Get Tenant ID
  • Get Tenant Name

DCBlog

Practical tutorials, code snippets, and in-depth guides for modern web development. Helping developers build better applications since 2009.

Subscribe to my newsletter for the latest updates on my books and digital products.

© 2009 - 2025 DC Blog. All rights reserved.

Privacy Policy • Terms of Service