Skip to main content
GET
/
v1
/
hotel-stays
/
totals
Get Hotel Stay Totals
const options = {
  method: 'GET',
  headers: {Authorization: '<authorization>', 'x-organization-id': '<x-organization-id>'}
};

fetch('https://api.dcycle.io/v1/hotel-stays/totals', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "total_stays": 123,
  "total_nights": 123,
  "total_co2e": 123
}

Get Hotel Stay Totals

Returns aggregated statistics for all hotel stays in your organization: total number of stays, total room-nights booked, and total CO2e emitted.

Request

Headers

Authorization
string
required
Bearer token for authenticationExample: Bearer sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: a8315ef3-dd50-43f8-b7ce-d839e68d51fa

Response

total_stays
integer
Total number of hotel stay records for the organization
total_nights
integer
Total room-nights booked (sum of rooms × nights across all stays)
total_co2e
number
Total CO2e in kg across all stays

Example

curl -X GET "https://api.dcycle.io/v1/hotel-stays/totals" \
  -H "Authorization: Bearer ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}"

Successful Response

{
  "total_stays": 42,
  "total_nights": 186,
  "total_co2e": 1143.72
}

List Hotel Stays

Browse individual stay records

Impact Calculation

See the step-by-step breakdown for a specific stay