Download OpenAPI specification:
The Foodsteps API allows you to manage products and access their impact.
Examples of how to use our API can be found here.
X-Api-Key header. For example: curl 'https://api.foodsteps.earth/v1/products/' \
-H 'X-Api-Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'A product is a food produced by your organisation. It is defined by its ingredients and production methods. An ingredient can be another of your organisation's products or a food you have purchased as an ingredient.
You must assign products an identifier called an externalId, this will uniquely identify your product within the Foodsteps platform. We recommend that products managed through integration with an existing system populate externalId with the unique identifier from that system.
Foodsteps calculates the environmental impact of your organisation’s products over several impact categories. These include GHG emissions, land use, and water use. Foodsteps reports impact intensity, provided as impact per KG of product, and impact per serving of product.
Determining the impact of a product is a complex calculation and may require substantial computation. In the majority of cases the impact is cached, but for an updated or newly created product it is possible for this calculation to take multiple seconds, or in extreme cases, multiple minutes. Where an ingredient of a product has never previously been assessed this time may be substantially longer as previously unseen ingredients are reviewed by an expert. See the current impacts endpoint for guidance on polling.
Get the current impact of products. A new impact is calculated for a product whenever it is updated.
Impacts that have not finished calculating yet will have the status pending.
Impacts that could not be calculated will have the status failed, along with information on why they failed.
| productExternalIds required | Array of strings (Productexternalids) Include products with these product external IDs. Can be provided multiple times (e.g., productExternalIds=id1&productExternalIds=id2) |
{- "impacts": [
- {
- "status": "complete",
- "productExternalId": "mySKU-1",
- "impactGhgPerServing": 0.5,
- "impactGhgPerKg": 0.1,
- "impactRating": "HIGH",
- "impactLandUsePerServing": 0.2,
- "impactLandUsePerKg": 0.4,
- "impactWaterUsePerServing": 0.3,
- "impactWaterUsePerKg": 0.6,
- "scope3CategoriesPerKg": {
- "landUseChange": 0.0004,
- "landManagementCo2": 0.0002,
- "landManagementNonCo2": 0.0001,
- "carbonRemovals": 0,
- "energyAndIndustry": 0.0005,
- "upstreamTransport": 0.0006
}
}, - {
- "status": "pending",
- "productExternalId": "mySKU-2"
}, - {
- "status": "failed",
- "productExternalId": "mySKU-3",
- "errors": [
- {
- "code": "INGREDIENT_NOT_FOUND_IN_DATABASE",
- "message": "Your product contains a new ingredient. You will be able to see the product's impact once Foodsteps has added it to the database."
}
]
}
]
}List the products in your organization.
| externalIds | Array of strings (Externalids) Default: "" The external IDs of the products to retrieve. Can be provided multiple times (e.g. |
| page | integer (Page) >= 1 Default: 1 Page number for pagination |
| size | integer (Size) [ 1 .. 50 ] Default: 10 Number of items per page |
{- "products": [
- {
- "name": "Hazelnuts (spain)",
- "ingredients": [
- {
- "subProductExternalId": null,
- "externalId": null,
- "name": "Hazelnuts",
- "quantity": 1,
- "unit": "kg"
}
], - "tags": [
- {
- "name": "Summer 2024"
}, - {
- "name": "Organic"
}
], - "numServings": 1,
- "externallySynced": true,
- "externalId": "An ID",
- "supplier": {
- "contactName": "John Smith",
- "name": "Organic Farms Ltd",
- "email": "john@example.com"
}
}
], - "hasNextPage": false,
- "hasPreviousPage": false,
- "totalCount": 1,
- "totalPages": 1
}Create or update products in your organization. If no product with a matching externalId exists a new product will be created. Otherwise the existing product will be updated.
externalId. This is used to group identical kinds of ingredients across your products for modeling by the platform. If an ingredient is best modeled as another of your products, indicate that by providing the product's externalId in the subProductExternalId field.externalId be omitted?externalId is mandatory. If you wish to use IDs provided by our system instead of your own, contact us about enabling this for your organization.
If your organization has been configured this way, omitting the externalId field will cause a new product to be created with an externalId generated by Foodsteps.required | Array of objects (Products) |
{- "products": [
- {
- "externalId": "string",
- "name": "string",
- "ingredients": [
- {
- "externalId": "string",
- "name": "string",
- "quantity": 0,
- "unit": "cl",
- "subProductExternalId": "string"
}
], - "numServings": 0,
- "tags": [
- "string"
], - "supplier": {
- "contactName": "string",
- "name": "string",
- "email": "string"
}
}
]
}{- "products": [
- {
- "name": "myProduct",
- "ingredients": [
- {
- "subProductExternalId": null,
- "externalId": "supplier-reference-1",
- "name": "Lettuce",
- "quantity": 1.5,
- "unit": "kg"
}
], - "tags": [ ],
- "numServings": 1,
- "externallySynced": true,
- "externalId": "my ID",
- "supplier": {
- "contactName": "Mike Johnson",
- "name": "Fresh Produce Ltd",
- "email": "mike@example.com"
}
}
]
}Get the version history of impacts for products in a given applicable date and month. For a given date and month, returns a list of applicable impact versions per product external ID. For the most recent versions it's possible that the impact has not been calculated yet, in which case the status will be pending.
The difference between the impact for the same productExternalId and same version for a different applicableDate represents real world change in the impact of that product between those applicable dates. The difference between the impact for the same productExternalId and same applicableDate for a different version represents a methodological change in the way the impact was calculated based on either changes to the source product data or Foodsteps's own methodology.
| productExternalIds required | Array of strings Include products with these product external IDs. Can be provided multiple times (e.g., productExternalIds=id1&productExternalIds=id2) |
| applicableDate | integer or null [ 1 .. 12 ] Examples:
The month (1-12) that impacts are applicable to. |
| applicableYear | integer or null Examples:
The year that impacts are applicable to. |
{- "impacts": [
- {
- "status": "complete",
- "productExternalId": "mySKU-1",
- "version": "5",
- "changeType": "Foodsteps data quality improvement",
- "applicableDate": {
- "month": 11,
- "year": 2025
}, - "impactGhgPerServing": 0.5,
- "impactGhgPerKg": 0.1,
- "impactRating": "HIGH",
- "impactLandUsePerServing": 0.2,
- "impactLandUsePerKg": 0.4,
- "impactWaterUsePerServing": 0.3,
- "impactWaterUsePerKg": 0.6,
- "scope3CategoriesPerKg": {
- "landUseChange": 0.0004,
- "landManagementCo2": 0.0002,
- "landManagementNonCo2": 0.0001,
- "carbonRemovals": 0,
- "energyAndIndustry": 0.0005,
- "upstreamTransport": 0.0006
}
}, - {
- "status": "complete",
- "productExternalId": "mySKU-1",
- "version": "4",
- "changeType": "Product data quality improvement",
- "applicableDate": {
- "month": 11,
- "year": 2025
}, - "impactGhgPerServing": 0.5,
- "impactGhgPerKg": 0.1,
- "impactRating": "HIGH",
- "impactLandUsePerServing": 0.2,
- "impactLandUsePerKg": 0.4,
- "impactWaterUsePerServing": 0.3,
- "impactWaterUsePerKg": 0.6,
- "scope3CategoriesPerKg": {
- "landUseChange": 0.0004,
- "landManagementCo2": 0.0002,
- "landManagementNonCo2": 0.0001,
- "carbonRemovals": 0,
- "energyAndIndustry": 0.0005,
- "upstreamTransport": 0.0006
}
}, - {
- "status": "pending",
- "productExternalId": "mySKU-2",
- "version": "5",
- "changeType": "Foodsteps data quality improvement",
- "applicableDate": {
- "month": 11,
- "year": 2025
}
}, - {
- "status": "complete",
- "productExternalId": "mySKU-2",
- "version": "4",
- "changeType": "Product data quality improvement",
- "applicableDate": {
- "month": 11,
- "year": 2025
}, - "impactGhgPerServing": 0.5,
- "impactGhgPerKg": 0.1,
- "impactRating": "HIGH",
- "impactLandUsePerServing": 0.2,
- "impactLandUsePerKg": 0.4,
- "impactWaterUsePerServing": 0.3,
- "impactWaterUsePerKg": 0.6,
- "scope3CategoriesPerKg": {
- "landUseChange": 0.0004,
- "landManagementCo2": 0.0002,
- "landManagementNonCo2": 0.0001,
- "carbonRemovals": 0,
- "energyAndIndustry": 0.0005,
- "upstreamTransport": 0.0006
}
}
]
}