Skip to main content
PATCH
/
removals
/
{id}
Patch Removal
curl --request PATCH \
  --url https://api.sandbox.isometric.com/mrv/v0/removals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "add_components": {
    "__typename": "Undefined"
  },
  "completed_on": "2023-12-25",
  "delete_component_ids": {
    "__typename": "Undefined"
  },
  "feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
  "started_on": "2023-12-25"
}
'
import requests

url = "https://api.sandbox.isometric.com/mrv/v0/removals/{id}"

payload = {
"add_components": { "__typename": "Undefined" },
"completed_on": "2023-12-25",
"delete_component_ids": { "__typename": "Undefined" },
"feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
"started_on": "2023-12-25"
}
headers = {
"x-client-secret": "<x-client-secret>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
'x-client-secret': '<x-client-secret>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
add_components: {__typename: 'Undefined'},
completed_on: '2023-12-25',
delete_component_ids: {__typename: 'Undefined'},
feedstock_type_id: 'ftt_1D7KZ1P761S0G7BN',
started_on: '2023-12-25'
})
};

fetch('https://api.sandbox.isometric.com/mrv/v0/removals/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.isometric.com/mrv/v0/removals/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'add_components' => [
'__typename' => 'Undefined'
],
'completed_on' => '2023-12-25',
'delete_component_ids' => [
'__typename' => 'Undefined'
],
'feedstock_type_id' => 'ftt_1D7KZ1P761S0G7BN',
'started_on' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-client-secret: <x-client-secret>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.sandbox.isometric.com/mrv/v0/removals/{id}"

payload := strings.NewReader("{\n \"add_components\": {\n \"__typename\": \"Undefined\"\n },\n \"completed_on\": \"2023-12-25\",\n \"delete_component_ids\": {\n \"__typename\": \"Undefined\"\n },\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"started_on\": \"2023-12-25\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.sandbox.isometric.com/mrv/v0/removals/{id}")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"add_components\": {\n \"__typename\": \"Undefined\"\n },\n \"completed_on\": \"2023-12-25\",\n \"delete_component_ids\": {\n \"__typename\": \"Undefined\"\n },\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"started_on\": \"2023-12-25\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.isometric.com/mrv/v0/removals/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-client-secret"] = '<x-client-secret>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"add_components\": {\n \"__typename\": \"Undefined\"\n },\n \"completed_on\": \"2023-12-25\",\n \"delete_component_ids\": {\n \"__typename\": \"Undefined\"\n },\n \"feedstock_type_id\": \"ftt_1D7KZ1P761S0G7BN\",\n \"started_on\": \"2023-12-25\"\n}"

response = http.request(request)
puts response.read_body
{
  "co2e_net_removed_kg": 123,
  "co2e_net_removed_standard_deviation_kg": 123,
  "co2e_net_removed_without_discount_kg": 123,
  "completed_on": "2023-12-25",
  "credit_allocation": {
    "buffer_pool_contribution_kg": 123,
    "supplier_allocation_kg": 123
  },
  "feedstock_type_id": "ftt_1D7KZ1P761S0G7BN",
  "ghg_statement_id": "ggs_1GDQJ99Z51S0DYW9",
  "id": "rmv_1EEM6NJXX1S0EXKD",
  "risk_of_reversal_percentage": 123,
  "started_on": "2023-12-25",
  "supplier_reference_id": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}

Authorizations

Authorization
string
header
required

A JWT Bearer token header for authentication and authorization, in the format Authorization: Bearer <token>

Headers

x-client-secret
string
required

A secret token identifying the client connecting to the API

Example:

"Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP"

Path Parameters

id
string
required
Required string length: 20 - 37
Examples:

"rmv_1EEM6NJXX1S0EXKD"

"rmv_1E3V4J2EWSBX5E82"

Body

application/json
add_components
AddComponentToRemoval · object
completed_on
string<date> | null

Date in ISO format (YYYY-MM-DD)

delete_component_ids
deprecated

Deprecated, please use PATCH /removal/{id}/component_attributions instead.

IDs for components to delete from the removal.

Required string length: 20 - 37
feedstock_type_id
default:{"__typename":"Undefined"}

ID of the feedstock type for the removal.

Required string length: 20 - 37
Example:

"ftt_1D7KZ1P761S0G7BN"

started_on
string<date> | null

Date in ISO format (YYYY-MM-DD)

Response

Successful Response

co2e_net_removed_kg
number
required

The CO₂e removed by this removal once uncertainty discounting has been applied

co2e_net_removed_standard_deviation_kg
number | null
required

The standard deviation of the CO₂e net removed and therefore the uncertainty discount applied to the removal

co2e_net_removed_without_discount_kg
number
required

The CO₂e removed by this removal before any uncertainty discounting has been applied

completed_on
string<date>
required
credit_allocation
CreditAllocation · object | null
required

The split of issuable credits between the supplier and buffer pool. Null when risk_of_reversal_percentage is not set.

feedstock_type_id
string | null
required

The feedstock type ID that this removal is associated with.

Required string length: 20 - 37
Example:

"ftt_1D7KZ1P761S0G7BN"

ghg_statement_id
string | null
required

The GHG statement ID that this removal is associated with. If null, the removal is in draft and has not been submitted for verification.

Required string length: 20 - 37
Example:

"ggs_1GDQJ99Z51S0DYW9"

id
string
required
Required string length: 20 - 37
Examples:

"rmv_1EEM6NJXX1S0EXKD"

"rmv_1E3V4J2EWSBX5E82"

risk_of_reversal_percentage
number | null
required

The percentage of credits contributed to the buffer pool due to risk of reversal.

started_on
string<date>
required
supplier_reference_id
string | null
required

A string that must be unique for all resources created by a specific supplier. It can be used by a client to identify the correct objects in their system.

Required string length: 1 - 200