All Products
Search
Document Center

Energy Expert:GetGwpInventoryConstitute

Last Updated:Feb 20, 2025

Used to obtain the carbon emission composition analysis of a specified product. Carbon emission composition analysis includes two analysis dimensions: inventory and type. In the rendering effect, including a hierarchical list and pie chart.

Operation description

Used to obtain the carbon emission composition analysis of a specified product. Carbon emission composition analysis includes two analysis dimensions: inventory and type. In the rendering effect, including a hierarchical list and pie chart.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /api/v1/carbon/footprint/result/gwp/inventory/constitute HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

Request parameters.

codestringYes

The enterprise code.

C-20080808-1
productIdlongYes

The product id.

1024
productTypelongYes

Product type: 1 indicates that the carbon footprint of the product is requested, and 5 indicates that the carbon footprint of the supply chain is requested.

1

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

requestIdstring

The ID of the request. The value is unique for each request. This facilitates subsequent troubleshooting.

06DA2909-7736-5738-AA31-ACD617D828F1
dataobject

The response parameters.

namestring

The name.

This is not used for displaying
unitstring

Emission Unit.

kgCO₂e/t
carbonEmissiondouble

Emission quantity: may be positive, negative, or 0. To ensure the calculation accuracy, 24 decimal places are reserved for the calculation process. We recommend that you intercept data based on your business requirements.

1009.976265540000000000000000000000
byResourceTypearray

Aggregated by resource type of an inventory.

ByResourceTypeGwpInventoryConstitute

Used for "by type" analysis in composition analysis. This is a nested structure, total carbon emissions-> sorted by inventory type, a total of two layers, the last level byResource is empty.

itemsarray

Organized by hierarchy from high to low, according to the flow-> process-> inventory hierarchy.

ItemsGwpInventoryConstitute

Used for "by inventory" analysis in composition analysis. Is a nested structure, according to the link-> operation-> list level, the last level items is empty .

Examples

Sample success responses

JSONformat

{
  "requestId": "06DA2909-7736-5738-AA31-ACD617D828F1",
  "data": {
    "name": "This is not used for displaying",
    "unit": "kgCO₂e/t",
    "carbonEmission": 1009.97626554,
    "byResourceType": [
      {
        "percent": 100,
        "resourceType": 1,
        "unit": "kgCO₂e/kg",
        "carbonEmission": 1009.97626554,
        "name": "Acquisition of Raw Materials",
        "byResourceType": [
          {
            "name": "Energy",
            "unit": "kgCO₂e/Piece(s)",
            "resourceType": 1,
            "carbonEmission": 1009.97626554,
            "percent": "98.76"
          }
        ],
        "items": [
          {
            "percent": 100,
            "resourceType": 1,
            "unit": "kgCO₂e/kg",
            "carbonEmission": 1009.97626554,
            "name": "Acquisition of Raw Materials",
            "byResourceType": [
              {
                "name": "Energy",
                "unit": "kgCO₂e/Piece(s)",
                "resourceType": 1,
                "carbonEmission": 1009.97626554,
                "percent": "98.76"
              }
            ],
            "items": [
              {
                "percent": 100,
                "resourceType": 1,
                "unit": "kgCO₂e/kg",
                "carbonEmission": 1009.97626554,
                "name": "Acquisition of Raw Materials",
                "byResourceType": [
                  {
                    "name": "Energy",
                    "unit": "kgCO₂e/Piece(s)",
                    "resourceType": 1,
                    "carbonEmission": 1009.97626554,
                    "percent": "98.76"
                  }
                ],
                "items": []
              }
            ]
          }
        ]
      }
    ],
    "items": []
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-04-01The response structure of the API has changedView Change Details