Create a transaction emission estimate (batch)
Perform multiple transaction emissions estimate in one request.
Each estimate is handled individually.
The response contains estimates or errors in the same orders as the request.
Parameters
string
A name to reference this calculation.
object
string
The name of the merchant.
stringrequired
The three-letter code of the merchant's country.
One of
enum
A diet followed by an individual.
High meat-eater is someone consuming over 100 grams of meat per day, medium is 50-99 grams per day and low is less than 50 grams per day. A fish eater is someone that doesn't consume meat other than fish.
Enum:
- high_meat_eater
- medium_meat_eater
- low_meat_eater
- fish_eater
- vegetarian
- vegan
array of object
Bundle selection percentages.
The sum of all percentages must equal 100.
If not specified, the preconfigured allocation ratios are going to be used.
If, for each selection, percentage
is not provided, the selection is divided equally (best effort) between bundles. percentage
must be provided for all or none of the bundles.
enum
Unit, t
for tonne, kg
for kilogram, g
for gram
Enum:
- g
- kg
- t
Returns
array of oneOf
curl 'https://api.lune.co/v1/estimates/transactions/batch' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-X POST \
-d '[
{
"value": {
"value": "3.14",
"currency": "GBP"
},
"merchant": {
"country_code": "GBR",
"category_code": "0763"
}
}
]'
[
{
"mass": {
"amount": "40.501",
"unit": "t"
},
"id": "90ng23MKvLqbkpMwMw7yMBD4wJQrV6O6",
"quote": {
"errors": [
{
"error_code": "account_suspended",
"message": "message"
}
]
},
"request": {
"name": "name",
"value": {
"value": "3.14",
"currency": "GBP"
},
"merchant": {
"name": "The Corner Store",
"country_code": "GBR",
"category_code": "0763"
},
"diet": "high_meat_eater",
"bundle_selection": [
{
"bundle_id": "BmWxrvXo29eGqzA1qjANL5PwnkgaO8R3",
"percentage": 34
},
{
"bundle_id": "VndoQ0PZjGMzvYOZGwqy6kbgN1eOJx9B",
"percentage": 66
}
],
"quantity_trunc": "t"
},
"search_term_match": "search_term_match"
}
]