Create Purchase
Create Purchase
Add a new purchase to your organization for Scope 3 Category 1 tracking
POST
Create Purchase
Create Purchase
Create a new purchase record to track Scope 3 Category 1 (Purchased Goods and Services) emissions. The purchase can use either spend-based or supplier-specific calculation methods.Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
a8315ef3-dd50-43f8-b7ce-d839e68d51fastring
required
Must be
application/jsonBody Parameters
string
required
Name of the product or service purchased (max 255 characters)Example:
"Office Supplies"string
required
Economic sector for emission factor lookup (max 255 characters)Example:
"Manufacturing"string
required
2-letter ISO country code where the purchase was madeExample:
"ES"number
required
Purchase amount (must be >= 0). For spend-based, this is the monetary value.Example:
1500.00string
required
Unit of measurement (e.g., EUR, USD, kg)Example:
"EUR"string
required
Date of purchase in YYYY-MM-DD formatExample:
"2024-03-15"string
required
Expense classificationAvailable values:
capex, opexExample: "opex"string
Optional description of the purchase (max 500 characters)Example:
"Q1 2024 office supplies order"string
default:"spend_based"
Calculation method for emissionsAvailable values:
spend_based, supplier_specificExample: "spend_based"string
default:"active"
Initial status of the purchaseAvailable values:
active, pending, in_progress, in_review, inactiveExample: "active"number
Recycled content percentage (0 to 1). Reduces calculated emissions.Example:
0.25 (25% recycled content)string
Optional supplier identifier for referenceExample:
"supplier-123"string
UUID of custom emission factor for supplier-specific calculationsExample:
"770e8400-e29b-41d4-a716-446655440000"string
default:"once"
Purchase frequencyAvailable values:
onceExample: "once"string
UUID of linked file/documentExample:
"660e8400-e29b-41d4-a716-446655440000"string
Name of linked file (max 255 characters)Example:
"invoice_q1_2024.pdf"string
URL of linked fileExample:
"https://storage.dcycle.io/..."Response
Returns the created purchase object with HTTP status 201 Created.string
Unique identifier (UUID)
string
Organization UUID
string | null
Name of the product or service
string | null
Optional description
string | null
Economic sector
string | null
2-letter ISO country code
number | null
Purchase amount
string | null
Unit of measurement
date | null
Date of purchase
string | null
Calculation method:
spend_based or supplier_specificstring
Classification:
capex or opexstring | null
Purchase status
number | null
Recycled content percentage (0-1)
string | null
Supplier identifier
string | null
Custom emission factor UUID
string | null
Linked file UUID
string | null
Linked file name
string | null
Linked file download URL
number | null
Calculated CO2 equivalent emissions in kg (may be
null while calculation is pending)string | null
Purchase frequency
number | null
Exchange rate used to convert the purchase amount to EUR
date | null
Date used for the exchange rate lookup
object | null
Custom emission group applied to this purchase
datetime | null
Timestamp of the most recent purchase in a recurring series
object | null
Supplier details
object | null
Unit of measurement details
string | null
UUID of the user who created this record
object | null
User who created this record
datetime
Timestamp when the purchase was created
datetime | null
Timestamp when the purchase was last updated
Example
Successful Response
Status Code:201 Created
Common Errors
400 Bad Request
Cause: Missing required fields or invalid data formatproduct_name, sector, country, quantity, unit_id, purchase_date, expense_type.
401 Unauthorized
Cause: Missing or invalid API key422 Validation Error
Cause: Invalid field valuesrecycledis between 0 and 1quantityis >= 0countryis a valid 2-letter ISO codeexpense_typeis eithercapexoropexpurchase_typeis eitherspend_basedorsupplier_specific
Use Cases
Create Spend-Based Purchase
Track a purchase using monetary spend and sector emission factors:Create Supplier-Specific Purchase
Track a purchase using a custom emission factor from your supplier:Track Capital Goods (CAPEX)
Create a capital expenditure purchase (Scope 3 Category 2):Bulk Create Purchases
Create multiple purchases efficiently:Related Endpoints
List Purchases
Retrieve all purchases
Get Purchase
Get purchase details
Update Purchase
Modify purchase details
Custom Emission Factors
Create supplier-specific factors