> For the complete documentation index, see [llms.txt](https://tri.gitbook.io/tri-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tri.gitbook.io/tri-doc/carbon-credit.md).

# Carbon Credit

API of Carbon Credit projects: registering a project, updating one, listing your projects, viewing a project in full, and looking up the methodologies available for linking to a project.

**Authorization.** Every call carries the `hash` parameter with your API key.

**Answers.** The endpoints answer with the `{message, success, data, operations_count}` envelope; a refused call answers HTTP 400 with `success: false`.

**Registry and Methodology.** A project is linked to a methodology of the Methodology | Protocol section. Two ways: `methodology_id`, or `methodology_registry`, `name_of_methodology` and `d_mrv_types` together — all three are required in that case. An existing methodology with that name and version is linked; otherwise it is created. `methodology_registry` alone is refused here.

`methodology_id` comes from [D-MRV Methodologies](/tri-doc/carbon-credit/d-mrv-methodologies.md) or [Get Methodologies List](/tri-doc/methodology-or-protocol/get-methodologies-list.md); nothing else about the methodology is needed then. When a new methodology is created, the registry name is stamped on the new record so it appears as a Registry option afterwards. An existing methodology is linked by `methodology_id` only — a registry name is accepted to create a new methodology, never to select an existing one. [Update Project](/tri-doc/carbon-credit/update-project.md) follows the same rule.

A registry or methodology that cannot be resolved, or one your account may not use, **refuses the request**: the project is not stored, and the reason arrives in `data.errors.d_mrv_id`.

**Blocks of rows.** A block is one field, an array of objects. A block the request carries replaces the stored block whole; a block the request does not mention is left as it is; an empty array clears it. Contact blocks take up to 20 rows; link blocks, the Data Room rows and the allocation take up to 100. A company named in the allocation that does not exist yet is created.

**Documents.** Documents travel as rows of `data_room` (and, on Carbon Credit, `reference_files` / `environmental_product_documents`); links travel in the link blocks.

**Endpoints**

<table data-full-width="true"><thead><tr><th width="340">Endpoint</th><th>What it does</th></tr></thead><tbody><tr><td><a href="/tri-doc/carbon-credit/add-project.md">Add Project</a></td><td>Registers a carbon credit project, and links or creates its Registry and Methodology.</td></tr><tr><td><a href="/tri-doc/carbon-credit/update-project.md">Update Project</a></td><td>Changes any field of a project, including its contact and document blocks.</td></tr><tr><td><a href="/tri-doc/carbon-credit/get-projects-list.md">Get Projects List</a></td><td>Lists your projects as a summary.</td></tr><tr><td><a href="/tri-doc/carbon-credit/view-project.md">View Project</a></td><td>Returns one project in full.</td></tr><tr><td><a href="/tri-doc/carbon-credit/d-mrv-methodologies.md">D-MRV Methodologies</a></td><td>Lists the methodologies offered for linking — name, version, id and registry — the same set the Carbon Credit form offers.</td></tr></tbody></table>
