Create an accommodation

POST
/accommodations

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

Idempotency-Key?string

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.

name*string

Customer-facing accommodation name.

tagline?string | null

Short marketing line (≤ 140 chars).

Lengthlength <= 140
overview?string | null

Long-form description (≤ 2500 chars).

Lengthlength <= 2500
star_rating?number | null

Star classification in 0.5 increments.

Value in1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5
entire_property?boolean

Sold as a single whole-property unit when true.

enquire_only?boolean | null

Enquiry-only (not directly bookable) when true. Defaults to false.

required_start_date?string | null

Earliest date a stay may start.

Formatdate
required_end_date?string | null

Latest date a stay may end.

Formatdate
hero_image_url?string | null

URL of the hero/banner image; queued for async download.

Formaturi
overview_image_url?string | null

URL of the overview image; queued for async download.

Formaturi
gallery_image_urls?array<string>

Up to 10 gallery image URLs, queued for async download. More than 10 is rejected with 422.

Itemsitems <= 10
location?object

Physical location of the accommodation.

business_name?string | null

Trading name at this address.

line_one*string

Address line 1

line_two?string | null

Address line 2

city*string
post_code?string | null

Postal or ZIP code, when available.

country_code*string

ISO 3166-1 alpha-2 country code (e.g. GB, US, ES)

subdivision_code?string | null

ISO 3166-2 subdivision code (e.g. US-NY). Optional but often required for tax/insurance purposes in US & CA.

state?string

Lifecycle state on create; draft (default) or published. Any other value is rejected with 422.

Default"draft"
Value in"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"
  }
}