Carbonlink API
  • 🌿Welcome to Carbonlink
  • 🌟How Carbonlink Works
  • πŸ’ΎInstallation
  • ⁉️Handling Errors & Limits
    • Response Codes
    • Rate Limiting
  • GUIDES
    • Use Cases
      • E-Commerce
      • Carbon Accounting
      • Carbon Solution Providers
  • CORE
    • πŸ“–API reference
      • πŸ‘œProduct
      • 🧩Factor
      • πŸ—ΊοΈAsset
      • 🌍Offset
      • 🚞Estimate
    • πŸ“¦Data objects
      • Factor
      • Product
      • Asset
        • Project
          • Vintage
        • Pool
      • Estimate
      • Offset
  • Resources
    • Defining Emissions
      • The Scope System
      • CO2 Equivalents
    • Carbon Markets 101
      • What is A Carbon Credit?
      • Environmental Impact of Offsetting
      • How Are Credits Generated & Verified?
    • Methodologies
      • Carbon Credit Methodologies
      • Estimate Methodology
Powered by GitBook
On this page
  • Create a new product.
  • Update an existing product.
  • Retrieve a product.
  • Retrieve all products.
  • Delete a product.
  1. CORE
  2. API reference

Product

Build templates for automating emission estimations

[Secure] - API Key is required to call all Product endpoints.

Create a new product.

POST https://api.carbonlink.io/v1/products

Request Body

Name
Type
Description

name*

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

This attribute computes the unit emission rate for this Product.

Key-value pairs where the key of each pair represents the ID of the Factor to add to this product with a value corresponding to the quantity of the Factor to apply.

Example:

{ "fct_123": 12.3, "fct_456": 3.2 }

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

Update an existing product.

PATCH https://api.carbonlink.io/v1/products

Path Parameters

Name
Type
Description

id*

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

This attribute computes the unit emission rate for this Product.

Key-value pairs where the key of each pair represents the ID of the Factor to add to this product with a value corresponding to the quantity of the Factor to apply. If a new emission factorId is passed through, the Factor is added to the existing Factors. An existing factorId passed through will update the value of the corresponding Product Factor.

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

Retrieve a product.

GET https://api.carbonlink.io/v1/products

Path Parameters

Name
Type
Description

id*

string

ID of Product to retrieve

{
  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,
}

Retrieve all products.

GET https://api.carbonlink.io/v1/products

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

Delete a product.

DELETE https://api.carbonlink.io/v1/products

Path Parameters

Name
Type
Description

id*

string

ID of Product to delete

[
  {
    id: "prod_12345678",
    ...
  },
  {
    id: "prod_ABCDEFGH",
    ...
  },
]
PreviousAPI referenceNextFactor

Last updated 1 year ago

πŸ“–
πŸ‘œ