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
Your API key for authenticationExample:
sk_live_1234567890abcdefYour organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51faBody Parameters
Check-in date in ISO format (
YYYY-MM-DD)Check-out date in ISO format (
YYYY-MM-DD). Must be on or after check_in_date.ISO-2 country code (e.g.
ES, GB, US). Must be a country with available emission factors — see Available Countries.Label for the trip or traveler (max 255 characters)
Name of the hotel (max 255 characters)
Plain-text address for geocoding (max 500 characters)
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.
Hotel stay UUID
UUID of the owning organization
Trip or traveler label
Check-in date (YYYY-MM-DD)
Check-out date (YYYY-MM-DD)
ISO-2 country code
Plain-text address
Hotel name
Number of booked rooms
Record status:
active, pending, or deletedHow the record was created:
api, csv, or manualUUID of the source file, if created from a file upload
Name of the source file, if created from a file upload
Calculated CO2e emissions in tCO2e.
null until async calculation completes.UUID of the user who created the record
Geocoded location data resolved from the address
| Field | Type | Description |
|---|---|---|
country_code | string | ISO-2 country code |
place_id | string | Place identifier |
address_formatted | string | Full formatted address |
latitude | number | Latitude coordinate |
longitude | number | Longitude coordinate |
Creation timestamp
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

