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

# Product

{% hint style="info" %} <mark style="color:blue;">**\[Secure]**</mark> - API Key is required to call all **Product** endpoints.
{% endhint %}

## Create a new product.

<mark style="color:green;">`POST`</mark> `https://api.carbonlink.io/v1/products`

#### Request Body

| Name                                   | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark> | string    | Name of product to be created                                                                                                                                                                                                                                                                                                                                                               |
| shippable                              | boolean   | Whether this product can be shipped or not. Defaults to false.                                                                                                                                                                                                                                                                                                                              |
| skus                                   | string\[] | List of IDs to represent this product                                                                                                                                                                                                                                                                                                                                                       |
| factors                                | object    | <p>This attribute computes the unit emission rate for this <strong>Product</strong>.</p><p></p><p>Key-value pairs where the key of each pair represents the ID of the <strong>Factor</strong> to add to this product with a value corresponding to the quantity of the <strong>Factor</strong> to apply.</p><p></p><p>Example:</p><p><code>{ "fct\_123": 12.3, "fct\_456": 3.2 }</code></p> |

{% tabs %}
{% tab title="200: OK " %}

```
{
    message: 'Product created successfully with ID: {...}'
}
```

{% endtab %}
{% endtabs %}

## Update an existing product.

<mark style="color:purple;">`PATCH`</mark> `https://api.carbonlink.io/v1/products`

#### Path Parameters

| Name                                 | Type   | Description                 |
| ------------------------------------ | ------ | --------------------------- |
| id<mark style="color:red;">\*</mark> | string | ID of **Product** to update |

#### Request Body

| Name      | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name      | string    | Name of product to be updated                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| shippable | boolean   | Whether this product can be shipped or not. Defaults to false.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| skus      | string\[] | List of IDs to represent this product. Overwrites previous list of IDs.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| factors   | object    | <p>This attribute computes the unit emission rate for this <strong>Product</strong>.</p><p></p><p>Key-value pairs where the key of each pair represents the ID of the <strong>Factor</strong> to add to this product with a value corresponding to the quantity of the <strong>Factor</strong> to apply. If a new emission <code>factorId</code> is passed through, the <strong>Factor</strong> is added to the existing <strong>Factors</strong>. An existing <code>factorId</code> passed through will update the <code>value</code> of the corresponding Product Factor.</p> |

{% tabs %}
{% tab title="200: OK " %}

```
{
    message: 'Product updated successfully with ID: {...}'
}
```

{% endtab %}
{% endtabs %}

## Retrieve a product.

<mark style="color:blue;">`GET`</mark> `https://api.carbonlink.io/v1/products`

#### Path Parameters

| Name                                 | Type   | Description                   |
| ------------------------------------ | ------ | ----------------------------- |
| id<mark style="color:red;">\*</mark> | string | ID of **Product** to retrieve |

{% tabs %}
{% tab title="200: OK " %}

```
{
  id: "prod_12345678",
  name: "Road Bike - 2023 Model",
  kgCO2e: 123.45,
  shippable: true,
  sector: 'Ground Transportation',
  category: "Bicycle",
  factors: [
    {
        factorId: "fct_123...",
        value: 1.23
    },
    {
        factorId: "fct_456...",
        value: 34.51
    },
    ...
  ],
  active: true,
}
```

{% endtab %}
{% endtabs %}

## Retrieve all products.

<mark style="color:blue;">`GET`</mark> `https://api.carbonlink.io/v1/products`

{% tabs %}
{% tab title="200: OK " %}

```
[
  {
    id: "prod_12345678",
    ...
  },
  {
    id: "prod_ABCDEFGH",
    ...
  },
]
```

{% endtab %}
{% endtabs %}

## Delete a product.

<mark style="color:red;">`DELETE`</mark> `https://api.carbonlink.io/v1/products`

#### Path Parameters

| Name                                 | Type   | Description                 |
| ------------------------------------ | ------ | --------------------------- |
| id<mark style="color:red;">\*</mark> | string | ID of **Product** to delete |

{% tabs %}
{% tab title="200: OK " %}

```
[
  {
    id: "prod_12345678",
    ...
  },
  {
    id: "prod_ABCDEFGH",
    ...
  },
]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://carbonlink.gitbook.io/carbonlink-api/core/api-reference/product.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
