Supplies
Supplies represent orders delivered by specific suppliers in the supply chain. They contain a list of ingredients — similar to recipes — and can serve as the data pool for Eaternity Reports, as well as provide feedback on individual purchases.
Overview
Use the Supply API to:
- Track ingredient purchases from suppliers
- Calculate CO₂ footprint of supply chain deliveries
- Generate data for Eaternity Reports on procurement sustainability
- Analyze environmental impact per supplier
Query Parameters
All supply endpoints support the following query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
full-resource | boolean | false | Return complete JSON response with all fields. Saves bandwidth when false. |
indicators | boolean | false | Include additional environmental indicators: water footprint, rainforest impact, etc. |
return-uids | boolean | false | Include internal uid fields in response. |
transient | boolean | false | Supply is calculated but not permanently stored — it will not appear in reports. |
ingredients-declaration | boolean | false | Include parsed ingredient declarations in response. |
Supply Properties
Request Properties
| Property | Type | Required | Description |
|---|---|---|---|
id | String | No | Supply identifier. Either generated by Eaternity or supplied by the client through a PUT. |
supplier | String | No | Name of the specific supplier in the supply chain |
supplier-id | String | No | Your identifier for the supplier |
invoice-id | String | No | Invoice number (if different from the supply ID) |
order-date | Date | Yes | The date the supply was ordered. Format: YYYY-MM-DD |
supply-date | Date | Yes | The delivery date of the supply. Format: YYYY-MM-DD |
ingredients | Array | Yes | A list of ingredient resources in this supply (same format as recipe ingredients) |
Request Example
[
{
"request-id": 1,
"supply": {
"id": "d1ed2263",
"kitchen-id": "293833",
"supplier": "Vegetable Supplies Ltd.",
"supplier-id": "el3i5y-2in5y-2hbllll01",
"supply-date": "2013-06-01",
"ingredients": [
{
"id": "100100191",
"type": "conceptual-ingredients",
"names": [
{
"language": "de",
"value": "Tomaten"
}
],
"amount": 150,
"unit": "gram",
"origin": "spain",
"transport": "air",
"production": "greenhouse",
"processing": "raw",
"conservation": "fresh",
"packaging": "plastic"
}
]
}
}
]
Response Properties (with full-resource=true)
| Property | Type | Description |
|---|---|---|
id | String | Supply identifier |
kitchen-id | String | The kitchen this supply belongs to |
co2-value | Float | Total CO₂ value of the supply in grams CO₂e |
info-text | String | Notes on the calculation (e.g., "Two ingredient origins have been estimated.") |
supplier | String | Supplier name |
supplier-id | String | Supplier identifier |
supply-date | String | Delivery date |
ingredients | Array | Ingredients with individual ratings and CO₂ values |
indicators | Object | Environmental indicators (when indicators=true is set) |
Response Example (GET with full-resource=true)
{
"supply": {
"id": "d1ed2263",
"kitchen-id": "293833",
"co2-value": 77,
"info-text": "Two ingredient origins have been estimated.",
"supplier": "Vegetable Supplies Ltd.",
"supplier-id": "el3i5y-2in5y-2hbllll01",
"supply-date": "2013-06-01",
"ingredients": [
{
"id": "100100191",
"type": "conceptual-ingredients",
"names": [
{
"language": "de",
"value": "Tomaten"
}
],
"amount": 150.0,
"unit": "gram",
"origin": "spain",
"transport": "air",
"production": "greenhouse",
"processing": "raw",
"conservation": "fresh",
"packaging": "plastic",
"gtin": "",
"rating": "C",
"bar-chart": 69,
"co2-value": 79
}
]
}
}
Batch Operations
Supplies support batch creation via POST /kitchens/{kitchen_id}/supplies/. Multiple supplies can be created or updated in a single request.
Each supply in the batch can include a request-id to track individual items in the response. Either a request-id or a supply id is required per entry.
Batch Delete
Delete multiple supplies via DELETE /supplies/batch:
{
"supplies": ["d1ed2263", "d1ed2267"]
}
Kitchen-Scoped Endpoints
Supplies are managed under a specific kitchen:
| Method | Endpoint | Description |
|---|---|---|
POST | /kitchens/{kitchen_id}/supplies/ | Create a batch of supplies or a single supply |
GET | /kitchens/{kitchen_id}/supplies/ | List all supply IDs in this kitchen |
GET | /kitchens/{kitchen_id}/supplies/{supply_id} | Get a specific supply |
PUT | /kitchens/{kitchen_id}/supplies/{supply_id} | Update or create a supply with a specific ID |
DELETE | /kitchens/{kitchen_id}/supplies/{supply_id} | Delete a supply |
Endpoints
📄️ Create supplies
Create a single supply or a batch of supplies.
📄️ Get all supplies in a kitchen
Returns a list of supply IDs in this kitchen.
📄️ Get a supply
Retrieve a specific supply with calculated CO₂ values.
📄️ Update or create a supply
Update or create this supply with the specific ID.
📄️ Delete a supply
Delete a specific supply.
📄️ Delete a batch of supplies
Delete multiple supplies at once.