Skip to main content
PATCH
/
components
/
{id}
Patch Component
curl --request PATCH \
  --url https://api.sandbox.isometric.com/mrv/v0/components/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-client-secret: <x-client-secret>' \
  --data '
{
  "allocation_strategy": {
    "__typename": "Undefined"
  },
  "description": {
    "__typename": "Undefined"
  },
  "display_name": {
    "__typename": "Undefined"
  },
  "inputs": {
    "__typename": "Undefined"
  }
}
'
import requests

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

payload = {
"allocation_strategy": { "__typename": "Undefined" },
"description": { "__typename": "Undefined" },
"display_name": { "__typename": "Undefined" },
"inputs": { "__typename": "Undefined" }
}
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({
allocation_strategy: {__typename: 'Undefined'},
description: {__typename: 'Undefined'},
display_name: {__typename: 'Undefined'},
inputs: {__typename: 'Undefined'}
})
};

fetch('https://api.sandbox.isometric.com/mrv/v0/components/{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/components/{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([
'allocation_strategy' => [
'__typename' => 'Undefined'
],
'description' => [
'__typename' => 'Undefined'
],
'display_name' => [
'__typename' => 'Undefined'
],
'inputs' => [
'__typename' => 'Undefined'
]
]),
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/components/{id}"

payload := strings.NewReader("{\n \"allocation_strategy\": {\n \"__typename\": \"Undefined\"\n },\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"inputs\": {\n \"__typename\": \"Undefined\"\n }\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/components/{id}")
.header("x-client-secret", "<x-client-secret>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allocation_strategy\": {\n \"__typename\": \"Undefined\"\n },\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"inputs\": {\n \"__typename\": \"Undefined\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.isometric.com/mrv/v0/components/{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 \"allocation_strategy\": {\n \"__typename\": \"Undefined\"\n },\n \"description\": {\n \"__typename\": \"Undefined\"\n },\n \"display_name\": {\n \"__typename\": \"Undefined\"\n },\n \"inputs\": {\n \"__typename\": \"Undefined\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "activity_completed_at": "2023-11-07T05:31:56Z",
  "activity_started_at": "2023-11-07T05:31:56Z",
  "blueprint_key": "<string>",
  "description": "<string>",
  "display_name": "<string>",
  "ghg_entry_template_component_id": "rtc_1DAA58EDM1S0AMPN",
  "id": "cmp_1EP2SB7MZ1S036PY",
  "inputs": [
    {
      "datapoint_ids": [
        "dtp_1DVKHKS101S0Q61Q"
      ],
      "input_key": "<string>",
      "__typename": "ComponentListInput"
    }
  ],
  "removal_template_component_id": "rtc_1DAA58EDM1S0AMPN",
  "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:

"cmp_1EP2SB7MZ1S036PY"

"cmp_1EHK4R6QJSBXFC5N"

Body

application/json
allocation_strategy
default:{"__typename":"Undefined"}

Strategies which control how Project Emissions are automatically amortized and attributed to GHG Statement and GHG entries

ESTIMATED_PROJECT_TONNAGE - Automatic amortization ensuring full amortization in proportion to the project's estimated gross removal.

MANUAL - No automatic amortization. All GHG Statement and GHG entry attributions are performed manually.

CUSTOM_TIME_PERIOD - Automatic amortization ensuring full amortization by a specified target date.

ESTIMATED_PROJECT_LIFETIME - Automatic amortization ensuring full amortization over the project's estimated lifetime.

Available options:
ESTIMATED_PROJECT_TONNAGE,
MANUAL,
CUSTOM_TIME_PERIOD,
ESTIMATED_PROJECT_LIFETIME
description
default:{"__typename":"Undefined"}
display_name
default:{"__typename":"Undefined"}
Required string length: 1 - 150
inputs

Overwrite existing component inputs

Response

Successful Response

activity_completed_at
string<date-time> | null
required
activity_started_at
string<date-time> | null
required
blueprint_key
string
required
description
string | null
required
display_name
string
required
ghg_entry_template_component_id
string | null
required

The ID of the GHG entry template component, if this component was created via a template. May be null if the component was created directly, or if the template has been deleted.

Required string length: 20 - 37
Example:

"rtc_1DAA58EDM1S0AMPN"

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

"cmp_1EP2SB7MZ1S036PY"

"cmp_1EHK4R6QJSBXFC5N"

inputs
(ComponentListInput · object | ComponentScalarInput · object)[]
required

A list of component inputs. The inputs can be either scalars or list inputs.

removal_template_component_id
string | null
required
deprecated

The ID of the removal template component, if this component was created via a template. May be null if the component was created directly, or if the template has been deleted.

Required string length: 20 - 37
Example:

"rtc_1DAA58EDM1S0AMPN"

scope
enum<string>
required
Available options:
REMOVAL,
GHG_STATEMENT,
PROJECT,
NET_NEGATIVITY
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
type
enum<string>
required
Available options:
ACTIVITY,
REMOVAL_COUNTERFACTUAL,
SEQUESTRATION,
LOSS,
ADJUSTMENT,
UNCERTAINTY_DISCOUNT
allocation_strategy
enum<string> | null

Attribution strategy, manages how project-scoped components are distributed across GHG statements; value will be Null if scope is not of scope project

Available options:
ESTIMATED_PROJECT_TONNAGE,
MANUAL,
CUSTOM_TIME_PERIOD,
ESTIMATED_PROJECT_LIFETIME