> ## Documentation Index
> Fetch the complete documentation index at: https://docs.isometric.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch Removal Components

> Change component attributions for the removal.

Components can be fully or partially attributed to removals via the `components_to_add` field.

To partially attribute the component, provide the `attribution_factor` as a fraction between 0 and 1. And to fully attribute the component, set the `attribution_factor` to 1 (or omit it, as it defaults to 1).

To update the attribution for an already attributed component, call the endpoint again with the component in the `components_to_add` field and a new attribution factor.

The sum of a component’s attributions across all removals cannot be greater than 1.

Components can also be removed from a removal via the `components_to_remove` field.


## OpenAPI

````yaml patch /removals/{id}/component_attributions
openapi: 3.1.0
info:
  description: >
    # Standards


    ## Versioning


    This API will be safely versioned using root path versioning, in the format
    `/v{major}`. For example, `/registry/v0/supplier`.


    ### Compatibility


    We won't make breaking changes to existing API services or endpoints for API
    versions higher than `v0`. If breaking changes are necessary, we'll release
    a new major version.

    We may deprecate APIs that have been replaced by a newer version. When doing
    so, we will expect

    integrated partners to manage a transition to new resources within the
    deprecation timeline of old ones.


    We will make the following sort of changes we do not consider to be
    breaking:


    - Adding new endpoints

    - Adding optional query parameters to API endpoints

    - Adding new properties to existing API responses

    - Reordering properties in existing API responses


    It is important that clients are built to be robust to these changes.


    ## Pagination


    Our API is based on the
    [Relay](https://relay.dev/docs/tutorial/connections-pagination/) pagination
    spec. Paginated endpoints

    will return a `PaginatedListResource` which contains:


    - `page_info` - Containing information regarding pagination cursors and the
    total number of entities.

    - `nodes` - Each node is a paginated entity.

    - `total_count` - The total size of the list across all pages.


    ### Pagination Parameters


    Paginated endpoints also accepted a standard set of query parameters:


    - `last` - An integer number of items to retrieve **before** the item
    represented by the cursor passed in the `before` parameter. Defaults to 10
    with a maximum value of 50.

    - `before` - An opaque cursor representing the first item in the previously
    requested page to select items ordered before it. Submit the previously
    requested page's `start_cursor` here when paginated backwards.

    - `first` - An integer number of items to retrieve **after** the item
    represented by the cursor passed in the `after` parameter. Defaults to 10
    with a maximum value of 50.

    - `after` - An opaque cursor representing the last item in the previously
    requested page to select items ordered after it. Submit the previously
    requested page's `end_cursor` here when paginated forwards.


    For example, querying `/registry/v0/beneficiaries` will return a
    `PaginatedListResource` of the first page of 10 items:


    ```json

    {
        "page_info": {
            "has_previous_page": false,
            "start_cursor": ...,
            "has_next_page": true,
            "end_cursor": "mpG5kcuoFBYtlH",
        },
        "nodes": [{
            "id": "org_12345iso678",
            "name": "My Org",
            ...
        }],
        "total_count": 100
    }

    ```


    Then querying `/registry/v0/beneficiaries?first=15&after=mpG5kcuoFBYtlH`
    will return a `PaginatedListResource` of the next 15 items.


    ## Dates


    Datetime fields in the APIs conform to the [ISO
    8601](https://en.wikipedia.org/wiki/ISO_8601) date and time format in UTC.
    For example: `2024-01-22T11:56:48.520641Z`.


    ## Country Codes


    Countries are identified in the APIs via [ISO 3166-1
    Alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) codes. For
    example: `GBR` and `USA`.

    # Authentication


    Most API requests will need to authenticate against the Isometric API in two
    ways simultaneously:


    - By passing a **client secret** in the `X-Client-Secret` header to identify
    the system integrating with the API.

    - By passing an **access token** in the `Authorization` header to
    authenticate as a specific organization, in order to gain access to its
    private data.


    ### Client Authentication


    Every API call to Isometric must include a **client secret** identifying the
    client application.


    This client secret is tied to a particular environment - sandbox or
    production.


    The client secret should be submitted on every API request via the
    `X-Client-Secret` header. For example `X-Client-Secret: uPrO...wxAh`.


    ### Organization Authentication


    In addition, a large number of API requests will require an **access token**
    in order for the caller to identify themselves and act as a specific
    Organization.


    To authenticate as an Organization you will need to submit a JWT bearer
    access token via the `Authorization` header. For example: `Authorization:
    Bearer eyJh...sw5c`.

    If you are going to be acting on behalf of other Organizations, they will
    need to generate the access token and pass it securely to you.

    Access tokens should be treated as highly sensitive, kept secret and stored
    accordingly.


    Access tokens are scoped to a single Organization - so if you are acting on
    behalf of multiple particular organizations, you will need to submit the
    appropriate access token on each request.


    ### Managing Credentials


    Credentials can be managed through Certify UI in the [Team
    settings](https://registry.isometric.com/account/team-settings) section.
    Access tokens will expire after 1 year from generation. When you are
    approaching expiry, a new token will need to be generated.


    Both client secrets and access tokens can be created and invalidated through
    UI.

    Client secrets do not expire and do not need to be rotated.

    If either secret becomes compromised, it should be invalidated through the
    UI.

    # Key Certify Concepts


    This page defines concepts used in Certify, and the [Certify
    API](/api-reference/certify/certify-introduction), which are helpful to
    understand when submitting information for verification via Certify. For a
    broader understanding of Isometric's verification processes on the Isometric
    Registry, please refer to the [Isometric
    Standard](https://isometric.com/standard).


    ## Resource visibility


    - Until resources are submitted as part of a GHG statement, they are visible
    only to members of your organization.

    - After statement submission, they are visible to the verifier assigned to
    the GHG statement.

    - Once credits have been issued, GHG entries are added to the [public
    registry](https://registry.isometric.com), and associated resources are
    visible publicly, with the exception of source documents.

    - Sources uploaded in the Certify platform are kept private by default once
    published on the Isometric registry (file names will be displayed). Contact
    Isometric to update public source visibility. Sources [added via the
    API](/api-reference/certify/post-source) can be set `public` on submission.


    ## Resources


    The main resources used in Certify are sources, datapoints, components and
    GHG entries.


    ### Sources


    - Sources represent a piece of evidence for a particular datapoint used in
    carbon accounting calculations.

    - Source documents are private, and only shared with the verifier assigned
    to a related GHG entry.

    - Other information associated with a source, such as its display name, is
    visible publicly once the GHG entry is on the public registry.

    - Verifiers are not notified when new sources are added to datapoints in a
    submitted GHG entry, but they will immediately have access to the source
    documentation. Please notify the Isometric Registry Operations team when
    sources are added on a verifier's request so that we can ensure that the
    verifier is aware.


    ### Datapoints


    - Datapoints represent any value used in carbon accounting calculations.

    - When creating datapoints, sources should be referenced to provide evidence
    for the value used.

    - A standard deviation should be provided if the datapoint is to be included
    in the variance propagation method of uncertainty analysis.

    - All datapoints are considered statistically independent for the purpose of
    variance propagation, although if a datapoint is used twice within a GHG
    entry calculation, this dependence is captured.


    ### Components


    - Components represent physical activities whose CO₂e flux needs to be
    accounted for.

    - Components are created from [component
    blueprints](/user-guides/certify/component-blueprint-library) that contain
    sets of equations used to calculate a transfer of CO₂e into or out of the
    atmosphere.

    - A blueprint defines a set of inputs that are the datapoints to be used in
    the calculation. For instance, a transport emissions blueprints would ask
    for datapoints representing a distance, mass and carbon intensity.

    - When creating a component from a blueprint, the blueprint must be
    specified, as well as a list of datapoints for the expected blueprint
    inputs. Learn more about components in [Identifying
    Components](/user-guides/certify/identifying-components).


    ### GHG entries


    - GHG entries represent a series of activities that result in CO₂e being
    removed from the atmosphere or reduced relative to a baseline.

    - The carbon accounting of a GHG entry typically contains sequestrations,
    counterfactuals and activities (emissions).

    - GHG entries are structured using a template, [defined in your
    LCA](/user-guides/certify/lca).

    - Templates are divided into component groups. For instance, a biochar
    template may contain a `Feedstock sourcing` group.

    - Groups can contain multiple components.

    - Components can also be partially attributed to GHG entries, if the
    activity the component represents contributed to multiple GHG entries.

    - The final uncertainty discounting is done on the GHG entry level - the API
    will return the CO₂e removed with and without discounting.

    - See the [Create a GHG entry](/user-guides/certify/ghg-entry) guide for
    more details.


    ### Feedstock types


    - Many carbon removal methods involve a feedstock, for instance biomass
    feedstock in BiCRS or silicate rock in enhanced weathering.

    - Feedstock types are used to describe the feedstock used in a GHG entry.

    - When creating a GHG entry, a feedstock type can be optionally specified so
    that Isometric and verifiers can see which GHG entries use which feedstocks.

    - This is important if different feedstocks are used in a single GHG
    statement.

    - See the [Add feedstock](/user-guides/certify/add-feedstock) guide for more
    details.
  title: Isometric Certify Data Ingestion API
  version: v0
servers:
  - description: Sandbox Isometric MRV API
    url: https://api.sandbox.isometric.com/mrv/v0
  - description: Production Isometric MRV API
    url: https://api.isometric.com/mrv/v0
security: []
paths:
  /removals/{id}/component_attributions:
    patch:
      summary: Patch Removal Components
      description: Change component attributions for the removal.
      operationId: patch_removal_components_removals__id__component_attributions_patch
      parameters:
        - in: path
          name: id
          required: true
          schema:
            $ref: '#/components/schemas/IsometricIDPathParam_GhgEntry_'
        - description: A secret token identifying the client connecting to the API
          in: header
          name: x-client-secret
          required: true
          schema:
            description: A secret token identifying the client connecting to the API
            examples:
              - Syou3EZiO5vuMEgNyBeA8cjEMYOnQDwP
            title: Client secret
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchRemovalComponentAttributionsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Removal'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      deprecated: true
      security:
        - HTTPBearer: []
components:
  schemas:
    IsometricIDPathParam_GhgEntry_:
      $ref: '#/components/schemas/IsometricIDRequestParam_GhgEntry_'
    PatchRemovalComponentAttributionsRequest:
      properties:
        components_to_add:
          anyOf:
            - items:
                $ref: '#/components/schemas/ComponentToAttribute'
              type: array
            - $ref: '#/components/schemas/Undefined'
          default:
            __typename: Undefined
          description: Components to be attributed to Removal.
          title: Components To Add
        components_to_remove:
          anyOf:
            - items:
                example: cmp_1EP2SB7MZ1S036PY
                examples:
                  - cmp_1EP2SB7MZ1S036PY
                  - cmp_1EHK4R6QJSBXFC5N
                maxLength: 37
                minLength: 20
                type: string
              type: array
            - $ref: '#/components/schemas/Undefined'
          default:
            __typename: Undefined
          description: Components to be fully removed from Removal.
          title: Components To Remove
      title: PatchRemovalComponentAttributionsRequest
      type: object
    Removal:
      properties:
        co2e_net_removed_kg:
          description: >-
            The CO₂e removed by this removal once uncertainty discounting has
            been applied
          title: Co2E Net Removed Kg
          type: number
        co2e_net_removed_standard_deviation_kg:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The standard deviation of the CO₂e net removed and therefore the
            uncertainty discount applied to the removal
          title: Co2E Net Removed Standard Deviation Kg
        co2e_net_removed_without_discount_kg:
          description: >-
            The CO₂e removed by this removal before any uncertainty discounting
            has been applied
          title: Co2E Net Removed Without Discount Kg
          type: number
        completed_on:
          format: date
          title: Completed On
          type: string
        credit_allocation:
          anyOf:
            - $ref: '#/components/schemas/CreditAllocation'
            - type: 'null'
          description: >-
            The split of issuable credits between the supplier and buffer pool.
            Null when risk_of_reversal_percentage is not set.
        feedstock_type_id:
          anyOf:
            - example: ftt_1D7KZ1P761S0G7BN
              examples:
                - ftt_1D7KZ1P761S0G7BN
                - ftt_1CSRJN4HHSBXZ3TK
              maxLength: 37
              minLength: 20
              type: string
            - type: 'null'
          description: The feedstock type ID that this removal is associated with.
          title: Feedstock Type Id
        ghg_statement_id:
          anyOf:
            - example: ggs_1GDQJ99Z51S0DYW9
              examples:
                - ggs_1GDQJ99Z51S0DYW9
                - ggs_1FWVEQRWSSBXK3NB
              maxLength: 37
              minLength: 20
              type: string
            - type: 'null'
          description: >-
            The GHG statement ID that this removal is associated with. If null,
            the removal is in draft and has not been submitted for verification.
          title: Ghg Statement Id
        id:
          example: rmv_1EEM6NJXX1S0EXKD
          examples:
            - rmv_1EEM6NJXX1S0EXKD
            - rmv_1E3V4J2EWSBX5E82
          maxLength: 37
          minLength: 20
          title: Id
          type: string
        risk_of_reversal_percentage:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The percentage of credits contributed to the buffer pool due to risk
            of reversal.
          title: Risk Of Reversal Percentage
        started_on:
          format: date
          title: Started On
          type: string
        supplier_reference_id:
          anyOf:
            - description: >-
                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.
              maxLength: 200
              minLength: 1
              type: string
            - type: 'null'
          title: Supplier Reference Id
      required:
        - id
        - supplier_reference_id
        - started_on
        - completed_on
        - co2e_net_removed_kg
        - co2e_net_removed_without_discount_kg
        - co2e_net_removed_standard_deviation_kg
        - ghg_statement_id
        - feedstock_type_id
        - risk_of_reversal_percentage
        - credit_allocation
      title: Removal
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    IsometricIDRequestParam_GhgEntry_:
      example: rmv_1EEM6NJXX1S0EXKD
      examples:
        - rmv_1EEM6NJXX1S0EXKD
        - rmv_1E3V4J2EWSBX5E82
      maxLength: 37
      minLength: 20
      type: string
    ComponentToAttribute:
      properties:
        attribution_factor:
          default: 1
          description: >-
            A float in range of (0, 1] for the fraction of the CO2e flux of the
            component that is to be attributed to this removal. 1.0 means all of
            the component should be attributed. If not supplied, defaults to
            1.0.
          exclusiveMinimum: 0
          maximum: 1
          title: Attribution Factor
          type: number
        component_group_key:
          description: >-
            Key of a component group that this component should be applied to in
            the removal.


            The keys of the component groups are the same as the keys of removal
            template component groups they have been used to create them and
            they are consistent between projects using the same protocol.
          examples:
            - bio-oil-storage
            - energy-use
            - dac-process
          title: Component Group Key
          type: string
        component_id:
          description: ID of the component to add to the removal.
          example: cmp_1EP2SB7MZ1S036PY
          examples:
            - cmp_1EP2SB7MZ1S036PY
            - cmp_1EHK4R6QJSBXFC5N
          maxLength: 37
          minLength: 20
          title: Component Id
          type: string
      required:
        - component_id
        - component_group_key
      title: ComponentToAttribute
      type: object
    Undefined:
      additionalProperties: false
      description: >-
        An explicit representation of an undefined value in the Isometric REST
        API. Used, for example, to distinguish between explicit null inputs that
        clear a property, and not provided inputs which leave the property as
        is.
      properties:
        __typename:
          const: Undefined
          default: Undefined
          description: >-
            Contains the name of the model (formally, OpenAPI Schema Object).
            Used to determine the type of data, for example when two different
            types are unioned.
          title: Type name
          type: string
      title: Undefined
      type: object
    CreditAllocation:
      properties:
        buffer_pool_contribution_kg:
          description: >-
            The number of credits (in kg CO₂e) contributed to the buffer pool,
            computed as risk_of_reversal_percentage × total issuable credits.
          title: Buffer Pool Contribution Kg
          type: integer
        supplier_allocation_kg:
          description: >-
            The number of credits (in kg CO₂e) issued to the supplier, computed
            as total issuable credits minus buffer pool contribution.
          title: Supplier Allocation Kg
          type: integer
      required:
        - buffer_pool_contribution_kg
        - supplier_allocation_kg
      title: CreditAllocation
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      bearerFormat: JWT
      description: >-
        A JWT Bearer token header for authentication and authorization, in the
        format `Authorization: Bearer <token>`
      scheme: bearer
      type: http

````