CarbonAPI Documentation
API ReferenceExpense Categorisation

Get the results of a batch of transactions

Retrieve the contents of a categorisation batch, by batch id. For more information, see: Categorising Expenses Guide. For a guide on the taxonomy returned, see: Expense Categorisation Taxonomy.

GET
/transaction/batch/{batchId}
x-api-key<token>

In: header

Scope: api_key

Path Parameters

batchIdstring

Response Body

curl -X GET "https://api.aws-au.carbonapi.io/transaction/batch/string"
{
  "id": "batch-123",
  "status": "Completed",
  "createdAt": "2023-01-01T00:00:00.000Z",
  "updatedAt": "2023-01-01T00:00:00.000Z",
  "transactions": [
    {
      "id": "txn-123",
      "taxonomy": {
        "name": "Growing of cereals (except rice), leguminous crops and oil seeds",
        "urn": "urn:ef:spend:commodity:agriculture-forestry-fishing:growing-cereals-legumes-oilseeds",
        "sicCode": "01110",
        "confidence": 0.95,
        "status": "SUCCESS",
        "error": "Error message"
      },
      "emissionFactor": {
        "status": "SUCCESS",
        "error": "Error message",
        "source": "CarbonAPI Example Factor Source",
        "sourceUrl": "https://www.carbonapi.io",
        "sourceVersion": "1.0",
        "sourceDataYear": 2023,
        "valuationMethod": "PP",
        "lcaActivity": "cradle_to_shelf",
        "scope": 3,
        "externalLocator": "electricity_supply",
        "matchType": "DirectMatch",
        "notes": "This is a test note",
        "factorCurrency": "USD"
      },
      "measurement": {
        "status": "SUCCESS",
        "error": "Error message",
        "co2e": 100.5,
        "constituents": {
          "co2": 100.03,
          "n2o": 0.3,
          "ch4": 0.2,
          "scope1": 0,
          "scope2": 0,
          "scope3": 100.5
        }
      },
      "steps": [
        {
          "id": "PREDICT_CATEGORY",
          "meta": {
            "alternativeCategories": [
              {
                "urn": "urn:carbonapi:emission-factor:flights",
                "confidence": 0.95
              }
            ]
          }
        }
      ]
    }
  ]
}