Skip to main content
PATCH
Update Hotel Stay
← Hotel Stays API Update a hotel stay record with a partial update — only the fields you send are changed. CO2e is recalculated asynchronously if dates, country, or rooms change.

Request

Headers

string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Path Parameters

string
required
UUID of the hotel stay to update

Body Parameters

All fields are optional — only send the ones you want to change. name, hotel_name and address are cleared by sending null; a null for any other field is ignored.
string
Check-in date in ISO format (YYYY-MM-DD)
string
Check-out date in ISO format (YYYY-MM-DD). When both dates are sent, check-out must be on or after check-in.
string
ISO-2 country code (e.g. ES, GB, US)
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
Number of booked rooms (1–10 000)
string
Record status. Values: active, deleted
string | null
A record of one of your custom emission factor databases, configured for hotel_stays and expressed per room-night, to calculate the stay with; null goes back to the default factor of its country. Omit it to keep the stay’s factor. Errors: MULTIDB_CUSTOM_RECORD_NOT_FOUND_OR_DISABLED, MULTIDB_CUSTOM_RECORD_INCOMPATIBLE_CATEGORY, CUSTOM_RECORD_UNIT_MISMATCH (422).
string | null
UUID of an uploaded file of your files to attach to the stay as its supporting document, e.g. the hotel’s invoice or the booking confirmation; null removes the attachment and omitting it keeps it. Sent alone, only the attachment changes: the stay is not recalculated. A file you cannot attach answers 404 NOT_FOUND naming File, and nothing changes.

Response

Returns the updated hotel stay with current CO2e (HTTP 200).
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 deleted
string
How the record was created: manual, api, file_upload
string | 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
object | null
The document attached to the stay (attachment_file_id), or null. Not the file the stay was read from (file_id). A file deleted or moved to the trash is no longer attached.
number | null
Calculated CO2e emissions in tCO2e. May change after recalculation.
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

Common Errors

401 Unauthorized

Cause: Missing or invalid API key

403 Forbidden

Cause: The authenticated user is not a member of the organization

422 Validation Error

Cause: Check-out date is before check-in date (when both are provided)

Get Hotel Stay

View hotel stay details

Calculation Steps

View the CO2e calculation breakdown