Skip to main content
GET
https://api.dcycle.io
/
api
/
v1
/
custom_emission_groups
/
{id}
Get Custom Emission Group
const options = {
  method: 'GET',
  headers: {
    'x-api-key': '<x-api-key>',
    'x-organization-id': '<x-organization-id>',
    'x-user-id': '<x-user-id>'
  }
};

fetch('https://api.dcycle.io/api/v1/custom_emission_groups/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "<string>",
  "name": "<string>",
  "category": "<string>",
  "description": "<string>",
  "ghg_type": 123,
  "group_start_date": "<string>",
  "group_end_date": "<string>",
  "group_uploaded_by": "<string>"
}

Get Custom Emission Group

Retrieve complete details of a specific custom emission group by its ID, including metadata about the group.
This endpoint returns group metadata only. To get the group with all its emission factors included, use the Organization Data endpoint and filter by group ID.

Request

Headers

x-api-key
string
required
Your API key for authenticationExample: sk_live_1234567890abcdef
x-organization-id
string
required
Your organization UUIDExample: ff4adcc7-8172-45fe-9cf1-e90a6de53aa9
x-user-id
string
required
Your user UUIDExample: a1b2c3d4-e5f6-7890-abcd-ef1234567890

Path Parameters

id
string
required
UUID of the Custom Emission GroupExample: "group-uuid-here"

Response

{
  "id": "group-uuid",
  "name": "Supplier ABC Materials 2024",
  "category": "purchases",
  "description": "EPD-verified emission factors for all materials from Supplier ABC",
  "group_start_date": "2024-01-01",
  "group_end_date": "2024-12-31",
  "ghg_type": 1,
  "group_uploaded_by": "[email protected]"
}

Example

curl "https://api.dcycle.io/api/v1/custom_emission_groups/group-uuid" \
  -H "Authorization: Bearer ${DCYCLE_API_KEY}" \
  -H "x-organization-id: ${DCYCLE_ORG_ID}" \
  -H "x-user-id: ${DCYCLE_USER_ID}"

Use Cases

Verify Group Details

Check group information before adding factors:
group = requests.get(
    f"https://api.dcycle.io/api/v1/custom_emission_groups/{group_id}",
    headers=headers
).json()

if group['category'] == 'purchases':
    print(f"✅ Correct category for adding purchase factors")
else:
    print(f"❌ Wrong category: {group['category']}")

ghg_type_name = {1: 'Fossil', 2: 'Biogenic', 3: 'Mixed'}[group['ghg_type']]
print(f"GHG Type: {ghg_type_name}")

Display Group Information

Show group details in a UI:
async function displayGroupInfo(groupId) {
  const group = await axios.get(
    `https://api.dcycle.io/api/v1/custom_emission_groups/${groupId}`,
    { headers }
  ).then(res => res.data);

  document.getElementById('group-name').textContent = group.name;
  document.getElementById('group-desc').textContent = group.description;
  document.getElementById('group-category').textContent = group.category.toUpperCase();

  const ghgTypes = {1: 'Fossil', 2: 'Biogenic', 3: 'Mixed'};
  document.getElementById('group-ghg').textContent = ghgTypes[group.ghg_type];
}

Audit Group Metadata

Check group validity and ownership:
group = requests.get(
    f"https://api.dcycle.io/api/v1/custom_emission_groups/{group_id}",
    headers=headers
).json()

from datetime import date

print(f"Group: {group['name']}")
print(f"Created by: {group.get('group_uploaded_by', 'Unknown')}")

if group['group_start_date'] and group['group_end_date']:
    start = date.fromisoformat(group['group_start_date'])
    end = date.fromisoformat(group['group_end_date'])
    today = date.today()

    if start <= today <= end:
        print(f"✅ Group is currently valid")
    elif today < start:
        print(f"âŗ Group not yet valid (starts {start})")
    else:
        print(f"❌ Group expired (ended {end})")
else:
    print(f"â„šī¸ No validity period set")

Common Errors

404 Not Found

{
  "detail": "Custom emission group not found",
  "code": "NOT_FOUND"
}
Solution: Verify the group ID exists using the list endpoint.

403 Forbidden

{
  "detail": "Insufficient permissions",
  "code": "FORBIDDEN"
}
Solution: Ensure the group belongs to your organization.

Response Fields

id
string
Unique identifier for the group
name
string
Group name
category
string
Category type: purchases, wastes, or energy
description
string
Detailed description of the group
ghg_type
integer
GHG origin type: 1 (fossil), 2 (biogenic), or 3 (mixed)
group_start_date
date
Optional validity start date (YYYY-MM-DD)
group_end_date
date
Optional validity end date (YYYY-MM-DD)
group_uploaded_by
string
Optional reference to who created the group