Create a variant
Creates a variant under an existing accommodation. A variant is the bookable unit within an accommodation (e.g. a room type).
Any API key (app-installation-scoped or dashboard-user-scoped) can create variants under any accommodation in the company.
The image_url field is queued for asynchronous download and
re-hosting by Easol. The variant is created immediately. Missing images
can be uploaded via the Easol dashboard afterwards.
Path Parameters
Product ID for the accommodation type (e.g. acc_9fKbV3aQx7).
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 variant name (e.g. "Deluxe Double Room").
Short marketing line shown alongside the variant name (≤ 140 chars).
length <= 140Minimum number of guests this variant can host.
1 <= valueMaximum number of guests this variant can host. Must be ≥ min_occupancy.
1 <= valueWhen true, the variant is excluded from the public storefront and from search/availability results, but remains bookable through the API. Defaults to false.
Display order within the parent accommodation (lower values shown first). Defaults to the next available position.
0 <= valueMaximum quantity of this variant allowed in a single booking. Null (default) means no per-variant cap; remaining stock still applies.
1 <= valueHow sellability and stock are accounted for. inventory decrements a fixed per-variant pool; inventory_per_night decrements a per-night pool; resources ties sellability to physical resources (e.g. seats); external defers to the installed app that owns the variant — Easol holds no local stock and asks the app live. Accepted on create: inventory_per_night and external. All other values return 422. If omitted: external when the parent accommodation was created via an app installation; otherwise inventory_per_night.
"inventory" | "inventory_per_night" | "resources" | "external"Publicly fetchable URL of the variant's image. Easol queues the asset for asynchronous download and re-hosting. The variant is created immediately and ingestion status is returned in response metadata. Recommended: PNG, JPEG, WebP, or GIF; ≤ 15 MB.
uriVariant price in the smallest unit of the company's home currency (e.g. pence for GBP, cents for USD/EUR). Null when no price has been set.
0 <= valueResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/accommodations/string/variants" \ -H "Easol-API-Version: 2026-11-01" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "min_occupancy": 1 }'{
"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"
}
}{
"error": {
"code": "string",
"message": "string"
}
}