Create Hotel Stay
Create Hotel Stay
Create a hotel stay record and trigger asynchronous CO2e calculation
POST
Create Hotel Stay
Create Hotel Stay
Create a new hotel stay record. CO2e is calculated asynchronously using DEFRA emission factors based on the country and number of room-nights (rooms × nights).Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody Parameters
string
required
Check-in date in ISO format (
YYYY-MM-DD)string
required
Check-out date in ISO format (
YYYY-MM-DD). Must be on or after check_in_date.string
required
ISO-2 country code (e.g.
ES, GB, US). Must be a country with available emission factors — see Available Countries.string
Label for the trip or traveler (max 255 characters)
string
Name of the hotel (max 255 characters)
string
Plain-text address for geocoding (max 500 characters)
integer
default:"1"
Number of booked rooms (1–10 000)
Response
Returns the created hotel stay with CO2e fields (HTTP 201). CO2e may benull initially — it is calculated asynchronously.
string
Hotel stay UUID
string
UUID of the owning organization
string | null
Trip or traveler label
string
Check-in date (YYYY-MM-DD)
string
Check-out date (YYYY-MM-DD)
string
ISO-2 country code
string | null
Plain-text address
string | null
Hotel name
integer
Number of booked rooms
string
Record status:
active, pending, or deletedstring
How the record was created:
api, csv, or manualstring | null
UUID of the source file, if created from a file upload
string | null
Name of the source file, if created from a file upload
number | null
Calculated CO2e emissions in tCO2e.
null until async calculation completes.string | null
UUID of the user who created the record
object | null
Geocoded location data resolved from the address
datetime
Creation timestamp
datetime | null
Last update timestamp
Example
Successful Response
co2e is null immediately after creation — it is calculated asynchronously and populated within a few seconds.Common Errors
401 Unauthorized
Cause: Missing or invalid API key403 Forbidden
Cause: The authenticated user is not a member of the organization422 Validation Error
Cause: Check-out date is before check-in dateRelated Endpoints
Available Countries
Check which countries have emission factors
List Hotel Stays
Browse all hotel stay records