Skip to main content

Create transactions

POST 

/transactions

Calculates carbon emission for one or more transactions. If the request contains a transaction with an unsupported classification the response still contains that item but without any values returned, except the reference which is echoed back.

Request

Header Parameters

    forwarded-partner string

    Partner identification in case the request is proxied by another partner

Body

required

Transaction information required to perform the calculation

    transactions

    object[]

    required

    Possible values: >= 1, <= 5000

  • Array [

  • reference TransactionReference (string)required

    Possible values: non-empty and <= 100 characters

    A reference to the transaction this calculation was based on (from request)

    classifications

    object[]

    required

  • Array [

  • type stringrequired

    Expresses the type of classification. Check /classifications for a list of supported types

    id stringrequired

    The identifier for the classification within a specific type

  • ]

  • amount

    object

    required

    Expresses a monetary amount

    value numberrequired

    Possible values: >= -1000000000 and <= 1000000000

    currency CurrencyCode (string)required

    Possible values: >= 3 characters and <= 3 characters, Value must match regular expression ^[A-Z]{3}$

    Currency in ISO 4217 code format

    country stringrequired

    Possible values: Value must match regular expression [A-Z]{2}

    The country in which the transaction took place following the ISO-3166 alpha-2 convention

    date string

    Possible values: Value must match regular expression ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

    The date when the transaction occurred in YYYY-MM-DD format

  • ]

Responses

Transaction response

Schema

    transactionImpacts

    object[]

  • Array [

  • oneOf

    CO2e impact for a transaction

    co2eEmission

    object

    required

    Expresses the carbon foot print

    total numberrequired

    The total carbon footprint

    socialCostOfCarbon

    object

    required

    The transaction's social cost of carbon (SCC)

    total numberrequired

    The total social cost for carbon footprint

    currency CurrencyCode (string)required

    Possible values: >= 3 characters and <= 3 characters, Value must match regular expression ^[A-Z]{3}$

    Currency in ISO 4217 code format

    reference TransactionReference (string)required

    Possible values: non-empty and <= 100 characters

    A reference to the transaction this calculation was based on (from request)

    classification

    object

    required

    Expresses the classification with an identifier

    type stringrequired

    Expresses the type of classification. Check /classifications for a list of supported types

    id stringrequired

    The identifier for the classification within a specific type

    spendingAreaId integerrequired

    The spending category ID of the transaction, can be retrieved from /categories

    docc stringrequired

    The Doconomy Category Code used in calculating the footprint

  • ]

Loading...