Create an order by value
Parameters
Maximum price of CO2 offsets to purchase (in the account's currency).
value
must not be lower than the currency's minimum unit.
Account-unique identifier provided by the client.
idempotency_key
has two purposes:
- Clients can safely retry order requests without accidentally performing the same operation twice. The current state of the original order is returned.
- Clients can use
idempotency_key
to reconcile orders with other entities on their system.
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.
An arbitrary dictionary (key-value pairs) to store application-specific information.
Lune doesn't use this information for order processing. Its purpose is for the API clients to be able to attach arbitrary information (to an order for example) and then retrieve it.
Returns
Returns: Order object
The order's unique identifier
Account-unique identifier provided by the client.
idempotency_key
has two purposes:
- Clients can safely retry order requests without accidentally performing the same operation twice. The current state of the original order is returned.
- Clients can use
idempotency_key
to reconcile orders with other entities on their system.
Identifies whether the order has been placed by quantity (kg CO2) or value (monetary amount)
- quantity
- value
Order status
- received
- placed
- paid
- retiring
- cancelled
- complete
- failed
Order currency code
The net offset cost being purchased. May be lower than requested_value
.
This property is set when bundles are assigned to the order. Unit: order currency
The total cost for the order inclusive of fees.
Unit: order currency
Lune's fee.
This property is set when bundles are assigned to the order. Unit: order currency
Quantity of CO2 offsets purchased in tonnes.
How the order will be paid.
When card
, Lune will attempt to charge the card and pay this order. When invoice
, Lune will email an invoice with payment instructions.
- invoice
- card
Order creation timestamp
bundles are set when the order's status is placed
, paid
, retiring
or complete
.
The bundles associated with the order including their relative quantity and cost breakdown.
Projects are set when the order's status is retiring
or complete
.
The projects associated with the order including their relative quantity and cost breakdown.
Orders are placed against bundles, not projects. Projects in a bundle may change based on supply.
This property is set as soon as we can guarantee project supply.
Carbon credits PDF certificate URL.
This property is set when an order has state 'complete'
The property is set (and the certificate is available) regardless of the Sustainability page configuration.
The URL requires API authentication and cannot be accessed anonymously.
The Carbon credits certificate public URL.
Once the Sustainability page of the associated account is enabled and configured to include the certificate section, and the order is set to 'complete', this URL will link to the publicly accessible certificate.
An arbitrary dictionary (key-value pairs) to store application-specific information.
Lune doesn't use this information for order processing. Its purpose is for the API clients to be able to attach arbitrary information (to an order for example) and then retrieve it.
The offset link identifier, if the order was placed through an offset link
End-user email.
This property is currently populated on orders placed through offset links.
Requested value of CO2 offsets to purchase in the account's currency.
Requested quantity of CO2 offsets to purchase in tonnes.
One of
The emission calculation unique identifier
One of
curl 'https://api.lune.co/v1/orders/by-value' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"value": "0.54"
}'
{
"id": "VfdoQ0PZjGMzvYO46lNA6kbgN1eOJx9B",
"metadata": {},
"idempotency_key": null,
"type": "value",
"status": "placed",
"currency": "USD",
"offset_cost": "0.49",
"total_cost": "0.54",
"commission": "0.05",
"quantity": "0.019137",
"created_at": "2023-01-04T15:00:27.349Z",
"bundles": [
{
"bundle_id": "q9aKx7b6nNXMk3Yv3pD1mlW5Od2eLZE8",
"bundle_name": "Conserving forests in Asia",
"quantity": "0.018181",
"unit_price": "13.57",
"gross_unit_price": "15.08",
"offset_cost": "0.25",
"insufficient_available_quantity": null
},
{
"bundle_id": "xWaKJL3okjD46VpJ4yGXnQNZRe1vzP0w",
"bundle_name": "Ocean Carbon Removal",
"quantity": "0.000956",
"unit_price": "250",
"gross_unit_price": "277.78",
"offset_cost": "0.24",
"insufficient_available_quantity": null
}
],
"projects": [],
"certificate": null,
"certificate_url": null,
"offset_link_id": null,
"email": null,
"estimate_id": null,
"requested_quantity": null,
"requested_value": "0.54"
}