Dcycle API Introduction
The Dcycle API allows you to integrate carbon emissions calculation and tracking directly into your applications and workflows.New API vs Legacy API
Dcycle offers two API versions with different characteristics:🆕 New API (Recommended)
New architecture with improved design
- Simpler authentication (only
x-api-key+x-organization-id) - Operations attributed to API key creator
- Modern hexagonal architecture
- Better maintainability
- Use for new integrations
Legacy API
Legacy endpoints (still supported)
- Requires
Authorization,x-organization-id,x-user-id - Operations attributed to specified user
- Original architecture
- Will be maintained during migration
- Existing integrations can continue using these
Currently Available in New API
The New API is being rolled out progressively. Currently available:
- Logistics
- Get available vehicle types (TOCs)
- Create logistics requests for emission calculations
- Retrieve logistics requests with pagination
Base URL
All API requests must be made to:Authentication
All API requests require authentication using your API key and organization ID.- New API
- Legacy API
Recommended format - 2 headers:When you create an API key, you authorize it to perform actions on your behalf. Any data uploaded using that key will be linked to you for compliance and traceability purposes.
User Attribution: All operations are automatically attributed to the user who created the API key. This ensures proper audit trails and data governance without requiring an explicit
x-user-id header.Response Format
The API returns responses in JSON format:HTTP Status Codes
| Code | Description |
|---|---|
200 | Successful request |
201 | Resource created successfully |
204 | Successful deletion (no content) |
400 | Invalid input data |
401 | Not authenticated |
403 | Not authorized |
404 | Resource not found |
422 | Validation error |
500 | Internal server error |
Error Format
All errors follow this standard format:Common Errors
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
You don’t have permission to access this resource. Verify your organization ID.
404 Not Found
404 Not Found
The requested resource doesn’t exist. Check the endpoint URL and resource ID.
422 Validation Error
422 Validation Error
The request data failed validation. Check the error details for specific field errors.
Pagination
Endpoints that return lists support pagination:page: Page number (default: 1)size: Items per page (default: 50, max: 100)
Data Types
UUIDs
All resource IDs use UUID v4 format:Dates
Dates use ISO 8601 format (YYYY-MM-DD):Timestamps
Timestamps use ISO 8601 format with UTC timezone:Rate Limits
Rate limits are applied per organization. Contact support if you need higher limits.
API Endpoints Overview
Operations
- Logistics - Calculate shipment emissions (ISO 14083)
- Facilities - Manage facility emissions
- Vehicles - Track fleet and consumption
- Invoices - Process utility bills
Supply Chain
- Purchases - Track supplier emissions
- Wastes - Calculate waste disposal emissions
- Suppliers - Manage supplier data
Advanced
- Custom Emission Factors - Define supplier-specific factors
- Custom Emission Groups - Organize custom factors
- Waste Water Treatments - Monitor treatment facilities
Reference Data
- Units - Available measurement units
- Fuels - Fuel types and emission factors
- Waste Codes - Waste classification codes

