Create an accommodation
Creates an accommodation. Its variants are created separately via
POST /accommodations/{product_id}/variants.
Both app-installation-scoped and dashboard-user-scoped API keys can
create accommodations. App-installation-scoped keys stamp the new accommodation
with their installation as the created_by_app_installation
relationship. Dashboard-user-scoped keys leave that relationship null.
All API keys with access to the company can read the accommodation
regardless of which key created it.
Image URLs (hero_image_url, overview_image_url, individual
entries in gallery_image_urls) are queued for asynchronous download
and re-hosting by Easol. The accommodation is created immediately.
Missing images can be uploaded via the Easol dashboard afterwards. The
gallery_image_urls array is capped at 10 entries; requests exceeding
that are rejected with 422.
Header Parameters
Client-generated key for idempotent writes; the server deduplicates retries within a 24-hour window.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Customer-facing accommodation name.
Short marketing line (≤ 140 chars).
length <= 140Long-form description (≤ 2500 chars).
length <= 2500Star classification in 0.5 increments.
1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5Sold as a single whole-property unit when true.
Enquiry-only (not directly bookable) when true. Defaults to false.
Earliest date a stay may start.
dateLatest date a stay may end.
dateURL of the hero/banner image; queued for async download.
uriURL of the overview image; queued for async download.
uriUp to 10 gallery image URLs, queued for async download. More than 10 is rejected with 422.
items <= 10Physical location of the accommodation.
Trading name at this address.
Address line 1
Address line 2
Postal or ZIP code, when available.
ISO 3166-1 alpha-2 country code (e.g. GB, US, ES)
ISO 3166-2 subdivision code (e.g. US-NY). Optional but often required for tax/insurance purposes in US & CA.
Lifecycle state on create; draft (default) or published. Any other value is rejected with 422.
"draft""draft" | "published"Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accommodations" \ -H "Easol-API-Version: 2026-11-01" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{
"object": "accommodation",
"id": "string",
"name": "string",
"tagline": "string",
"overview": "string",
"star_rating": 1,
"entire_property": true,
"enquire_only": true,
"required_start_date": "2019-08-24",
"required_end_date": "2019-08-24",
"hero_image_url": "http://example.com",
"overview_image_url": "http://example.com",
"gallery_image_urls": [
"http://example.com"
],
"location": {
"business_name": "string",
"line_one": "string",
"line_two": "string",
"city": "string",
"post_code": "string",
"country_code": "string",
"subdivision_code": "string"
},
"slug": "string",
"dashboard_url": "../dictionary",
"state": "draft",
"created_by_app_installation": "string",
"variants": {
"object": "list",
"url": "string",
"has_more": true,
"next_cursor": "string",
"data": [
{
"object": "accommodation_variant",
"id": "string",
"name": "string",
"tagline": "string",
"min_occupancy": 1,
"max_occupancy": 1,
"hidden": true,
"position": 0,
"checkout_limit": 1,
"stock_strategy": "inventory",
"image_url": "http://example.com",
"price": {
"amount": 0,
"currency": "string"
},
"accommodation": "string"
}
]
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}