Calculate an order quote by mass
HTTPPOST
to /v1/orders/by-mass/quote
This endpoint does not create an order.It processes the order as if it were placed, returning estimated cost and bundles allocations.Request body
oneOfTotal mass and per-bundle percentages
Total mass and per-bundle percentages
Response
currencystringrequired
Currency code
estimated_quantitystringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated quantity (tonnes CO2).
May be lower than requested_quantity
.
estimated_offset_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated offset cost
Unit: order quote currency
estimated_total_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated total cost inclusive of Lune fees.
Unit: order quote currency
estimated_commissionstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated commission
bundlesarrayrequired
Bundles included in the quote including quantity and cost breakdown.
object
bundle_idstringrequired
The bundle's unique identifier
bundle_namestringrequired
The bundle's name
primary_imagestring
A bundle's image URL
quantitystringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Quantity for the specific bundle (tonnes CO2)
unit_pricestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Bundle unit price per tonne CO2
Unit: order currency
gross_unit_pricestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Bundle unit price per tonne CO2 inclusive of fees.
Unit: order currency
offset_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
The bundle's net offset cost being purchased.
Unit: order currency
insufficient_available_quantitybooleanrequirednullable
If true, there is no inventory necessary to fully satisfy the order for this bundle.
requested_quantitystringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Requested quantity for the specific bundle (tonnes CO2).
requested_quantity may be returned as part of an emission estimate response, in which case this property contains the equivalent value as the mass
property.
requested_valuestringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
Requested value of CO2 offsets to purchase in the account's currency.
Errors
This API operation can return the following errors:400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found
Calculate an order quote by value
HTTPPOST
to /v1/orders/by-value/quote
This endpoint does not create an order.It processes the order as if it were placed, returning estimated cost and bundles allocations.Request body
valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Maximum price of CO2 offsets to purchase (in the account's currency).
value
must not be lower than the currency's minimum unit.
bundle_selectionarray
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.
object
Maps a bundle id to an allocation ratio
bundle_idstringrequired
The bundle's unique identifier
percentageoneOfSelection percentage as integer
Selection percentage as integer
quantity_truncstring
Selects to which precision to truncate quantities specific to carbon offsetting.
g
kg
t
Response
currencystringrequired
Currency code
estimated_quantitystringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated quantity (tonnes CO2).
May be lower than requested_quantity
.
estimated_offset_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated offset cost
Unit: order quote currency
estimated_total_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated total cost inclusive of Lune fees.
Unit: order quote currency
estimated_commissionstringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Estimated commission
bundlesarrayrequired
Bundles included in the quote including quantity and cost breakdown.
object
bundle_idstringrequired
The bundle's unique identifier
bundle_namestringrequired
The bundle's name
primary_imagestring
A bundle's image URL
quantitystringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Quantity for the specific bundle (tonnes CO2)
unit_pricestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Bundle unit price per tonne CO2
Unit: order currency
gross_unit_pricestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Bundle unit price per tonne CO2 inclusive of fees.
Unit: order currency
offset_coststringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
The bundle's net offset cost being purchased.
Unit: order currency
insufficient_available_quantitybooleanrequirednullable
If true, there is no inventory necessary to fully satisfy the order for this bundle.
requested_valuestringrequired
Pattern: ^[0-9]+(\.[0-9]+)?$
Requested order value inclusive of commission
requested_quantitystringrequirednullable
Pattern: ^[0-9]+(\.[0-9]+)?$
Requested quantity of CO2 offsets to purchase in tonnes.
Errors
This API operation can return the following errors:400
api_version_invalid
400
bundle_selection_ratios_invalid
400
bundle_selection_bundle_invalid
400
order_value_invalid
400
bundle_id_invalid
400
id_invalid
400
distance_invalid
400
test_account_name_update_disallowed
400
bundle_selection_ratios_invalid_format
400
address_not_found