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) - Modern hexagonal architecture
- Better maintainability
- Use for new integrations
Legacy API
Legacy endpoints (still supported)
- Requires
Authorization,x-organization-id,x-user-id - 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:Simpler authentication. Operations are registered at organization level.
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

