Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.6.0] - 2025-11-07

### Removed

- Removes `createMassEstimate` and `createBitcoinEstimate` method
- Retires all remaining estimates functionalities

## [2.5.0] - 2025-08-19

### Removed
Expand Down
53 changes: 0 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ npm install install-peers

### Orders

In Patch, orders represent a purchase of carbon offsets or negative emissions by mass.
Place orders directly if you know the amount of carbon dioxide you would like to sequester.
If you do not know how much to purchase, use an estimate.
You can also create an order with a maximum desired price, and we'll allocate enough mass to
fulfill the order for you.

[API Reference](https://docs.patch.io/#/?id=orders)

#### Examples
Expand Down Expand Up @@ -105,53 +99,6 @@ const page = 1; // Pass in which page of orders you'd like
patch.orders.retrieveOrders({ page });
```

### Estimates

Estimates allow API users to get a quote for the cost of compensating a certain amount of CO2. When creating an estimate, an order in the `draft` state will also be created, reserving the allocation of a project for 5 minutes. If you don't place your draft order within those 5 minutes, the order will automatically be cancelled.

[API Reference](https://docs.patch.io/#/?id=estimates)

#### Examples

```javascript
// Create a mass estimate
const mass_g = 1000000; // Pass in the mass in grams (i.e. 1 metric tonne)
patch.estimates.createMassEstimate({ mass_g });

// Create an ecommerce estimate
const distance_m = 9000000;
// Pass in the shipping distance in meters, the transportation method, and the package mass
patch.estimates.createEcommerceEstimate({
distance_m,
package_mass_g: 1000,
transportation_method: 'air'
});

// Create a bitcoin estimate
const transaction_value_btc_sats = 1000; // [Optional] Pass in the transaction value in satoshis
patch.estimates.createBitcoinEstimate({
transaction_value_btc_sats
});

// Create a vehicle estimate
const distance_m = 9000000;
// Pass in the driving distance in meters and the model/make/year of the vehicle
patch.estimates.createVehicleEstimate({
distance_m,
make: 'Toyota',
model: 'Corolla',
year: 1995
});

// Retrieve an estimate
const estimateId = 'est_test_1234';
patch.estimates.retrieveEstimate(estimate_id);

// Retrieve a list of estimates
const page = 1; // Pass in which page of estimates you'd like
patch.estimates.retrieveEstimates({ page });
```

### Projects

Projects are the ways Patch takes CO2 out of the air. They can represent reforestation, enhanced weathering, direct air carbon capture, etc. When you place an order via Patch, it is allocated to a project.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patch-technology/patch",
"version": "2.5.0",
"version": "2.6.0",
"description": "Node.js wrapper for the Patch API",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiClient {
};

this.defaultHeaders = {
'User-Agent': 'patch-node/2.5.0',
'User-Agent': 'patch-node/2.6.0',
'Patch-Version': 2
};

Expand Down
Loading