Tenants
Multi-tenancy and tenant management in Calry OTA
Introduction
Tenants provide a way to organize and isolate data within a workspace. Each workspace has a default tenant that is created automatically, and you can create additional tenants to partition listings, reservations, and other resources.
A common use case is when multiple booking channels or business units share the same workspace but need their own isolated view of the data.
Default Tenant
Every workspace has a default tenant. This tenant has special privileges:
- Create new tenants
- List all tenants in the workspace
- Update other tenants
- Delete other tenants
- Move integration accounts between tenants
Non-default tenants cannot perform these administrative operations. The default tenant itself cannot be deleted.
Tenant Context
All API requests operate within a tenant context. By default, requests use the workspace's default tenant. To target a specific tenant, include the x-calry-tenant-id header:
curl -X GET "https://zepl.calry.app/api/v1/listing" \
-H "x-calry-api-key: YOUR_API_KEY" \
-H "x-calry-tenant-id: TENANT_UUID"When a tenant context is set, API responses are scoped to resources belonging to that tenant (listings, reservations, promotions, etc).
Creating a Tenant
Only the default tenant can create new tenants:
POST /api/v1/tenants{
"name": "Channel A",
"domain": "channel-a"
}The domain must be unique across all tenants in the workspace.
Tenant Schema
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier |
| name | string | Tenant name |
| domain | string | Unique domain identifier |
| workspaceID | UUID | The workspace this tenant belongs to |
| isDefault | boolean | Whether this is the default tenant |
| status | string | ACTIVE or INACTIVE |
| createdAt | Date | Creation timestamp |
| updatedAt | Date | Last update timestamp |
Importing Listings from Other Tenants
Tenants can import listings from other tenants within the same workspace. This allows a tenant to make another tenant's listings available for search, quotes, and reservations without duplicating data.
Searching for Available Listings
Before importing, you can search for listings from other tenants:
GET /api/v1/tenants/search-listings?location=40.7128,-74.0060&radius=50This returns listings from other tenants that match the location criteria.
Importing Listings
Once you've identified listings to import:
POST /api/v1/tenants/import-listings{
"listingIDs": [
"listing-uuid-1",
"listing-uuid-2"
]
}Restrictions:
- You cannot import your own tenant's listings
- You cannot import listings from integration accounts that have
allowImportset tofalse - You cannot re-import listings that are already imported
Viewing Imported Listings
GET /api/v1/tenants/imported-listingsRemoving Imported Listings
POST /api/v1/tenants/remove-imported-listings{
"listingIDs": [
"listing-uuid-1"
]
}Moving an Integration Account Between Tenants
The default tenant can move an integration account (and all its associated resources) to a different tenant:
PATCH /api/v1/integration-account/{integrationAccountId}/move-tenant{
"tenantID": "target-tenant-uuid"
}This operation is transactional and moves the integration account along with its reservations, promotions, and updates any imported listing references.
API Reference
For detailed API documentation, refer to the following endpoints: