- CALC API
- LCI API
- LCIA API
- METHOD API
- AICHAT(TEMP)
- CHROMA
碳排放计算接口
开发环境
http://localhost:9000
开发环境
http://localhost:9000
POST
/calc/emission
计算
Request
Body Params application/json
timestamp
number
时间戳
code
number
响应码
message
string
响应消息
data
object (CalcRequest)
required
methodId
string
required
process
array[object (ProcessNode) {8}]
required
Example
{
"timestamp": 0,
"code": 0,
"message": "string",
"data": {
"methodId": "string",
"process": [
{
"processId": "string",
"processName": "string",
"qty": 0,
"unit": "p",
"unitProcess": true,
"type": "any",
"lciAry": [
{
"lciDataId": "string",
"conversionCoefficient": 0,
"coefficient": 0
}
],
"subprocess": [
{}
]
}
]
}
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:9000/calc/emission' \
--header 'Content-Type: application/json' \
--data-raw '{
"timestamp": 0,
"code": 0,
"message": "string",
"data": {
"methodId": "string",
"process": [
{
"processId": "string",
"processName": "string",
"qty": 0,
"unit": "p",
"unitProcess": true,
"type": "any",
"lciAry": [
{
"lciDataId": "string",
"conversionCoefficient": 0,
"coefficient": 0
}
],
"subprocess": [
{}
]
}
]
}
}'
Responses
🟢200成功
application/json
Body
code
integer
required
message
string
required
data
object (CalcResponse)
required
totalEmission
number
optional
classifyEmission
object
optional
typesEmission
object
optional
unitProcessesEmission
array [object {9}]
optional
processesEmission
array[object (ProcessEmissionResponse) {9}]
optional
timestamp
integer
required
Example
{
"code": 0,
"message": "string",
"data": {
"totalEmission": 0,
"classifyEmission": {
"property1": 0,
"property2": 0
},
"typesEmission": {
"property1": 0,
"property2": 0
},
"unitProcessesEmission": [
{
"processId": "string",
"totalQty": 0,
"qty": 0,
"unit": "string",
"processName": "string",
"lciAry": {
"lciDataId": "string",
"conversionCoefficient": "string",
"coefficient": "string"
},
"type": "string",
"emission": 0,
"classifyEmission": {
"property1": 0,
"property2": 0
}
}
],
"processesEmission": [
{
"processId": "string",
"qty": 0,
"unit": "string",
"processName": "string",
"emission": 0,
"classifyEmission": {
"property1": 0,
"property2": 0
},
"typesEmission": {
"property1": 0,
"property2": 0
},
"subProcesses": [
{}
],
"unitProcess": true
}
]
},
"timestamp": 0
}
Modified at 2025-04-09 05:26:37