PCF API

Download OpenAPI specification:

API to interact with Datalake data

Get a JWT token

Get tokens from app_id / app_secret.
Once you have the access_token, you can add it to the Authorization Header prefixed with the Bearer keyword to authenticate on protected endpoints: Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...

Request Body schema: application/json

Authentication parameters

app_id
string
app_secret
string
grant_type
string
Enum: "client_credentials" "refresh_token"

Responses

Request samples

Content type
application/json
{
  • "app_id": "string",
  • "app_secret": "string",
  • "grant_type": "client_credentials"
}

Response samples

Content type
application/json
{
  • "access_token": "string",
  • "refresh_token": "string"
}

Return all available countries for carbon footprint

Returning all countries that have an emission factor stored in the API.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "available_countries": [
    ]
}

Search product from user input

Using string similarity to find a list of matching product with the given input

Authorizations:
bearerAuth
query Parameters
user_input
required
string

String input from the user

certifications
boolean

Boolean input for the intent

Responses

Response samples

Content type
application/json
Example
{
  • "product_found": [
    ]
}

Get carbon footprint

Get carbon footprint for a product

Authorizations:
bearerAuth
Request Body schema: application/json
Array
part_number
required
string
commercial_name
string

Full commercial name of the product, if nothing provided, nothing will be displayed.

country
required
number

Could be alpha2, alpha3 or English country name.

year
number

Default to current year when not provided.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "message": "Bad request"
}

Get table carbon footprint

Get table carbon footprint for a product

Authorizations:
bearerAuth
Request Body schema: application/json
Array
part_number
required
string
commercial_name
string

Full commercial name of the product, if nothing provided, nothing will be displayed.

country
required
number

Could be alpha2, alpha3 or English country name.

year
number

Default to current year when not provided.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get certificate

Get the specific certificate for the product

Authorizations:
bearerAuth
Request Body schema: application/json
Array
part_number
required
string
commercial_name
string

Full commercial name of the product, if nothing provided, nothing will be displayed.

certificate
required
string

Could be a certificate type like that -> weee, rohs, reach

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "message": "Bad request"
}