Skip to main content
GET
Hotel Stay Calculation Steps
← Hotel Stays API Returns the step-by-step emission calculation for a specific hotel stay, showing exactly how the CO2e figure was derived from the room-night emission factor that was applied.

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
The unique identifier (UUID) of the hotel stay recordExample: 550e8400-e29b-41d4-a716-446655440000

Response

The response contains the full step-by-step calculation breakdown as used by the Dcycle kernel.
number
Total CO2e in kg across all periods
array
One entry per calendar year the stay spans

Calculation Methodology

CO2e is computed as:
Where:
  • nights = check_out_date − check_in_date in days
  • EF = the hotel room-night emission factor for the stay’s country. Sources resolve in priority order DEFRA → Greenview, unless the organization pinned a different source for the HOTEL_STAYS category. The source block of each step tells you which one was used
One total_impacts row is written per calendar year the stay spans, which is why a stay crossing 31 December comes back as two periods.

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

404 Not Found

Cause: The hotel stay ID does not exist or belongs to a different organization.

Get Hotel Stay

Retrieve full stay details

List Hotel Stays

Browse all stays for the organization